[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XKCD/541 compliance, anyone?
From: |
Marcin Borkowski |
Subject: |
Re: XKCD/541 compliance, anyone? |
Date: |
Fri, 05 Dec 2014 23:33:51 +0100 |
On 2014-12-04, at 23:34, Stefan Monnier wrote:
>> I have a dream: to have the s-exp functions ignore closing parens,
>> brackets etc. /after/, say, things matching
>
>> [;:B]-?
>
> You can use syntax-propertize-function to change the syntax class of
> those parens.
Not working. :-(
I decided to try this out manually. I put this into my buffer:
\emph{Hello world! ;-)}
changed the mode to LaTeX-mode (from AUCTeX), put the point at the ")"
character, and did
M-: (put-text-property (point) (1+ (point)) 'syntax-table '(1))
After inspection by C-u C-x =, it turned out that nothing like a
"syntax-table" property got its way into the buffer.
Strangeness: if I change the name of the property to, e.g., my-prop,
putting (and getting) the property value works as expected.
Note: I also set parse-sexp-lookup-properties to t; unsurprisingly, it
didn't help.
Looks like either a bug in Emacs, or a bug in my mental model of how
this should work.
The same happens with emacs -Q (though without AUCTeX, just in the stock
Emacs latex-mode).
> Stefan
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University