pglpm--- via General discussion about AUCTeX <[email protected]> writes:

> Of late I'm noticing that colon ":" and underscore "_" are treated as
> part of words, as confirmed by looking at the syntax table. Just as a
> curiosity: is this a recent change, or is my memory simply failing me?
> In the archives I found a discussion about this around 2012.
>
> I'd like to treat those characters as punctuation, so that if I have,
> say, "eq:blah" with point at the end, and I back-delete a word, I
> should be left with "eq:". In my hook for LaTeX I therefore added
>
>    (modify-syntax-entry ?: "." LaTeX-mode-syntax-table)
>    (modify-syntax-entry ?_ "." LaTeX-mode-syntax-table)
>
> but they don't seem to have any effect. Probably I'm doing something
> wrong but I can't find out what. Any tips?

I think this is due to this change[1].  By chance, are you using one of
these packages in your .tex file:

acro.sty
figureversions.sty
fontspec.sty
l3doc.sty
siunitx.sty
unicode-math.sty

They all run the style hook for expl3.el which then changes the syntax
for : and _.  I think we should undo this in the AUCTeX styles above
since expl3.el is not relevant for users with ordinary .tex files.

Best, Arash

Footnotes:
[1]  
https://cgit.git.savannah.gnu.org/cgit/auctex.git/commit/style/expl3.el?id=db11f39d36e9b78e3a5405076249f3b7c3f8d1f6

Reply via email to