From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, monnier@iro.umontreal.ca, 48925@debbugs.gnu.org
Subject: bug#48925: [PATCH] Set `minibuffer-completion-*` variables buffer-locally in a few more places
Date: Thu, 11 Nov 2021 14:04:17 +0100 [thread overview]
Message-ID: <87k0hehmi6.fsf@miha-pc> (raw)
In-Reply-To: <83lf1v0w6y.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]
Eli Zaretskii <eliz@gnu.org> 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" <bug-gnu-emacs@gnu.org>
>>
>> >> 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?
>>
>> 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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
next prev parent reply other threads:[~2021-11-11 13:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 18:30 bug#48925: [PATCH] Set `minibuffer-completion-*` variables buffer-locally in a few more places miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-20 12:30 ` Lars Ingebrigtsen
2021-07-20 14:29 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-11 5:19 ` Lars Ingebrigtsen
2021-11-11 10:42 ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-11 11:27 ` Eli Zaretskii
2021-11-11 12:11 ` Lars Ingebrigtsen
2021-11-11 14:17 ` Eli Zaretskii
2021-11-11 16:50 ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-12 2:47 ` Lars Ingebrigtsen
2021-11-12 8:57 ` Eli Zaretskii
2021-11-14 0:49 ` Lars Ingebrigtsen
2021-11-14 6:57 ` Eli Zaretskii
2021-11-15 5:31 ` Lars Ingebrigtsen
2021-11-11 13:04 ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-11-11 23:58 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-12 0:22 ` Gregory Heytings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0hehmi6.fsf@miha-pc \
--to=bug-gnu-emacs@gnu.org \
--cc=48925@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=larsi@gnus.org \
--cc=miha@kamnitnik.top \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).