aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/window.el
diff options
context:
space:
mode:
authorMartin Rudalics2011-07-16 15:02:51 +0200
committerMartin Rudalics2011-07-16 15:02:51 +0200
commitbe39b8cc93dca884ea46ec92f008a1bd2f27d53e (patch)
treee9d6b5c8e5a71bc496154084b0aee970063587ca /lisp/window.el
parent03ea5b873a2f8c5d19bfe0e5682a9700e86d1160 (diff)
downloademacs-be39b8cc93dca884ea46ec92f008a1bd2f27d53e.tar.gz
emacs-be39b8cc93dca884ea46ec92f008a1bd2f27d53e.zip
To fixes wrt window selection and buffer list.
* frame.el (select-frame-set-input-focus): New argument NORECORD. * window.el (pop-to-buffer): Select window used even if it was selected before, see discussion of (Bug#8615), (Bug#6954). Pass argument NORECORD on to select-frame-set-input-focus.
Diffstat (limited to 'lisp/window.el')
-rw-r--r--lisp/window.el18
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 4f21bb05397..b4b900287e1 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -3272,7 +3272,7 @@ window."
3272(defun split-window-side-by-side (&optional size) 3272(defun split-window-side-by-side (&optional size)
3273 "Split selected window into two windows side by side. 3273 "Split selected window into two windows side by side.
3274The selected window becomes the left one and gets SIZE columns. 3274The selected window becomes the left one and gets SIZE columns.
3275SIZE negative means the right window gets -SIZE lines. 3275SIZE negative means the right window gets -SIZE columns.
3276 3276
3277SIZE includes the width of the window's scroll bar; if there are 3277SIZE includes the width of the window's scroll bar; if there are
3278no scroll bars, it includes the width of the divider column to 3278no scroll bars, it includes the width of the divider column to
@@ -5836,15 +5836,13 @@ additional information."
5836 new-window new-frame) 5836 new-window new-frame)
5837 (set-buffer buffer) 5837 (set-buffer buffer)
5838 (setq new-window (display-buffer buffer specifiers label)) 5838 (setq new-window (display-buffer buffer specifiers label))
5839 (unless (eq new-window old-window) 5839 (setq new-frame (window-frame new-window))
5840 ;; `display-buffer' has chosen another window, select it. 5840 (if (eq old-frame new-frame)
5841 (select-window new-window norecord) 5841 ;; Make sure new-window gets selected (Bug#8615), (Bug#6954).
5842 (setq new-frame (window-frame new-window)) 5842 (select-window new-window norecord)
5843 (unless (eq new-frame old-frame) 5843 ;; `display-buffer' has chosen another frame, make sure it gets
5844 ;; `display-buffer' has chosen another frame, make sure it gets 5844 ;; input focus and is risen.
5845 ;; input focus and is risen. 5845 (select-frame-set-input-focus new-frame norecord))
5846 (select-frame-set-input-focus new-frame)))
5847
5848 buffer)) 5846 buffer))
5849 5847
5850(defsubst pop-to-buffer-same-window (&optional buffer-or-name norecord label) 5848(defsubst pop-to-buffer-same-window (&optional buffer-or-name norecord label)