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).
This commit is contained in:
Martin Rudalics 2019-06-11 09:28:29 +02:00
parent add2cac586
commit 5ca093d281
2 changed files with 8 additions and 2 deletions

View file

@ -2597,6 +2597,9 @@ If @var{alist} has a @code{previous-window} entry and the window
specified by that entry is live and not dedicated to another buffer, specified by that entry is live and not dedicated to another buffer,
that window will be preferred, even if it never showed @var{buffer} that window will be preferred, even if it never showed @var{buffer}
before. before.
This function will not choose the selected window if it finds another
eligible window that has shown @var{buffer} previously.
@end defun @end defun
@defun display-buffer-use-some-window buffer alist @defun display-buffer-use-some-window buffer alist

View file

@ -7473,8 +7473,11 @@ selected frame if `display-buffer-reuse-frames' and
terminal if either of those variables is non-nil. terminal if either of those variables is non-nil.
If ALIST has a `previous-window' entry, the window specified by If ALIST has a `previous-window' entry, the window specified by
that entry will override any other window found by the methods that entry may override any other window found by the methods
above, even if that window never showed BUFFER before." above, even if that window never showed BUFFER before.
Avoid using the selected window if another eligible window has
shown BUFFER before."
(let* ((alist-entry (assq 'reusable-frames alist)) (let* ((alist-entry (assq 'reusable-frames alist))
(inhibit-same-window (inhibit-same-window
(cdr (assq 'inhibit-same-window alist))) (cdr (assq 'inhibit-same-window alist)))