[Top][All Lists]

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

Re: [Bug-AUCTeX] fon-lock messes up

From: Tassilo Horn
Subject: Re: [Bug-AUCTeX] fon-lock messes up
Date: Wed, 10 Apr 2013 16:38:03 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Baranas <address@hidden> writes:

> Hello, I am using Emacs+Auctex-11.86  and I need additional highlighting 
> schemes
> for my latex documents. However if I create my own face and add 
>   (add-hook 'TeX-mode-hook
>     (lambda ()
>         (font-lock-add-keywords nil
>             '(("\\\\alpha" 0 my-face t)))))
> to my .emacs  file, font-lock after each occurrence of \alpha switches off for
> some part of the text. However if i use  predefined face like
> font-lock-warning-face it works (unfortunately not in subscripts). I am 
> looking
> for a way to highlight some commands in math-mode.

You could define your own user keyword class for these commands like so:

(setq font-latex-user-keyword-classes
      '(("my-special-commands" ("alpha" "omega")
         my-face noarg)))


reply via email to

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