[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [comint.el] `comint-preoutput-filter-functions' should be buffer-loc
From: |
Richard Stallman |
Subject: |
Re: [comint.el] `comint-preoutput-filter-functions' should be buffer-local |
Date: |
Wed, 27 Feb 2002 12:45:35 -0700 (MST) |
Please try these fixes. I can't test them myself because I don't
know of any uses for them.
*** comint.el.~1.265.~ Mon Feb 25 20:10:59 2002
--- comint.el Wed Feb 27 14:27:58 2002
***************
*** 378,384 ****
"Functions to call before input is sent to the process.
These functions get one argument, a string containing the text to send.
! This variable is buffer-local.")
(defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom)
"Functions to call after output is inserted into the buffer.
--- 378,385 ----
"Functions to call before input is sent to the process.
These functions get one argument, a string containing the text to send.
! You can use `add-hook' to add functions to this list
! either globally or locally.")
(defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom)
"Functions to call after output is inserted into the buffer.
***************
*** 390,396 ****
See also `comint-preoutput-filter-functions'.
! This variable is buffer-local.")
(defvar comint-input-sender-no-newline nil
"Non-nil directs the `comint-input-sender' function not to send a newline.")
--- 391,398 ----
See also `comint-preoutput-filter-functions'.
! You can use `add-hook' to add functions to this list
! either globally or locally.")
(defvar comint-input-sender-no-newline nil
"Non-nil directs the `comint-input-sender' function not to send a newline.")
***************
*** 1564,1570 ****
the last function is the text that is actually inserted in the
redirection buffer.
! This variable is permanent-local.")
;; When non-nil, this is the last overlay used for output.
;; It is kept around so that we can extend it instead of creating
--- 1566,1573 ----
the last function is the text that is actually inserted in the
redirection buffer.
! You can use `add-hook' to add functions to this list
! either globally or locally.")
;; When non-nil, this is the last overlay used for output.
;; It is kept around so that we can extend it instead of creating
***************
*** 1631,1637 ****
;; Run preoutput filters
(let ((functions comint-preoutput-filter-functions))
(while (and functions string)
! (setq string (funcall (car functions) string))
(setq functions (cdr functions))))
;; Insert STRING
--- 1634,1645 ----
;; Run preoutput filters
(let ((functions comint-preoutput-filter-functions))
(while (and functions string)
! (if (eq (car functions) t)
! (let ((functions (default-value
'comint-preoutput-filter-functions)))
! (while (and functions string)
! (setq string (funcall (car functions) string))
! (setq functions (cdr functions))))
! (setq string (funcall (car functions) string)))
(setq functions (cdr functions))))
;; Insert STRING
***************
*** 2990,2998 ****
The functions on the list are called sequentially, and each one is given
the string returned by the previous one. The string returned by the
! last function is the text that is actually inserted in the redirection
buffer.")
! (make-variable-buffer-local 'comint-redirect-filter-functions)
;; Internal variables
--- 2998,3007 ----
The functions on the list are called sequentially, and each one is given
the string returned by the previous one. The string returned by the
! last function is the text that is actually inserted in the redirection buffer.
! You can use `add-hook' to add functions to this list
! either globally or locally.")
;; Internal variables
***************
*** 3126,3133 ****
;; If there are any filter functions, give them a chance to modify the
string
(let ((functions comint-redirect-filter-functions))
(while (and functions filtered-input-string)
! (setq filtered-input-string
! (funcall (car functions) filtered-input-string))
(setq functions (cdr functions))))
;; Clobber `comint-redirect-finished-regexp'
--- 3135,3150 ----
;; If there are any filter functions, give them a chance to modify the
string
(let ((functions comint-redirect-filter-functions))
(while (and functions filtered-input-string)
! (if (eq (car functions) t)
! ;; If a local value says "use the default value too",
! ;; do that.
! (let ((functions (default-value 'comint-redirect-filter-functions)))
! (while (and functions filtered-input-string)
! (setq filtered-input-string
! (funcall (car functions) filtered-input-string))
! (setq functions (cdr functions))))
! (setq filtered-input-string
! (funcall (car functions) filtered-input-string)))
(setq functions (cdr functions))))
;; Clobber `comint-redirect-finished-regexp'