From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#48925: [PATCH] Set `minibuffer-completion-*` variables buffer-locally in a few more places Date: Thu, 11 Nov 2021 14:04:17 +0100 Message-ID: <87k0hehmi6.fsf@miha-pc> References: <87fsxstdiy.fsf@miha-pc> <87czn79smi.fsf@gnus.org> <87mtmbgehx.fsf@miha-pc> <83lf1v0w6y.fsf@gnu.org> Reply-To: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35777"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, monnier@iro.umontreal.ca, 48925@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 11 14:03:25 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ml9jh-00097B-5A for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Nov 2021 14:03:25 +0100 Original-Received: from localhost ([::1]:55652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ml9jg-0001Gn-5P for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Nov 2021 08:03:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ml9gQ-0005gp-Ss for bug-gnu-emacs@gnu.org; Thu, 11 Nov 2021 08:00:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57069) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ml9gQ-0003Uj-Ec for bug-gnu-emacs@gnu.org; Thu, 11 Nov 2021 08:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ml9gQ-0002ju-C8 for bug-gnu-emacs@gnu.org; Thu, 11 Nov 2021 08:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Nov 2021 13:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48925 X-GNU-PR-Package: emacs Original-Received: via spool by 48925-submit@debbugs.gnu.org id=B48925.163663559610489 (code B ref 48925); Thu, 11 Nov 2021 13:00:02 +0000 Original-Received: (at 48925) by debbugs.gnu.org; 11 Nov 2021 12:59:56 +0000 Original-Received: from localhost ([127.0.0.1]:40382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ml9gK-0002j6-8E for submit@debbugs.gnu.org; Thu, 11 Nov 2021 07:59:56 -0500 Original-Received: from kamnitnik.top ([209.250.245.214]:44932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ml9gI-0002iy-Mz for 48925@debbugs.gnu.org; Thu, 11 Nov 2021 07:59:55 -0500 Original-Received: from localhost (BSN-77-156-43.static.siol.net [193.77.156.43]) by kamnitnik.top (Postfix) with ESMTPSA id 764CD9CFA8; Thu, 11 Nov 2021 12:59:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1636635593; bh=JnCp4XYbdQqejDLgzDGYuyGtLbVpSRPUBtywm0++CeU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=mpTdyf3QX+YdxHVrv3r/hMjYIuBUYuM5VGP7N/OWtlpd14FI81npsOYL4hsKbPqdt YQbeipoCV4e8USes8hN7QKcYmyhLCby9SCXA7KYky+Qne0aE1+4zdF/qMATF9qROLc joIEkjTHb7hMPDKKB3YTWMaG8btfXKkC/q8vNxplFWQ0+EXKQ6BuHLDN1PFBnL0gjD SenzOKgZcaVRLJqEYnQLABMivK8EbplZE8hQWMptL9ReKX+9Fb0kCgomkk5hFWX+51 KWioPt/+tH57XCwxuK/nrCYoWm1r5eIkdxL1hM0jWOKR1xamhzgL7BCCeqBGiik8GQ 9ttPjEYHlcQ2w== In-Reply-To: <83lf1v0w6y.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:219636 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> Cc: 48925@debbugs.gnu.org >> Date: Thu, 11 Nov 2021 11:42:34 +0100 >> From: miha--- via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >>=20 >> >> To be on the safer side, I guess we could replace the >> >> >> >> specbind (Qminibuffer_completion_table, Qnil); >> >> >> >> with a use of `minibuffer-with-setup-hook` that sets the var to nil in >> >> the new minibuffer. But doing it in C is awkward so it would best be >> >> done by moving the function to subr.el. >> > >> > Sounds like a good idea to me. Miha, could you do that? >>=20 >> Okay, patch attached. > > Moving read-string to subr.el means the function will be unavailable > during loadup until subr.elc is loaded. Sorry, I forgot to include a disclaimer that I don't really know that much about loadup and bootstrapping, I kind of just blindly moved the function to lisp saw that "make" worked. I did check loadup.el and saw that `read-string' or `call-interactively' aren't used directly before subr.el, but I'm not sure that this is sufficient. It may be used indirectly through `command-execute', which is defined in simple.el, so I think it should be okay. > What is awkward to do in C? Maybe I could help with that, so that we > wouldn't need to move this to Lisp. We want to do what `minibuffer-with-setup-hook' does: add a function to a hook that will remove itself from this hook. If I understand correctly, we'd have to do this without `add-hook' and `remove-hook' since they are defined in subr.el. > Thanks. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmGNFNETHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZPyl0EACepBvDxuoihMh0204jCtDHwxXNc2qB /+VGM6XQe93uy6+AAS/xIFCHus/FN4eyNwcI7f9xKuOhrvmpAz9A1lI2D7mzrEow q1F5LhRzu2/vNLqZaYk1z6HjSOn5SCUKR8SPeaAYkMRczral7X/zau+/vUi6uk4z koOKmSHfn/4EnNtON56AlkkNIKYgL6gympqnbnMq21NJPeZPtOIloVukW7z8Qf2J MzM/AszRS/6z/PfSOkmtSv5/9pVgSdPHREQDMfrT+re0/tV2kC+DTMo9LnMGqBQ0 Pq7E8b4h70QzcVd7WjR7DeBApbdwxYZxp+coGC9xAMsw8rKwKOxkgu4eHU2Q3ejt U32ZjJBSO9SbmqbvL20oXNHyzCwfmiKHtVdzlUR++jiY0mibWVSQ+Fo5APf/4mAm 6nVPLpNbEne6VaTih3i7matNEdgqWEFoMp9lJVi9ZB/L4pZYznKFFf2bFqPc5Dk5 DBOSwvuSgWZyQojQnZhYvegk3IFiDTPk0iKX/2VRo//Rnm1PIwrk7Up3JD3P5d7R aNBU/v+pLCgovknLD2RuqsZkfeE0ZCD65/sH1J0FNmEQ+f6pre2aIsRONYyqXTXs Z8Uxahs8j7fXg/ZISAF8NeM0960NElLSCri6YA++4iRC32prma3mGqhysYBdfoUd Jdj1tl1CrNGbag== =jdSk -----END PGP SIGNATURE----- --=-=-=--