unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: fatiparty--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: Emanuel Berg <moasenwood@zoho.eu>
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Colourising tex keywords
Date: Tue, 11 Jan 2022 17:40:26 +0100 (CET)	[thread overview]
Message-ID: <Mt9-m80--3-2@tutanota.com> (raw)
In-Reply-To: <878rvms8zg.fsf@zoho.eu>



-- 
 Sent with Tutanota, the secure & ad-free mailbox. 

Jan 12, 2022, 01:22 by help-gnu-emacs@gnu.org:

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

I have done as you suggested using (font-lock-add-keywords 'texi-mode

The tex keywords still do not get highlighted.


> (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-backslash)
>  ("font-lock-regexp-grouping-construct" . '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)
>  )
>  t)
>
> -- 
> underground experts united
> https://dataswamp.org/~incal
>



  reply	other threads:[~2022-01-11 16:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 14:37 Colourising tex keywords fatiparty--- via Users list for the GNU Emacs text editor
2022-01-11 13:22 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-11 16:40   ` fatiparty--- via Users list for the GNU Emacs text editor [this message]
2022-01-11 16:41   ` Michael Heerdegen
2022-01-11 17:09     ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-11 17:48       ` Michael Heerdegen
2022-01-11 18:21         ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-11 20:09           ` Michael Heerdegen
2022-01-11 21:30             ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-11 22:47               ` Michael Heerdegen
     [not found]               ` <87ilup3n5w.fsf@web.de-MtAJwby----2>
2022-01-11 23:15                 ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-12  0:12                   ` Michael Heerdegen
2022-01-12  0:19                     ` fatiparty--- via Users list for the GNU Emacs text editor
     [not found]                     ` <MtAdxOt--3-2@tutanota.com-MtAeBSi----2>
2022-01-12  1:12                       ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-11 23:27                 ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-12  0:13                   ` Michael Heerdegen
2022-01-11 18:33 ` Jean Louis
2022-01-12 23:30   ` Emanuel Berg via Users list for the GNU Emacs text editor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Mt9-m80--3-2@tutanota.com \
    --to=help-gnu-emacs@gnu.org \
    --cc=fatiparty@tutanota.com \
    --cc=moasenwood@zoho.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).