Mercurial > emacs
changeset 51421:79dc5a8eacfe
(comint-move-point-for-output): Renamed from
comint-scroll-to-bottom-on-output. Old name is alias.
Doc fix. All uses changed.
(comint-scroll-show-maximum-output): Doc fix.
(comint-exec-1): Don't use directory-sep-char.
(comint-dynamic-complete-as-filename): Likewise.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 03 Jun 2003 11:06:42 +0000 |
parents | 22c87cfe7fe4 |
children | 509508a92422 |
files | lisp/comint.el |
diffstat | 1 files changed, 36 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/comint.el Tue Jun 03 11:04:06 2003 +0000 +++ b/lisp/comint.el Tue Jun 03 11:06:42 2003 +0000 @@ -244,16 +244,19 @@ (const this)) :group 'comint) -(defcustom comint-scroll-to-bottom-on-output nil - "*Controls whether interpreter output causes window to scroll. -If nil, then do not scroll. If t or `all', scroll all windows showing buffer. -If `this', scroll only the selected window. -If `others', scroll only those that are not the selected window. +(defcustom comint-move-point-for-output nil + "*Controls whether interpreter output moves point to the end of the output. +If nil, then output never moves point to the output. + (If the output occurs at point, it is inserted before point.) +If t or `all', move point in all windows showing the buffer. +If `this', move point only the selected window. +If `others', move point only in other windows, not in the selected window. The default is nil. -See variable `comint-scroll-show-maximum-output' and function -`comint-postoutput-scroll-to-bottom'. This variable is buffer-local." +See the variable `comint-scroll-show-maximum-output' and the function +`comint-postoutput-scroll-to-bottom'. +This variable is buffer-local in all comint buffers." :type '(choice (const :tag "off" nil) (const t) (const all) @@ -261,12 +264,22 @@ (const others)) :group 'comint) +(defvaralias 'comint-scroll-to-bottom-on-output 'comint-move-point-for-output) + (defcustom comint-scroll-show-maximum-output t - "*Controls how interpreter output causes window to scroll. -If non-nil, then show the maximum output when the window is scrolled. - -See variable `comint-scroll-to-bottom-on-output' and function -`comint-postoutput-scroll-to-bottom'. This variable is buffer-local." + "*Controls how to scroll due to interpreter output. +This variable applies when point is at the end of the buffer +\(either because it was originally there, or because +`comint-move-point-for-output' said to move it there) +and output from the subprocess is inserted. + +Non-nil means scroll so that the window is full of text +and point is on the last line. A value of nil +means don't do anyting special--scroll normally. + +See also the variable `comint-move-point-for-output' and the function +`comint-postoutput-scroll-to-bottom'. +This variable is buffer-local in all comint buffers." :type 'boolean :group 'comint) @@ -430,7 +443,7 @@ (put 'comint-output-filter-functions 'permanent-local t) (put 'comint-preoutput-filter-functions 'permanent-local t) (put 'comint-scroll-to-bottom-on-input 'permanent-local t) -(put 'comint-scroll-to-bottom-on-output 'permanent-local t) +(put 'comint-move-point-for-output 'permanent-local t) (put 'comint-scroll-show-maximum-output 'permanent-local t) (put 'comint-ptyp 'permanent-local t) @@ -464,7 +477,7 @@ Input to, and output from, the subprocess can cause the window to scroll to the end of the buffer. See variables `comint-output-filter-functions', `comint-preoutput-filter-functions', `comint-scroll-to-bottom-on-input', -and `comint-scroll-to-bottom-on-output'. +and `comint-move-point-for-output'. If you accidentally suspend your process, use \\[comint-continue-subjob] to continue it. @@ -499,7 +512,7 @@ (make-local-variable 'comint-input-sender) (make-local-variable 'comint-eol-on-send) (make-local-variable 'comint-scroll-to-bottom-on-input) - (make-local-variable 'comint-scroll-to-bottom-on-output) + (make-local-variable 'comint-move-point-for-output) (make-local-variable 'comint-scroll-show-maximum-output) ;; This makes it really work to keep point at the bottom. (make-local-variable 'scroll-conservatively) @@ -736,7 +749,7 @@ (default-directory (if (file-accessible-directory-p default-directory) default-directory - (char-to-string directory-sep-char))) + "/")) proc decoding encoding changed) (let ((exec-path (if (file-name-directory command) ;; If the command has slashes, make sure we @@ -1726,16 +1739,16 @@ nil t)))))) (defun comint-postoutput-scroll-to-bottom (string) - "Go to the end of buffer in all windows showing it. + "Go to the end of buffer in some or all windows showing it. Does not scroll if the current line is the last line in the buffer. -Depends on the value of `comint-scroll-to-bottom-on-output' and +Depends on the value of `comint-move-point-for-output' and `comint-scroll-show-maximum-output'. This function should be in the list `comint-output-filter-functions'." (let* ((selected (selected-window)) (current (current-buffer)) (process (get-buffer-process current)) - (scroll comint-scroll-to-bottom-on-output)) + (scroll comint-move-point-for-output)) (unwind-protect (if process (walk-windows @@ -2069,7 +2082,9 @@ between the process-mark and point." (interactive) (comint-skip-input) - (interrupt-process nil comint-ptyp)) + (interrupt-process nil comint-ptyp) +;; (process-send-string nil "\n") + ) (defun comint-kill-subjob () "Send kill signal to the current subjob. @@ -2672,7 +2687,7 @@ (dirsuffix (cond ((not comint-completion-addsuffix) "") ((not (consp comint-completion-addsuffix)) - (char-to-string directory-sep-char)) + "/") (t (car comint-completion-addsuffix)))) (filesuffix (cond ((not comint-completion-addsuffix)