aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-11-07 10:43:36 +0000
committerRichard M. Stallman1993-11-07 10:43:36 +0000
commitfdb7791dfaa3f6aea7429b64117ae12a96436539 (patch)
tree4ecd2117eb2515a02a25652aa56fd56afa9a809c
parent4d524b08a3ff77064454a1512cb6e604a0ee533d (diff)
downloademacs-fdb7791dfaa3f6aea7429b64117ae12a96436539.tar.gz
emacs-fdb7791dfaa3f6aea7429b64117ae12a96436539.zip
(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.
-rw-r--r--lisp/comint.el35
1 files changed, 18 insertions, 17 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 7bea60b5409..a244aadf659 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -124,13 +124,13 @@
124;;; comint-input-send - function ... 124;;; comint-input-send - function ...
125;;; comint-eol-on-send - boolean ... 125;;; comint-eol-on-send - boolean ...
126;;; comint-process-echoes - boolean ... 126;;; comint-process-echoes - boolean ...
127;;; comint-scroll-to-bottom-on-input - symbol For scroll behaviour 127;;; comint-scroll-to-bottom-on-input - symbol For scroll behavior
128;;; comint-scroll-to-bottom-on-output - symbol ... 128;;; comint-scroll-to-bottom-on-output - symbol ...
129;;; comint-scroll-show-maximum-output - boolean ... 129;;; comint-scroll-show-maximum-output - boolean ...
130;;; 130;;;
131;;; Comint mode non-buffer local variables: 131;;; Comint mode non-buffer local variables:
132;;; comint-completion-addsuffix - boolean For file name completion 132;;; comint-completion-addsuffix - boolean For file name completion
133;;; comint-completion-autolist - boolean behaviour 133;;; comint-completion-autolist - boolean behavior
134;;; comint-completion-recexact - boolean ... 134;;; comint-completion-recexact - boolean ...
135 135
136(defvar comint-prompt-regexp "^" 136(defvar comint-prompt-regexp "^"
@@ -161,7 +161,7 @@ This is a good thing to set in mode hooks.")
161 161
162(defvar comint-input-autoexpand 'history 162(defvar comint-input-autoexpand 'history
163 "*If non-nil, expand input command history references on completion. 163 "*If non-nil, expand input command history references on completion.
164This mirrors the optional behaviour of the tcsh (its autoexpand and histlit). 164This mirrors the optional behavior of tcsh (its autoexpand and histlit).
165 165
166If the value is `input', then the expansion is seen on input. 166If the value is `input', then the expansion is seen on input.
167If the value is `history', then the expansion is only when inserting 167If the value is `history', then the expansion is only when inserting
@@ -172,7 +172,7 @@ This variable is buffer-local.")
172 172
173(defvar comint-input-ignoredups nil 173(defvar comint-input-ignoredups nil
174 "*If non-nil, don't add input matching the last on the input ring. 174 "*If non-nil, don't add input matching the last on the input ring.
175This mirrors the optional behaviour of the bash. 175This mirrors the optional behavior of bash.
176 176
177This variable is buffer-local.") 177This variable is buffer-local.")
178 178
@@ -193,7 +193,7 @@ The default nil.
193See `comint-preinput-scroll-to-bottom'. This variable is buffer-local.") 193See `comint-preinput-scroll-to-bottom'. This variable is buffer-local.")
194 194
195(defvar comint-scroll-to-bottom-on-output 195(defvar comint-scroll-to-bottom-on-output
196 (if (> baud-rate 9600) 'this) 196 nil
197 "*Controls whether interpreter output causes window to scroll. 197 "*Controls whether interpreter output causes window to scroll.
198If nil, then do not scroll. If t or `all', scroll all windows showing buffer. 198If nil, then do not scroll. If t or `all', scroll all windows showing buffer.
199If `this', scroll only the selected window. 199If `this', scroll only the selected window.
@@ -1197,17 +1197,18 @@ This function should be in the list `comint-output-filter-functions'."
1197 (if (and process scroll (not (window-minibuffer-p selected))) 1197 (if (and process scroll (not (window-minibuffer-p selected)))
1198 (walk-windows 1198 (walk-windows
1199 (function (lambda (window) 1199 (function (lambda (window)
1200 (if (and (eq (window-buffer window) current) 1200 (if (eq (window-buffer window) current)
1201 (or (eq scroll t) (eq scroll 'all)
1202 (and (eq scroll 'this) (eq selected window))
1203 (and (eq scroll 'others) (not (eq selected window)))))
1204 (progn 1201 (progn
1205 (select-window window) 1202 (select-window window)
1206 ;; If point WAS at process mark in this window, 1203 (if (or (eq scroll t) (eq scroll 'all)
1207 ;; keep it at process mark. 1204 ;; Maybe user wants point to jump to the end.
1208 (and (>= (point) (- (process-mark process) (length string))) 1205 (and (eq scroll 'this) (eq selected window))
1209 (< (point) (process-mark process)) 1206 (and (eq scroll 'others) (not (eq selected window)))
1210 (goto-char (process-mark process))) 1207 ;; If point was at the end, keep it at the end.
1208 (and (>= (point)
1209 (- (process-mark process) (length string)))
1210 (< (point) (process-mark process))))
1211 (goto-char (process-mark process)))
1211 ;; Optionally scroll so that the text 1212 ;; Optionally scroll so that the text
1212 ;; ends at the bottom of the window. 1213 ;; ends at the bottom of the window.
1213 (if (and comint-scroll-show-maximum-output 1214 (if (and comint-scroll-show-maximum-output
@@ -1714,15 +1715,15 @@ See `comint-prompt-regexp'."
1714 1715
1715(defvar comint-completion-autolist nil 1716(defvar comint-completion-autolist nil
1716 "*If non-nil, automatically list possiblities on partial completion. 1717 "*If non-nil, automatically list possiblities on partial completion.
1717This mirrors the optional behaviour of the tcsh.") 1718This mirrors the optional behavior of tcsh.")
1718 1719
1719(defvar comint-completion-addsuffix t 1720(defvar comint-completion-addsuffix t
1720 "*If non-nil, add a `/' to completed directories, ` ' to file names. 1721 "*If non-nil, add a `/' to completed directories, ` ' to file names.
1721This mirrors the optional behaviour of the tcsh.") 1722This mirrors the optional behavior of tcsh.")
1722 1723
1723(defvar comint-completion-recexact nil 1724(defvar comint-completion-recexact nil
1724 "*If non-nil, use shortest completion if characters cannot be added. 1725 "*If non-nil, use shortest completion if characters cannot be added.
1725This mirrors the optional behaviour of the tcsh. 1726This mirrors the optional behavior of tcsh.
1726 1727
1727A non-nil value is useful if `comint-completion-autolist' is non-nil too.") 1728A non-nil value is useful if `comint-completion-autolist' is non-nil too.")
1728 1729