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:
0)
(display-buffer-reuse-frames 0)
(t (last-nonminibuffer-frame))))
+ (previous-window (cdr (assq 'previous-window alist)))
best-window second-best-window window)
;; Scan windows whether they have shown the buffer recently.
(catch 'best
(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)
(window-live-p window)
(or (eq buffer (window-buffer window))
(not (window-dedicated-p window))))