diff options
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/frame.el | 9 | ||||
| -rw-r--r-- | lisp/window.el | 18 |
3 files changed, 22 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5efd11e542b..d22a6f081cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2011-07-16 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * frame.el (select-frame-set-input-focus): New argument | ||
| 4 | NORECORD. | ||
| 5 | * window.el (pop-to-buffer): Select window used even if it was | ||
| 6 | selected before, see discussion of (Bug#8615), (Bug#6954). Pass | ||
| 7 | argument NORECORD on to select-frame-set-input-focus. | ||
| 8 | |||
| 1 | 2011-07-15 Glenn Morris <rgm@gnu.org> | 9 | 2011-07-15 Glenn Morris <rgm@gnu.org> |
| 2 | 10 | ||
| 3 | * subr.el (read-char-choice): Allow quitting. (Bug#9001) | 11 | * subr.el (read-char-choice): Allow quitting. (Bug#9001) |
diff --git a/lisp/frame.el b/lisp/frame.el index d6f82750347..8fea4f05147 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -747,12 +747,15 @@ the user during startup." | |||
| 747 | 747 | ||
| 748 | (declare-function x-focus-frame "xfns.c" (frame)) | 748 | (declare-function x-focus-frame "xfns.c" (frame)) |
| 749 | 749 | ||
| 750 | (defun select-frame-set-input-focus (frame) | 750 | (defun select-frame-set-input-focus (frame &optional norecord) |
| 751 | "Select FRAME, raise it, and set input focus, if possible. | 751 | "Select FRAME, raise it, and set input focus, if possible. |
| 752 | If `mouse-autoselect-window' is non-nil, also move mouse pointer | 752 | If `mouse-autoselect-window' is non-nil, also move mouse pointer |
| 753 | to FRAME's selected window. Otherwise, if `focus-follows-mouse' | 753 | to FRAME's selected window. Otherwise, if `focus-follows-mouse' |
| 754 | is non-nil, move mouse cursor to FRAME." | 754 | is non-nil, move mouse cursor to FRAME. |
| 755 | (select-frame frame) | 755 | |
| 756 | Optional argument NORECORD means to neither change the order of | ||
| 757 | recently selected windows nor the buffer list." | ||
| 758 | (select-frame frame norecord) | ||
| 756 | (raise-frame frame) | 759 | (raise-frame frame) |
| 757 | ;; Ensure, if possible, that FRAME gets input focus. | 760 | ;; Ensure, if possible, that FRAME gets input focus. |
| 758 | (when (memq (window-system frame) '(x w32 ns)) | 761 | (when (memq (window-system frame) '(x w32 ns)) |
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. |
| 3274 | The selected window becomes the left one and gets SIZE columns. | 3274 | The selected window becomes the left one and gets SIZE columns. |
| 3275 | SIZE negative means the right window gets -SIZE lines. | 3275 | SIZE negative means the right window gets -SIZE columns. |
| 3276 | 3276 | ||
| 3277 | SIZE includes the width of the window's scroll bar; if there are | 3277 | SIZE includes the width of the window's scroll bar; if there are |
| 3278 | no scroll bars, it includes the width of the divider column to | 3278 | no 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) |