]> git.eshelyaron.com Git - emacs.git/commitdiff
(pop-to-buffer): Select window before calling
authorMartin Rudalics <rudalics@gmx.at>
Sat, 13 Sep 2008 08:29:27 +0000 (08:29 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Sat, 13 Sep 2008 08:29:27 +0000 (08:29 +0000)
select-frame-set-input-focus.

lisp/ChangeLog
lisp/window.el

index b8469f6a2e6c09da4310dfbec3008a9a68150ab6..759f68983556a305e2375a3c507579b5d659ff18 100644 (file)
@@ -1,3 +1,10 @@
+2008-09-13  Martin Rudalics  <rudalics@gmx.at>
+
+       * 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  <Roland.Winkler@physik.uni-erlangen.de>
 
        * proced.el (proced-sort-header): New face.
index 8f208208744b9fe2c67937c166ce9ae6910de346..d338aa20fcd15065f1e31a41470a62deeeceb860 100644 (file)
@@ -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.