[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master fb05199: Support variable name for previous-window in display-buf
master fb05199: Support variable name for previous-window in display-buffer-in-previous-window
Wed, 27 Jan 2021 04:35:26 -0500 (EST)
Author: Juri Linkov <firstname.lastname@example.org>
Commit: Juri Linkov <email@example.com>
Support variable name for previous-window in
* lisp/window.el (display-buffer-in-previous-window): Support the value of
'previous-window' entry as a symbol for variable name (bug#45688).
lisp/window.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lisp/window.el b/lisp/window.el
index 0a37d16..d587691 100644
@@ -8196,8 +8196,8 @@ such alists.
If ALIST has a non-nil `inhibit-same-window' entry, the selected
window is not usable. A dedicated window is usable only if it
already shows BUFFER. If ALIST contains a `previous-window'
-entry, the window specified by that entry is usable even if it
-never showed BUFFER before.
+entry, the window specified by that entry (either a variable
+or a value) is usable even if it never showed BUFFER before.
If ALIST contains a `reusable-frames' entry, its value determines
which frames to search for a usable window:
@@ -8239,6 +8239,7 @@ indirectly called by the latter."
+ (previous-window (cdr (assq 'previous-window alist)))
best-window second-best-window window)
;; Scan windows whether they have shown the buffer recently.
@@ -8252,7 +8253,9 @@ indirectly called by the latter."
(throw 'best t)))))
;; When ALIST has a `previous-window' entry, that entry may override
;; anything we found so far.
- (when (and (setq window (cdr (assq 'previous-window alist)))
+ (when (and previous-window (boundp previous-window))
+ (setq previous-window (symbol-value previous-window)))
+ (when (and (setq window previous-window)
(or (eq buffer (window-buffer window))
(not (window-dedicated-p window))))
|[Prev in Thread]
||[Next in Thread]|
- master fb05199: Support variable name for previous-window in display-buffer-in-previous-window,
Juri Linkov <=