summaryrefslogtreecommitdiff
path: root/lisp/window.el
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2008-09-13 08:29:27 +0000
committerMartin Rudalics <rudalics@gmx.at>2008-09-13 08:29:27 +0000
commitc1567cc72d17834f05d2c81d7457b8d249a2a71d (patch)
tree1f6a3bbad1753672a88e168e5ee4bfcfa0d7cbd8 /lisp/window.el
parentb0c7121cabe1cc5f4df12c3acd4354d4a5c5f042 (diff)
downloademacs-c1567cc72d17834f05d2c81d7457b8d249a2a71d.tar.gz
(pop-to-buffer): Select window before calling
select-frame-set-input-focus.
Diffstat (limited to 'lisp/window.el')
-rw-r--r--lisp/window.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 8f208208744..d338aa20fcd 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1053,14 +1053,13 @@ at the front of the list of recently selected ones."
(set-buffer buffer)
(setq new-window (display-buffer buffer other-window) norecord)
(unless (eq new-window old-window)
- ;; `display-buffer' has chosen another window.
+ ;; `display-buffer' has chosen another window, select it.
+ (select-window new-window)
(setq new-frame (window-frame new-window))
(unless (eq new-frame old-frame)
;; `display-buffer' has chosen another frame, make sure it gets
;; input focus and is risen.
- (select-frame-set-input-focus new-frame))
- ;; Make sure the window chosen by `display-buffer' gets selected.
- (select-window new-window))
+ (select-frame-set-input-focus new-frame)))
buffer))
;; I think this should be the default; I think people will prefer it--rms.