[Top][All Lists]

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

Re: Colourising tex keywords

From: Emanuel Berg
Subject: Re: Colourising tex keywords
Date: Tue, 11 Jan 2022 14:22:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

fatiparty--- via Users list for the GNU Emacs text editor wrote:

> Have constructed a set of tex symbols stored in (defvar
> texcom-colour
> I want to highlight tex commands such as \alpha using colour

See if this works in Emacs Lisp mode, if/when it does (it does
here) do the same for your mode, if it doesn't work there,
well then something is up ...

(font-lock-add-keywords 'emacs-lisp-mode
   ("font-lock-builtin-face"              .  font-lock-builtin-face)
   ("font-lock-comment-delimiter-face"    .  font-lock-comment-delimiter-face)
   ("font-lock-comment-face"              .  font-lock-comment-face)
   ("font-lock-constant-face"             .  font-lock-constant-face)
   ("font-lock-doc-face"                  .  font-lock-doc-face)
   ("font-lock-function-name-face"        .  font-lock-function-name-face)
   ("font-lock-keyword-face"              .  font-lock-keyword-face)
   ("font-lock-negation-char-face"        .  font-lock-negation-char-face)
   ("font-lock-preprocessor-face"         .  font-lock-preprocessor-face)
   ("font-lock-reference-face"            .  font-lock-reference-face)
   ("font-lock-regexp-grouping-backslash" . 
   ("font-lock-regexp-grouping-construct" . 
   ("font-lock-string-face"               .  font-lock-string-face)
   ("font-lock-type-face"                 .  font-lock-type-face)
   ("font-lock-variable-name-face"        .  font-lock-variable-name-face)
   ("font-lock-warning-face"              .  font-lock-warning-face)

underground experts united

reply via email to

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