unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Adam Porter <adam@alphapapa.net>
Cc: 50576@debbugs.gnu.org
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	[thread overview]
Message-ID: <87wnnju1gr.fsf@mail.linkov.net> (raw)
In-Reply-To: <CAO_b3FUXhMDcMkdRZkAu_bXRnQbX489e9jQWZPSy7-i86t6Muw@mail.gmail.com> (Adam Porter's message of "Mon, 13 Sep 2021 19:43:34 -0500")

> 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)





  reply	other threads:[~2021-09-14  6:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14  0:43 bug#50576: 28.0.50; display-buffer-in-previous-window no longer accepts window value for previous-window Adam Porter
2021-09-14  6:35 ` Juri Linkov [this message]
2021-09-14 13:37   ` Adam Porter
2021-09-15  6:48     ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnnju1gr.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=50576@debbugs.gnu.org \
    --cc=adam@alphapapa.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).