[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50576: 28.0.50; display-buffer-in-previous-window no longer accepts
From: |
Juri Linkov |
Subject: |
bug#50576: 28.0.50; display-buffer-in-previous-window no longer accepts window value for previous-window |
Date: |
Tue, 14 Sep 2021 09:35:48 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> It seems the patch in this message:
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45688#116
>
> which was installed causes the function
> display-buffer-in-previous-window to fail when called with an alist
> having the previous-window key set to a window value, because it calls
> boundp on the value unconditionally rather than checking the type of
> the value.
Sorry, this was a wrong assumption. Does this patch correctly fix it?
diff --git a/lisp/window.el b/lisp/window.el
index 2960384e15..1c795cf684 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -8363,7 +8363,7 @@ display-buffer-in-previous-window
(throw 'best t)))))
;; When ALIST has a `previous-window' entry, that entry may override
;; anything we found so far.
- (when (and previous-window (boundp previous-window))
+ (when (and previous-window (symbolp previous-window) (boundp
previous-window))
(setq previous-window (symbol-value previous-window)))
(when (and (setq window previous-window)
(window-live-p window)