emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comint-carriage-motion causes severe problems.


From: Luc Teirlinck
Subject: Re: comint-carriage-motion causes severe problems.
Date: Sat, 17 Aug 2002 21:39:30 -0500 (CDT)

Richard Stallman wrote:

       This was written about a month ago and concerned problems caused by
       comint-carriage-motion for ielm.  One thing was (and is) not
       completely clear to me:

       Would you like me to send  diffs for comint.el and ielm.el
       implementing these changes?  I could easily do so.

   I would like someone to do it, and that could be you.
   However, if they are nontrivial we would need to get new
   legal papers from you.  This is because the papers you signed
   (at least according to our file) in Jan 2001 only covered your
   past changes.  If someone else who has assigned future changes
   writes this, we won't need new papers from him.

You should have received my signed papers by now.

Below are change logs and diffs for comint.el and ielm.el.
(For the latest CVS versions, 21.3.50)
I will send some additional remarks in a separate message.

Change logs:

2002-08-17  Luc Teirlinck  <address@hidden>

        * comint.el: (no-carriage-motion): New variable. 
        (comint-carriage-motion, comint-output-filter-functions,
        comint-send-input, comint-output-filter): Remove
        comint-carriage-motion from comint-output-filter-functions and
        call it directly from comint-send-input an comint-output-filter.

        * ielm.el: (inferior-emacs-lisp-mode): Give no-carriage-motion
        a buffer local value of t.

Diffs:


===File ~/comint-diff=======================================
cd /usr/local/share/emacs/21.3.50/lisp/
diff -c /usr/local/share/emacs/21.3.50/lisp/comintold.el 
/usr/local/share/emacs/21.3.50/lisp/comint.el
*** /usr/local/share/emacs/21.3.50/lisp/comintold.el    Mon Jul  8 03:45:00 2002
--- /usr/local/share/emacs/21.3.50/lisp/comint.el       Fri Aug 16 21:42:01 2002
***************
*** 421,426 ****
--- 421,432 ----
    "Non-nil if you are accumulating input lines to send as input together.
  The command \\[comint-accumulate] sets this.")
  
+ (defvar no-carriage-motion nil
+   "If nil, `comint-carriage-motion' modifies comint output.
+ See the documentation string of that function for details.
+ You can overwrite that feature in specific comint applications or
+ buffers by giving this variable a non-nil buffer local value.")
+ 
  (put 'comint-replace-by-expanded-history 'menu-enable 
'comint-input-autoexpand)
  (put 'comint-input-ring 'permanent-local t)
  (put 'comint-input-ring-index 'permanent-local t)
***************
*** 1508,1513 ****
--- 1514,1520 ----
  
          ;; This used to call comint-output-filter-functions,
          ;; but that scrolled the buffer in undesirable ways.
+         (unless no-carriage-motion (comint-carriage-motion ""))
          (run-hook-with-args 'comint-output-filter-functions "")))))
  
  (defvar comint-preoutput-filter-functions nil
***************
*** 1545,1551 ****
  Make single carriage returns delete to the beginning of the line.
  Make backspaces delete the previous character.
  
! This function should be in the list `comint-output-filter-functions'."
    (save-match-data
      ;; We first check to see if STRING contains any magic characters, to
      ;; avoid overhead in the common case where it does not
--- 1552,1560 ----
  Make single carriage returns delete to the beginning of the line.
  Make backspaces delete the previous character.
  
! You can disable these features for specific comint applications or
! buffers by giving the variable `no-carriage-motion' a non-nil buffer
! local value."
    (save-match-data
      ;; We first check to see if STRING contains any magic characters, to
      ;; avoid overhead in the common case where it does not
***************
*** 1575,1582 ****
              (while (search-forward "\b" pmark t)
                (delete-char -2)))))))))
  
- (add-hook 'comint-output-filter-functions 'comint-carriage-motion)
- 
  ;; The purpose of using this filter for comint processes
  ;; is to keep comint-last-input-end from moving forward
  ;; when output is inserted.
--- 1584,1589 ----
***************
*** 1660,1665 ****
--- 1667,1673 ----
            ;; Advance process-mark
            (set-marker (process-mark process) (point))
  
+           (unless no-carriage-motion (comint-carriage-motion string))
            (run-hook-with-args 'comint-output-filter-functions string)
            (goto-char (process-mark process)) ; in case a filter moved it
  

Diff finished at Sat Aug 17 20:26:22
============================================================


===File ~/ielmdiff2=========================================
cd /usr/local/share/emacs/21.3.50/lisp/
diff -c /usr/local/share/emacs/21.3.50/lisp/ielmold.el 
/usr/local/share/emacs/21.3.50/lisp/ielm.el
*** /usr/local/share/emacs/21.3.50/lisp/ielmold.el      Fri Aug 16 21:06:02 2002
--- /usr/local/share/emacs/21.3.50/lisp/ielm.el Fri Aug 16 21:14:49 2002
***************
*** 464,469 ****
--- 464,471 ----
      (comint-output-filter (ielm-process) ielm-prompt)
      (set-marker comint-last-input-start (ielm-pm))
      (set-process-filter (get-buffer-process (current-buffer)) 
'comint-output-filter))
+   (make-local-variable 'no-carriage-motion)
+   (setq no-carriage-motion t)
    (run-hooks 'ielm-mode-hook))
  
  (defun ielm-get-old-input nil

Diff finished at Sat Aug 17 20:30:37
============================================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]