|
From: | Dmitry Gutov |
Subject: | Re: Upcoming loss of usability of Emacs source files and Emacs. |
Date: | Tue, 30 Jun 2015 18:23:33 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 |
On 06/30/2015 05:37 PM, Paul Eggert wrote:
I thought that font-lock couldn't use the same escape syntax that substitute-command-keys does, and that this was why you suggested \~ rather than \= -- i.e., so that one could use \= to escape characters that substitute-command-keys would otherwise interpret, and use \~ to escape characters that font-lock would otherwise interpret.
Yes. That was while before you asked to only consider paired quotes, and I hoped to avoid text property lookups in help--translate-quotes. It looks up `help-tilde-escaped' now.
It would be better to use the one escape syntax, as it's one less thing to explain to Emacs users. But how would it work? I don't see how.
substitute-command-keys will add a `quoted' (or `escaped'? I'm fuzzy on the difference) text property to the characters that were escaped in its input. Thus translating "\\=`'" to #("`'" 0 1 (escaped t)) (if we're still using "\\=" there).
Then help--translate-quotes will check that property, instead of `help-tilde-escaped'.
[Prev in Thread] | Current Thread | [Next in Thread] |