From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: How do I bind a variable for the minibuffer's use?
Date: Mon, 28 Mar 2016 14:59:34 -0400 [thread overview]
Message-ID: <jwva8li8mco.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 20160328184354.GA5095@acm.fritz.box
> How do I bind a variable for the minibuffer?
There can be several minibuffers, so you need to be more precise.
> In particular, I want to bind text-property-default-nonsticky to
> include '(separator . t).
When/where is this property added and then used?
> The way it is done at the moment (in query-replace-read-from) is simply
> to bind that variable, in the hope that that binding will be the one
> seen by the minibuffer.
I guess the simplest way would be to use minibuffer-with-setup-hook
where you setq-local those vars.
This has the downside that those buffer-local settings may leak to the
next use of the minibuffer, but it's probably harmless (and with any
luck minibuffer-inactive-mode will kill those buffer-local settings as
soon as you exit the minibuffer).
Stefan
prev parent reply other threads:[~2016-03-28 18:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-28 18:43 How do I bind a variable for the minibuffer's use? Alan Mackenzie
2016-03-28 18:53 ` Eli Zaretskii
2016-03-28 18:57 ` Andreas Schwab
2016-03-28 18:59 ` Stefan Monnier [this message]
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=jwva8li8mco.fsf-monnier+gmane.emacs.devel@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/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).