[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#48582: Issue with font-latex-deactivated-keyword-classes
From: |
Arash Esbati |
Subject: |
bug#48582: Issue with font-latex-deactivated-keyword-classes |
Date: |
Sat, 22 May 2021 18:55:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 |
Hi Augusto,
Augusto Stoffel <arstoffel@gmail.com> writes:
> I'm using the following value of `font-latex-deactivated-keyword-classes`,
> in order to get a more sober appearance:
>
> (setq-default font-latex-deactivated-keyword-classes
> '("variable" "biblatexnoarg" "biblatex" "reference"
> "function" "textual" "type-command" "type-declaration"))
>
> With this, I would hope to remove most font locking, and in particular
> everything with `font-lock-keyword-face', but keep, say,
> `font-latex-italic-face' and the `font-latex-sectioning-*' faces.
>
> The problem is that the above setting still adds
> `font-lock-keyword-face' to sectioning and font-changing commands, say
> "\section" and "\emph". This is not a very useful result. I would
> expect to be able to control the highlighting of section titles and
> sectioning macro names independently.
AUCTeX also gives you the ability to control fontification of certain
keywords. From the manual[1]:
Deactivating defaults of built-in keyword classes
font-latex ships with predefined lists of keywords for the classes
described above. You can disable these defaults per class by customizing
the variable font-latex-deactivated-keyword-classes. [...]
You can also get rid of certain keywords only. For example if you want
to remove highlighting of footnotes as references you can put the
following stanza into your init file:
(eval-after-load "font-latex"
'(setq-default
font-latex-match-reference-keywords-local
(remove (assoc-string "footnote"
font-latex-match-reference-keywords-local)
font-latex-match-reference-keywords-local)))
Did you try the technique described above?
Best, Arash
Footnotes:
[1]
https://www.gnu.org/software/auctex/manual/auctex.html#Fontification-of-macros