changeset 4923:63aed739d09d

(comint-postoutput-scroll-to-bottom): Always keep point at end in all buffers if was at end. comint-scroll-to-bottom-on-output controls what to do if point was not already at the end.
author Richard M. Stallman <rms@gnu.org>
date Sun, 07 Nov 1993 10:43:36 +0000
parents 60ef6d1946b0
children fb527936ca61
files lisp/comint.el
diffstat 1 files changed, 18 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/comint.el	Sun Nov 07 10:37:57 1993 +0000
+++ b/lisp/comint.el	Sun Nov 07 10:43:36 1993 +0000
@@ -124,13 +124,13 @@
 ;;;     comint-input-send	- function         ...
 ;;;     comint-eol-on-send	- boolean          ...
 ;;;     comint-process-echoes   - boolean          ...
-;;;     comint-scroll-to-bottom-on-input - symbol For scroll behaviour
+;;;     comint-scroll-to-bottom-on-input - symbol For scroll behavior
 ;;;     comint-scroll-to-bottom-on-output - symbol    ...
 ;;;     comint-scroll-show-maximum-output - boolean   ...
 ;;;
 ;;; Comint mode non-buffer local variables:
 ;;;     comint-completion-addsuffix - boolean   For file name completion
-;;;     comint-completion-autolist  - boolean       behaviour
+;;;     comint-completion-autolist  - boolean       behavior
 ;;;     comint-completion-recexact  - boolean       ...
 
 (defvar comint-prompt-regexp "^"
@@ -161,7 +161,7 @@
 
 (defvar comint-input-autoexpand 'history
   "*If non-nil, expand input command history references on completion.
-This mirrors the optional behaviour of the tcsh (its autoexpand and histlit).
+This mirrors the optional behavior of tcsh (its autoexpand and histlit).
 
 If the value is `input', then the expansion is seen on input.
 If the value is `history', then the expansion is only when inserting
@@ -172,7 +172,7 @@
 
 (defvar comint-input-ignoredups nil
   "*If non-nil, don't add input matching the last on the input ring.
-This mirrors the optional behaviour of the bash.
+This mirrors the optional behavior of bash.
 
 This variable is buffer-local.")
 
@@ -193,7 +193,7 @@
 See `comint-preinput-scroll-to-bottom'.  This variable is buffer-local.")
 
 (defvar comint-scroll-to-bottom-on-output 
-  (if (> baud-rate 9600) 'this)
+  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.
@@ -1197,17 +1197,18 @@
     (if (and process scroll (not (window-minibuffer-p selected)))
 	(walk-windows
 	 (function (lambda (window)
-	   (if (and (eq (window-buffer window) current)
-		    (or (eq scroll t) (eq scroll 'all)
-			(and (eq scroll 'this) (eq selected window))
-			(and (eq scroll 'others) (not (eq selected window)))))
+	   (if (eq (window-buffer window) current)
 	       (progn
 		 (select-window window)
-		 ;; If point WAS at process mark in this window,
-		 ;; keep it at process mark.
-		 (and (>= (point) (- (process-mark process) (length string)))
-		      (< (point) (process-mark process))
-		      (goto-char (process-mark process)))
+		 (if (or (eq scroll t) (eq scroll 'all)
+			 ;; Maybe user wants point to jump to the end.
+			 (and (eq scroll 'this) (eq selected window))
+			 (and (eq scroll 'others) (not (eq selected window)))
+			 ;; If point was at the end, keep it at the end.
+			 (and (>= (point)
+				  (- (process-mark process) (length string)))
+			      (< (point) (process-mark process))))
+		     (goto-char (process-mark process)))
 		 ;; Optionally scroll so that the text
 		 ;; ends at the bottom of the window.
 		 (if (and comint-scroll-show-maximum-output
@@ -1714,15 +1715,15 @@
 
 (defvar comint-completion-autolist nil
   "*If non-nil, automatically list possiblities on partial completion.
-This mirrors the optional behaviour of the tcsh.")
+This mirrors the optional behavior of tcsh.")
 
 (defvar comint-completion-addsuffix t
   "*If non-nil, add a `/' to completed directories, ` ' to file names.
-This mirrors the optional behaviour of the tcsh.")
+This mirrors the optional behavior of tcsh.")
 
 (defvar comint-completion-recexact nil
   "*If non-nil, use shortest completion if characters cannot be added.
-This mirrors the optional behaviour of the tcsh.
+This mirrors the optional behavior of tcsh.
 
 A non-nil value is useful if `comint-completion-autolist' is non-nil too.")