bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Alan Mackenzie
Subject: bug#55684: 29.0.50; wrong-type-argument in minibuffer-only frames
Date: Sat, 28 May 2022 13:09:17 +0000

Hello, Eli.

On Sat, May 28, 2022 at 13:57:25 +0300, Eli Zaretskii wrote:
> > 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.

That makes sense.

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

I've committed Stefan's patch, amended with WINDOW_LIVE_P and an extra
comment to the emacs-28 branch.

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]