[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#55684: 29.0.50; wrong-type-argument in minibuffer-only frames
From: |
Eli Zaretskii |
Subject: |
bug#55684: 29.0.50; wrong-type-argument in minibuffer-only frames |
Date: |
Sat, 28 May 2022 13:57:25 +0300 |
> Date: Sat, 28 May 2022 10:51:25 +0000
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
> martin rudalics <rudalics@gmx.at>, 55684@debbugs.gnu.org, acm@muc.de
> From: Alan Mackenzie <acm@muc.de>
>
> Hello, Eli.
>
> On Sat, May 28, 2022 at 08:56:04 +0300, Eli Zaretskii wrote:
> > > Cc: Alan Mackenzie <acm@muc.de>
> > > Date: Fri, 27 May 2022 16:09:13 -0400
> > > From: Stefan Monnier via "Bug reports for GNU Emacs,
> > > the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> > > Package: Emacs
> > > Version: 29.0.50
>
> > Doesn't the same problem exist on the emacs-28 branch? I can
> > reproduce it there.
>
> > > - Fset_frame_selected_window (frame, call1 (Qget_mru_window, frame),
> > > Qnil);
> > > + {
> > > + Lisp_Object w = call1 (Qget_mru_window, frame);
> > > + if (!NILP (w)) /* Can be nil in minibuffer-only frames.
> > > */
> > > + Fset_frame_selected_window (frame, w, Qnil);
>
> > The NILP(w) test should probably be WINDOW_LIVE_P(w). Martin, do you
> > agree?
>
> I'm not Martin, but I think WINDOW_LIVE is safe, but might not be
> needed. I think get-mru-window will only return a live window or nil.
It starts with a list of live windows, that's true, but who will
guarantee that while it's processing some window cannot be deleted?
WINDOW_LIVE_P is not expensive enough to make such assumptions.
In any case, even if we are sure a window returned by get-mru-window
I'd prefer to use WINDOWP instead of NILP here.
bug#55684: 29.0.50; wrong-type-argument in minibuffer-only frames, Alan Mackenzie, 2022/05/28