emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stop frames stealing eachothers' minibuffers!


From: Eli Zaretskii
Subject: Re: Stop frames stealing eachothers' minibuffers!
Date: Mon, 02 Nov 2020 19:19:18 +0200

> Date: Sun, 1 Nov 2020 19:53:13 +0000
> Cc: emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
> 
>   /* Empty out the minibuffers of all frames, except those frames
>      where there is an active minibuffer.
>      Set them to point to ` *Minibuf-0*', which is always empty.  */
>   empty_minibuf = get_minibuffer (0);
> 
>   FOR_EACH_FRAME (dummy, frame)
>     {
>       Lisp_Object root_window = Fframe_root_window (frame);
>       Lisp_Object mini_window = XWINDOW (root_window)->next;
>       Lisp_Object buffer;
> 
>       if (!NILP (mini_window) && !EQ (mini_window, minibuf_window)
>           && !NILP (Fwindow_minibuffer_p (mini_window)))
>         {
>           buffer = XWINDOW (mini_window)->contents;
>           if (NILP (Fminibufferp (buffer, Qt)))       
> <========================
>             /* Use set_window_buffer instead of Fset_window_buffer (see
>                discussion of bug#11984, bug#12025, bug#12026).  */
>             set_window_buffer (mini_window, empty_minibuf, 0, 0);
>         }
>     }
> 
> Here Fminibufferp (with the new argument Qt) tests for an active
> minibuffer.  This code appears to work well.

Please just use the guts of Fminibufferp; the tests it does on its
argument are not needed here.  Also, won't this condition catch
*Minibuf-0* as well?



reply via email to

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