[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do I bind a variable for the minibuffer's use?
From: |
Stefan Monnier |
Subject: |
Re: How do I bind a variable for the minibuffer's use? |
Date: |
Mon, 28 Mar 2016 14:59:34 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> 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