[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107639: * lisp/window.el (switch-to-
From: |
Sam Steingold |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107639: * lisp/window.el (switch-to-prev-buffer): Do not switch to a visible |
Date: |
Wed, 21 Mar 2012 12:01:18 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107639
committer: Sam Steingold <address@hidden>
branch nick: trunk
timestamp: Wed 2012-03-21 12:01:18 -0400
message:
* lisp/window.el (switch-to-prev-buffer): Do not switch to a visible
window previous buffer, just like with the frame previous buffers.
modified:
lisp/ChangeLog
lisp/window.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-03-21 07:02:13 +0000
+++ b/lisp/ChangeLog 2012-03-21 16:01:18 +0000
@@ -1,3 +1,8 @@
+2012-03-21 Sam Steingold <address@hidden>
+
+ * window.el (switch-to-prev-buffer): Do not switch to a visible
+ window previous buffer, just like with the frame previous buffers.
+
2012-03-21 Chong Yidong <address@hidden>
* faces.el (make-face, make-empty-face, copy-face):
=== modified file 'lisp/window.el'
--- a/lisp/window.el 2012-03-11 13:30:30 +0000
+++ b/lisp/window.el 2012-03-21 16:01:18 +0000
@@ -2600,11 +2600,14 @@
(not (setq killed-buffers
(cons new-buffer killed-buffers))))
(not (eq new-buffer old-buffer))
- (or bury-or-kill
+ (or bury-or-kill
(not (memq new-buffer next-buffers))))
- (set-window-buffer-start-and-point
- window new-buffer (nth 1 entry) (nth 2 entry))
- (throw 'found t)))
+ (if (get-buffer-window new-buffer)
+ ;; Try to avoid showing a buffer visible in some other window.
+ (setq visible new-buffer)
+ (set-window-buffer-start-and-point
+ window new-buffer (nth 1 entry) (nth 2 entry))
+ (throw 'found t))))
;; Scan reverted buffer list of WINDOW's frame next, skipping
;; entries of next buffers. Note that when we bury or kill a
;; buffer we don't reverse the global buffer list to avoid showing
- [Emacs-diffs] /srv/bzr/emacs/trunk r107639: * lisp/window.el (switch-to-prev-buffer): Do not switch to a visible,
Sam Steingold <=