[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exclamation mark in a syntax table
From: |
Óscar Fuentes |
Subject: |
Re: Exclamation mark in a syntax table |
Date: |
Tue, 23 Jul 2019 03:13:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> but symbol-at-point for !foo still returns !foo. Furthermore, I see no
>> way of specifying that a leading ! is an expression prefix but in any
>> other place it is a symbol constituent.
>
> You can try a syntax like "_ p". But it all depends on the details of
> what you really want/need. There's a good chance you'll need to use
> syntax-propertize-function to give different syntaxes to those
> different cases.
syntax-propertize-function looks scary.
As for
(modify-syntax-entry ?! "' " table)
it works as expected after reverting the buffer. IIRC when I inserted
(modify-syntax-entry ?\? "_ " table)
into the mode's syntax table it didn't require a buffer revert.
Thanks.