Skip to content

Commit 5ca093d

Browse files
author
Martin Rudalics
committed
Fix doc of 'display-buffer-in-previous-window' (Bug#36161)
* doc/lispref/windows.texi (Buffer Display Action Functions): * lisp/window.el (display-buffer-in-previous-window): Tell that 'display-buffer-in-previous-window' prefers non-selected windows (Bug#36161).
1 parent add2cac commit 5ca093d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

doc/lispref/windows.texi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2597,6 +2597,9 @@ If @var{alist} has a @code{previous-window} entry and the window
25972597
specified by that entry is live and not dedicated to another buffer,
25982598
that window will be preferred, even if it never showed @var{buffer}
25992599
before.
2600+
2601+
This function will not choose the selected window if it finds another
2602+
eligible window that has shown @var{buffer} previously.
26002603
@end defun
26012604

26022605
@defun display-buffer-use-some-window buffer alist

lisp/window.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7473,8 +7473,11 @@ selected frame if `display-buffer-reuse-frames' and
74737473
terminal if either of those variables is non-nil.
74747474

74757475
If ALIST has a `previous-window' entry, the window specified by
7476-
that entry will override any other window found by the methods
7477-
above, even if that window never showed BUFFER before."
7476+
that entry may override any other window found by the methods
7477+
above, even if that window never showed BUFFER before.
7478+
7479+
Avoid using the selected window if another eligible window has
7480+
shown BUFFER before."
74787481
(let* ((alist-entry (assq 'reusable-frames alist))
74797482
(inhibit-same-window
74807483
(cdr (assq 'inhibit-same-window alist)))

0 commit comments

Comments
 (0)