diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-10-07 20:12:26 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-10-07 20:12:26 -0400 |
commit | 5acd2b3ece740bbe487e9474f30665317db6f190 (patch) | |
tree | aed118c7a29524a76fb21aacc16c2daa73060359 | |
parent | 795b1482a9e314cda32d62ac2988f573d359366e (diff) | |
download | emacs-5acd2b3ece740bbe487e9474f30665317db6f190.tar.gz |
* lisp/comint.el (comint-preinput-scroll-to-bottom): Preserve the
frame-selected-windows.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/comint.el | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b0f896aa086..eaeca11ca09 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-10-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * comint.el (comint-preinput-scroll-to-bottom): Preserve the + frame-selected-windows. + 2012-10-07 Stefan Monnier <monnier@iro.umontreal.ca> * subr.el (read-passwd-map): Don't use `defconst' (bug#12597). diff --git a/lisp/comint.el b/lisp/comint.el index 080b12e0cdf..cff9afee0df 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2088,8 +2088,7 @@ This function should be a pre-command hook." (if (and comint-scroll-to-bottom-on-input (memq this-command '(self-insert-command comint-magic-space yank hilit-yank))) - (let* ((selected (selected-window)) - (current (current-buffer)) + (let* ((current (current-buffer)) (process (get-buffer-process current)) (scroll comint-scroll-to-bottom-on-input)) (if (and process (< (point) (process-mark process))) @@ -2099,10 +2098,8 @@ This function should be a pre-command hook." (lambda (window) (if (and (eq (window-buffer window) current) (or (eq scroll t) (eq scroll 'all))) - (progn - (select-window window) - (goto-char (point-max)) - (select-window selected)))) + (with-selected-window window + (goto-char (point-max))))) nil t)))))) (defvar follow-mode) |