From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Stop frames stealing eachothers' minibuffers! Date: Wed, 04 Nov 2020 18:47:10 +0200 Message-ID: <83ft5pax2p.fsf@gnu.org> References: <20201031161422.GA5887@ACM> <83d00ygx9c.fsf@gnu.org> <20201031194419.GC5887@ACM> <834kmago8m.fsf@gnu.org> <20201031203914.GD5887@ACM> <835z6ogc1h.fsf@gnu.org> <20201101195313.GA6190@ACM> <83sg9rd6cp.fsf@gnu.org> <20201102185147.GC7297@ACM> <83mtzzd0s3.fsf@gnu.org> <20201103210853.GA21923@ACM> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20360"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 04 17:48:27 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kaLxS-0005CV-IR for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Nov 2020 17:48:26 +0100 Original-Received: from localhost ([::1]:41164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaLxR-0007Hs-HC for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Nov 2020 11:48:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaLwL-0005wr-Hp for emacs-devel@gnu.org; Wed, 04 Nov 2020 11:47:17 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43062) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaLwK-0002vc-Ky; Wed, 04 Nov 2020 11:47:16 -0500 Original-Received: from [176.228.60.248] (port=4491 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kaLwI-0000Wo-V7; Wed, 04 Nov 2020 11:47:15 -0500 In-Reply-To: <20201103210853.GA21923@ACM> (message from Alan Mackenzie on Tue, 3 Nov 2020 21:08:53 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:258686 Archived-At: > Date: Tue, 3 Nov 2020 21:08:53 +0000 > Cc: emacs-devel@gnu.org > From: Alan Mackenzie > > 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?