aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/window.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 6e4571167ea..a4ed9ea7216 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -3874,12 +3874,10 @@ before was current this also makes BUFFER the current buffer."
3874(defcustom switch-to-visible-buffer t 3874(defcustom switch-to-visible-buffer t
3875 "If non-nil, allow switching to an already visible buffer. 3875 "If non-nil, allow switching to an already visible buffer.
3876If this variable is non-nil, `switch-to-prev-buffer' and 3876If this variable is non-nil, `switch-to-prev-buffer' and
3877`switch-to-next-buffer' may switch to an already visible buffer 3877`switch-to-next-buffer' may switch to an already visible buffer.
3878provided the buffer was shown before in the window specified as 3878If this variable is nil, `switch-to-prev-buffer' and
3879argument to those functions. If this variable is nil, 3879`switch-to-next-buffer' always try to avoid switching to a buffer
3880`switch-to-prev-buffer' and `switch-to-next-buffer' always try to 3880that is already visible in another window on the same frame."
3881avoid switching to a buffer that is already visible in another
3882window on the same frame."
3883 :type 'boolean 3881 :type 'boolean
3884 :version "24.1" 3882 :version "24.1"
3885 :group 'windows) 3883 :group 'windows)
@@ -3950,7 +3948,8 @@ to it."
3950 (or (null pred) (funcall pred buffer)) 3948 (or (null pred) (funcall pred buffer))
3951 (not (eq (aref (buffer-name buffer) 0) ?\s)) 3949 (not (eq (aref (buffer-name buffer) 0) ?\s))
3952 (or bury-or-kill (not (memq buffer next-buffers)))) 3950 (or bury-or-kill (not (memq buffer next-buffers))))
3953 (if (get-buffer-window buffer frame) 3951 (if (and (not switch-to-visible-buffer)
3952 (get-buffer-window buffer frame))
3954 ;; Try to avoid showing a buffer visible in some other window. 3953 ;; Try to avoid showing a buffer visible in some other window.
3955 (unless visible 3954 (unless visible
3956 (setq visible buffer)) 3955 (setq visible buffer))
@@ -4052,7 +4051,8 @@ found."
4052 (or (null pred) (funcall pred buffer)) 4051 (or (null pred) (funcall pred buffer))
4053 (not (eq (aref (buffer-name buffer) 0) ?\s)) 4052 (not (eq (aref (buffer-name buffer) 0) ?\s))
4054 (not (assq buffer (window-prev-buffers window)))) 4053 (not (assq buffer (window-prev-buffers window))))
4055 (if (get-buffer-window buffer frame) 4054 (if (and (not switch-to-visible-buffer)
4055 (get-buffer-window buffer frame))
4056 ;; Try to avoid showing a buffer visible in some other window. 4056 ;; Try to avoid showing a buffer visible in some other window.
4057 (setq visible buffer) 4057 (setq visible buffer)
4058 (setq new-buffer buffer) 4058 (setq new-buffer buffer)