GNU bug report logs - #48582
Issue with font-latex-deactivated-keyword-classes

Previous Next

Package: auctex;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Sat, 22 May 2021 09:46:01 UTC

Severity: normal

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Arash Esbati <arash <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#48582: closed (Issue with font-latex-deactivated-keyword-classes)
Date: Fri, 29 Oct 2021 14:34:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 29 Oct 2021 16:32:59 +0200
with message-id <86h7cz3nqc.fsf <at> gnu.org>
and subject line Re: bug#48582: Issue with font-latex-deactivated-keyword-classes
has caused the debbugs.gnu.org bug report #48582,
regarding Issue with font-latex-deactivated-keyword-classes
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
48582: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48582
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Augusto Stoffel <arstoffel <at> gmail.com>
To: bug-auctex <at> gnu.org
Subject: Issue with font-latex-deactivated-keyword-classes
Date: Sat, 22 May 2021 11:45:36 +0200
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.

A workaround in my case is to use a face remap such as

    (add-hook 'TeX-mode-hook
               (lambda ()
                 (face-remap-set-base 'font-lock-keyword-face
                                      :inherit 'font-latex-sedate-face)))

but this isn't a simple customization that most users would be able to
come up with.


[Message part 3 (message/rfc822, inline)]
From: Arash Esbati <arash <at> gnu.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 48582-done <at> debbugs.gnu.org
Subject: Re: bug#48582: Issue with font-latex-deactivated-keyword-classes
Date: Fri, 29 Oct 2021 16:32:59 +0200
Arash Esbati <arash <at> gnu.org> writes:

> 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?

Some weeks passed since last message.  I'm closing this report for now,
we can re-open it once new activities come up.

Best, Arash


This bug report was last modified 3 years and 204 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.