From: Martin Rudalics Date: Sat, 13 Sep 2008 08:29:27 +0000 (+0000) Subject: (pop-to-buffer): Select window before calling X-Git-Tag: emacs-pretest-23.0.90~2904 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c1567cc72d17834f05d2c81d7457b8d249a2a71d;p=emacs.git (pop-to-buffer): Select window before calling select-frame-set-input-focus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b8469f6a2e6..759f6898355 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2008-09-13 Martin Rudalics + + * frame.el (select-frame-set-input-focus): With focus follows + mouse move mouse cursor to right window. + * window.el (pop-to-buffer): Select window before calling + select-frame-set-input-focus. + 2008-09-12 Roland Winkler * proced.el (proced-sort-header): New face. 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.