Mercurial > emacs
changeset 98165:8b39b6502384
(pop-to-buffer): Select window before calling
select-frame-set-input-focus.
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Sat, 13 Sep 2008 08:28:47 +0000 |
parents | 2f659932a2fb |
children | 0ef7702ed365 |
files | lisp/window.el |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/window.el Sat Sep 13 08:28:04 2008 +0000 +++ b/lisp/window.el Sat Sep 13 08:28:47 2008 +0000 @@ -1053,14 +1053,13 @@ (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.