# HG changeset patch # User Martin Rudalics # Date 1221294527 0 # Node ID 8b39b6502384490296ae752443e409fa0358ee5b # Parent 2f659932a2fbebb834ac33467fa807b9931059e7 (pop-to-buffer): Select window before calling select-frame-set-input-focus. diff -r 2f659932a2fb -r 8b39b6502384 lisp/window.el --- 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.