aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-02-27 19:32:12 +0000
committerRichard M. Stallman2002-02-27 19:32:12 +0000
commit458a481004ec000bd9028d0659ba0f47dad98240 (patch)
treea53005c3229348a4eaf3cae1cf06edb8d592ab0b
parent3243b9f38e1e94eb26e9298d5e2d04ef28dc8677 (diff)
downloademacs-458a481004ec000bd9028d0659ba0f47dad98240.tar.gz
emacs-458a481004ec000bd9028d0659ba0f47dad98240.zip
(comint-preoutput-filter-functions): Doc fix.
(comint-output-filter-functions, comint-input-filter-functions) (comint-redirect-filter-functions): Likewise. (comint-redirect-preoutput-filter): Do the local-hook handling of t when running comint-redirect-filter-functions. (comint-output-filter): Likewise for comint-preoutput-filter-functions.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/comint.el33
2 files changed, 35 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d5fe8ec4c96..3814ef2262b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12002-02-27 Richard M. Stallman <rms@gnu.org>
2
3 * comint.el (comint-preoutput-filter-functions): Doc fix.
4 (comint-output-filter-functions, comint-input-filter-functions)
5 (comint-redirect-filter-functions): Likewise.
6
7 (comint-redirect-preoutput-filter): Do the local-hook
8 handling of t when running comint-redirect-filter-functions.
9 (comint-output-filter): Likewise for comint-preoutput-filter-functions.
10
12002-02-26 Richard M. Stallman <rms@gnu.org> 112002-02-26 Richard M. Stallman <rms@gnu.org>
2 12
3 * paths.el (remote-shell-program): Add doc string. 13 * paths.el (remote-shell-program): Add doc string.
diff --git a/lisp/comint.el b/lisp/comint.el
index 0fb22b3341c..3654149b651 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -378,7 +378,8 @@ history list. Default is to save anything that isn't all whitespace.")
378 "Functions to call before input is sent to the process. 378 "Functions to call before input is sent to the process.
379These functions get one argument, a string containing the text to send. 379These functions get one argument, a string containing the text to send.
380 380
381This variable is buffer-local.") 381You can use `add-hook' to add functions to this list
382either globally or locally.")
382 383
383(defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom) 384(defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom)
384 "Functions to call after output is inserted into the buffer. 385 "Functions to call after output is inserted into the buffer.
@@ -390,7 +391,8 @@ functions have already modified the buffer.
390 391
391See also `comint-preoutput-filter-functions'. 392See also `comint-preoutput-filter-functions'.
392 393
393This variable is buffer-local.") 394You can use `add-hook' to add functions to this list
395either globally or locally.")
394 396
395(defvar comint-input-sender-no-newline nil 397(defvar comint-input-sender-no-newline nil
396 "Non-nil directs the `comint-input-sender' function not to send a newline.") 398 "Non-nil directs the `comint-input-sender' function not to send a newline.")
@@ -1564,7 +1566,8 @@ given the string returned by the previous one. The string returned by
1564the last function is the text that is actually inserted in the 1566the last function is the text that is actually inserted in the
1565redirection buffer. 1567redirection buffer.
1566 1568
1567This variable is permanent-local.") 1569You can use `add-hook' to add functions to this list
1570either globally or locally.")
1568 1571
1569;; When non-nil, this is the last overlay used for output. 1572;; When non-nil, this is the last overlay used for output.
1570;; It is kept around so that we can extend it instead of creating 1573;; It is kept around so that we can extend it instead of creating
@@ -1631,7 +1634,12 @@ This function should be in the list `comint-output-filter-functions'."
1631 ;; Run preoutput filters 1634 ;; Run preoutput filters
1632 (let ((functions comint-preoutput-filter-functions)) 1635 (let ((functions comint-preoutput-filter-functions))
1633 (while (and functions string) 1636 (while (and functions string)
1634 (setq string (funcall (car functions) string)) 1637 (if (eq (car functions) t)
1638 (let ((functions (default-value 'comint-preoutput-filter-functions)))
1639 (while (and functions string)
1640 (setq string (funcall (car functions) string))
1641 (setq functions (cdr functions))))
1642 (setq string (funcall (car functions) string)))
1635 (setq functions (cdr functions)))) 1643 (setq functions (cdr functions))))
1636 1644
1637 ;; Insert STRING 1645 ;; Insert STRING
@@ -2990,9 +2998,10 @@ string.
2990 2998
2991The functions on the list are called sequentially, and each one is given 2999The functions on the list are called sequentially, and each one is given
2992the string returned by the previous one. The string returned by the 3000the string returned by the previous one. The string returned by the
2993last function is the text that is actually inserted in the redirection buffer.") 3001last function is the text that is actually inserted in the redirection buffer.
2994 3002
2995(make-variable-buffer-local 'comint-redirect-filter-functions) 3003You can use `add-hook' to add functions to this list
3004either globally or locally.")
2996 3005
2997;; Internal variables 3006;; Internal variables
2998 3007
@@ -3126,8 +3135,16 @@ This function does not need to be invoked by the end user."
3126 ;; If there are any filter functions, give them a chance to modify the string 3135 ;; If there are any filter functions, give them a chance to modify the string
3127 (let ((functions comint-redirect-filter-functions)) 3136 (let ((functions comint-redirect-filter-functions))
3128 (while (and functions filtered-input-string) 3137 (while (and functions filtered-input-string)
3129 (setq filtered-input-string 3138 (if (eq (car functions) t)
3130 (funcall (car functions) filtered-input-string)) 3139 ;; If a local value says "use the default value too",
3140 ;; do that.
3141 (let ((functions (default-value 'comint-redirect-filter-functions)))
3142 (while (and functions filtered-input-string)
3143 (setq filtered-input-string
3144 (funcall (car functions) filtered-input-string))
3145 (setq functions (cdr functions))))
3146 (setq filtered-input-string
3147 (funcall (car functions) filtered-input-string)))
3131 (setq functions (cdr functions)))) 3148 (setq functions (cdr functions))))
3132 3149
3133 ;; Clobber `comint-redirect-finished-regexp' 3150 ;; Clobber `comint-redirect-finished-regexp'