Subject: bug#76781: Fontification of expl3 code

From: Arash Esbati <[email-masked]>
Date: Thu, 27 Mar 2025 09:01:24 +0100

Hi Keita,

Ikumi Keita <[email-masked]> writes:

>    If we take approach B, I think the proper solution is to use
>    `font-latex-add-to-syntax-alist' instead of re-calling
>    `font-lock-set-defaults' in expl3.el. See the attached patch.

Many thanks for looking at this and finding the root cause.  I installed
your patch locally and it works, so I will install it with the next
update to expl3.el.

>    Additionally, we would have to revise similarly existing style files
>    which install their own syntax tables. I expect this doesn't require
>    much work; Here is the output of "grep -E set-syntax-table *.el"
>    under style/ subdirectory:
> brazilian.el:   (set-syntax-table LaTeX-brazilian-mode-syntax-table)
> bulgarian.el:   (set-syntax-table LaTeX-bulgarian-mode-syntax-table)
> expl3.el:   (set-syntax-table LaTeX-expl3-syntax-table)
> german.el:   (set-syntax-table LaTeX-german-mode-syntax-table)
> icelandic.el:   (set-syntax-table LaTeX-icelandic-mode-syntax-table)
> ngerman.el:   (set-syntax-table LaTeX-german-mode-syntax-table)
> plfonts.el:   (set-syntax-table LaTeX-plfonts-mode-syntax-table)
> plhb.el:   (set-syntax-table LaTeX-plhb-mode-syntax-table)
> polish.el:   (set-syntax-table LaTeX-polish-mode-syntax-table)
> portuguese.el:   (set-syntax-table LaTeX-portuguese-mode-syntax-table)

I had a brief look at files above and I think they all DTRT, especially
n?german.el.  So I think it was only me missing this in the latest
incarnation of expl3.el.

Best, Arash