diff options
| author | Sam Steingold | 2012-03-21 12:01:18 -0400 |
|---|---|---|
| committer | Sam Steingold | 2012-03-21 12:01:18 -0400 |
| commit | 087bbb4cac855da186b81ffc92457079a0adfc28 (patch) | |
| tree | df3ad5379a0106403ee0ee5c8a0217edba85a85c | |
| parent | 136220349968063bef3f249baddba30a24b52ec2 (diff) | |
| download | emacs-087bbb4cac855da186b81ffc92457079a0adfc28.tar.gz emacs-087bbb4cac855da186b81ffc92457079a0adfc28.zip | |
* lisp/window.el (switch-to-prev-buffer): Do not switch to a visible
window previous buffer, just like with the frame previous buffers.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/window.el | 11 |
2 files changed, 12 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea7d81bb969..50a9e61bf4c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-03-21 Sam Steingold <sds@gnu.org> | ||
| 2 | |||
| 3 | * window.el (switch-to-prev-buffer): Do not switch to a visible | ||
| 4 | window previous buffer, just like with the frame previous buffers. | ||
| 5 | |||
| 1 | 2012-03-21 Chong Yidong <cyd@gnu.org> | 6 | 2012-03-21 Chong Yidong <cyd@gnu.org> |
| 2 | 7 | ||
| 3 | * faces.el (make-face, make-empty-face, copy-face): | 8 | * faces.el (make-face, make-empty-face, copy-face): |
diff --git a/lisp/window.el b/lisp/window.el index f79041e0e6c..894d113cdc7 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -2600,11 +2600,14 @@ shall not be switched to in future invocations of this command." | |||
| 2600 | (not (setq killed-buffers | 2600 | (not (setq killed-buffers |
| 2601 | (cons new-buffer killed-buffers)))) | 2601 | (cons new-buffer killed-buffers)))) |
| 2602 | (not (eq new-buffer old-buffer)) | 2602 | (not (eq new-buffer old-buffer)) |
| 2603 | (or bury-or-kill | 2603 | (or bury-or-kill |
| 2604 | (not (memq new-buffer next-buffers)))) | 2604 | (not (memq new-buffer next-buffers)))) |
| 2605 | (set-window-buffer-start-and-point | 2605 | (if (get-buffer-window new-buffer) |
| 2606 | window new-buffer (nth 1 entry) (nth 2 entry)) | 2606 | ;; Try to avoid showing a buffer visible in some other window. |
| 2607 | (throw 'found t))) | 2607 | (setq visible new-buffer) |
| 2608 | (set-window-buffer-start-and-point | ||
| 2609 | window new-buffer (nth 1 entry) (nth 2 entry)) | ||
| 2610 | (throw 'found t)))) | ||
| 2608 | ;; Scan reverted buffer list of WINDOW's frame next, skipping | 2611 | ;; Scan reverted buffer list of WINDOW's frame next, skipping |
| 2609 | ;; entries of next buffers. Note that when we bury or kill a | 2612 | ;; entries of next buffers. Note that when we bury or kill a |
| 2610 | ;; buffer we don't reverse the global buffer list to avoid showing | 2613 | ;; buffer we don't reverse the global buffer list to avoid showing |