Mercurial > emacs
comparison lisp/comint.el @ 4947:e495404b5263
(comint-postoutput-scroll-to-bottom):
Don't alter point in a window if it's after the process-mark.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 10 Nov 1993 00:38:47 +0000 |
parents | d9ad390ef4e3 |
children | 4b50104fbdec |
comparison
equal
deleted
inserted
replaced
4946:6aeb2c705774 | 4947:e495404b5263 |
---|---|
1195 (walk-windows | 1195 (walk-windows |
1196 (function (lambda (window) | 1196 (function (lambda (window) |
1197 (if (eq (window-buffer window) current) | 1197 (if (eq (window-buffer window) current) |
1198 (progn | 1198 (progn |
1199 (select-window window) | 1199 (select-window window) |
1200 (if (or (eq scroll t) (eq scroll 'all) | 1200 (if (and (< (point) (process-mark process)) |
1201 ;; Maybe user wants point to jump to the end. | 1201 (or (eq scroll t) (eq scroll 'all) |
1202 (and (eq scroll 'this) (eq selected window)) | 1202 ;; Maybe user wants point to jump to the end. |
1203 (and (eq scroll 'others) (not (eq selected window))) | 1203 (and (eq scroll 'this) (eq selected window)) |
1204 ;; If point was at the end, keep it at the end. | 1204 (and (eq scroll 'others) (not (eq selected window))) |
1205 (and (>= (point) | 1205 ;; If point was at the end, keep it at the end. |
1206 (- (process-mark process) (length string))) | 1206 (>= (point) |
1207 (< (point) (process-mark process)))) | 1207 (- (process-mark process) (length string))))) |
1208 (goto-char (process-mark process))) | 1208 (goto-char (process-mark process))) |
1209 ;; Optionally scroll so that the text | 1209 ;; Optionally scroll so that the text |
1210 ;; ends at the bottom of the window. | 1210 ;; ends at the bottom of the window. |
1211 (if (and comint-scroll-show-maximum-output | 1211 (if (and comint-scroll-show-maximum-output |
1212 (>= (point) (process-mark process))) | 1212 (>= (point) (process-mark process))) |