aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/lispref/windows.texi3
-rw-r--r--lisp/window.el7
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index b2dd3d99583..3116659cd03 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -2597,6 +2597,9 @@ If @var{alist} has a @code{previous-window} entry and the window
2597specified by that entry is live and not dedicated to another buffer, 2597specified by that entry is live and not dedicated to another buffer,
2598that window will be preferred, even if it never showed @var{buffer} 2598that window will be preferred, even if it never showed @var{buffer}
2599before. 2599before.
2600
2601This function will not choose the selected window if it finds another
2602eligible window that has shown @var{buffer} previously.
2600@end defun 2603@end defun
2601 2604
2602@defun display-buffer-use-some-window buffer alist 2605@defun display-buffer-use-some-window buffer alist
diff --git a/lisp/window.el b/lisp/window.el
index 58e22a2306a..c2d5b02be05 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7473,8 +7473,11 @@ selected frame if `display-buffer-reuse-frames' and
7473terminal if either of those variables is non-nil. 7473terminal if either of those variables is non-nil.
7474 7474
7475If ALIST has a `previous-window' entry, the window specified by 7475If ALIST has a `previous-window' entry, the window specified by
7476that entry will override any other window found by the methods 7476that entry may override any other window found by the methods
7477above, even if that window never showed BUFFER before." 7477above, even if that window never showed BUFFER before.
7478
7479Avoid using the selected window if another eligible window has
7480shown BUFFER before."
7478 (let* ((alist-entry (assq 'reusable-frames alist)) 7481 (let* ((alist-entry (assq 'reusable-frames alist))
7479 (inhibit-same-window 7482 (inhibit-same-window
7480 (cdr (assq 'inhibit-same-window alist))) 7483 (cdr (assq 'inhibit-same-window alist)))