[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Obsoleting font-latex-update-font-lock for fixing bug#37945

From: Tassilo Horn
Subject: Obsoleting font-latex-update-font-lock for fixing bug#37945
Date: Wed, 10 Jun 2020 18:57:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi all,

I have pushed a commit with a pile of changes to the new branch
obsolete-font-latex-update-font-lock and would like to get some feedback
about breakages.

This is all motivated by

Up to now, style files (and font-latex.el itself) called
`font-latex-update-font-lock' which made a "hard reset", letting all
fontification constructs be set again from AUCTeX `font-lock-defaults'.
This had the bad side-effect that it would nuke custom fontification
minor modes (or the user) have set up.  We already had a dirty
workaround there in order to solve that issue specifically for
prettify-symbols-mode but obviously we cannot solve it that way for each
and every external package.

I noticed that adding new keywords using `font-latex-add-keywords'
doesn't seem to require such a hard reset because they change just a
variable used by some font-latex-match-* function (which is in
font-lock-keywords already), so at most we must flush the current
fontification but nothing more.

Also, when adding new syntactically fontified constructs by modifying
one of

- `LaTeX-verbatim-macros-with-delims'
- `LaTeX-verbatim-macros-with-delims-local'
- `LaTeX-verbatim-macros-with-braces'
- `LaTeX-verbatim-macros-with-braces-local'
- `LaTeX-verbatim-environments'
- `LaTeX-verbatim-environments-local'
- `font-latex-syntactic-keywords-extra'

a call to `font-latex-set-syntactic-keywords' seems to be enough.

Since I'm doing really nothing with LaTeX nowadays, it would be fabulous
if some of you folks could try out that branch and tell me what breaks.
You are especially qualified for that task if you are a user of one of
the following packages:

  beamer, comment, expl3, fancyhdr, fancyvrb, fvextra, hyperref,
  listings, ltxguide, minted, pythontex, revtex4-2, tex-live, url, and

Thanks a lot,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]