+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).
(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)))
(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)