diff options
| -rw-r--r-- | doc/lispref/windows.texi | 3 | ||||
| -rw-r--r-- | lisp/window.el | 7 |
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 | |||
| 2597 | specified by that entry is live and not dedicated to another buffer, | 2597 | specified by that entry is live and not dedicated to another buffer, |
| 2598 | that window will be preferred, even if it never showed @var{buffer} | 2598 | that window will be preferred, even if it never showed @var{buffer} |
| 2599 | before. | 2599 | before. |
| 2600 | |||
| 2601 | This function will not choose the selected window if it finds another | ||
| 2602 | eligible 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 | |||
| 7473 | terminal if either of those variables is non-nil. | 7473 | terminal if either of those variables is non-nil. |
| 7474 | 7474 | ||
| 7475 | If ALIST has a `previous-window' entry, the window specified by | 7475 | If ALIST has a `previous-window' entry, the window specified by |
| 7476 | that entry will override any other window found by the methods | 7476 | that entry may override any other window found by the methods |
| 7477 | above, even if that window never showed BUFFER before." | 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." | ||
| 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))) |