emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110433: * lisp/comint.el (comint-pre


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110433: * lisp/comint.el (comint-preinput-scroll-to-bottom): Preserve the
Date: Sun, 07 Oct 2012 20:12:26 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110433
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sun 2012-10-07 20:12:26 -0400
message:
  * lisp/comint.el (comint-preinput-scroll-to-bottom): Preserve the
  frame-selected-windows.
modified:
  lisp/ChangeLog
  lisp/comint.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-10-07 19:48:02 +0000
+++ b/lisp/ChangeLog    2012-10-08 00:12:26 +0000
@@ -1,3 +1,8 @@
+2012-10-08  Stefan Monnier  <address@hidden>
+
+       * comint.el (comint-preinput-scroll-to-bottom): Preserve the
+       frame-selected-windows.
+
 2012-10-07  Stefan Monnier  <address@hidden>
 
        * subr.el (read-passwd-map): Don't use `defconst' (bug#12597).

=== modified file 'lisp/comint.el'
--- a/lisp/comint.el    2012-10-07 15:15:16 +0000
+++ b/lisp/comint.el    2012-10-08 00:12:26 +0000
@@ -2088,8 +2088,7 @@
   (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 @@
                (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]