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: Wed, 04 Nov 2020 18:47:10 +0200

> Date: Tue, 3 Nov 2020 21:08:53 +0000
> Cc: emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
> 
> OK, I've extracted a new function `live_minibuffer_p'  from Fminibufferp,
> and call that directly from the mini-window emptying code.  (The new
> second parameter in Fminibufferp is still needed, since it is used in
> minibuffer.el.)
> 
> Here's a patch of the subset of changes to minibuf.c which are relevant
> to our discussions of the last two or three days.  Perhaps we are close
> to the stage when this could be committed to master.

Yes, I think so.

> +  if (EQ (buffer, Fcar (Vminibuffer_list)))
> +    /*  *Minibuf-0* is never active.  */
> +    return false;
> +  tem = Fcdr (Vminibuffer_list);
> +  for (i = 1; i <= minibuf_level; i++, tem = Fcdr (tem))
> +    if (EQ (Fcar (tem), buffer))
> +      return true;
> +  return false;

I'm curious: why a loop instead of a call to Fmemq?



reply via email to

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