[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: colorization of mode contents
From: |
Haines Brown |
Subject: |
Re: colorization of mode contents |
Date: |
Sat, 25 Jan 2014 10:55:05 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Emanuel Berg <embe8573@student.uu.se> writes:
> Haines Brown <haines@histomat.net> writes:
>
>> In LaTeX/PS mode, the \cite{key} command displays key
>> values in green in the raw .tex file. This makes it
>> easy to spot the command in a block of text.
>
> Try:
>
> (font-lock-add-keywords
> 'latex-mode
> '(("citeNP\{\\(.*\\)\}" (1 'font-lock-comment-face))))
Unfortunately, nothing happened.
> If nothing happens, after eval,
Being a LISP ignoramus, I tried C-x C-e after each of the parentheses or
brackets. Starting at end (after "...))))" I got "nil", then simply an
echo of the string, then / is invalid function, then } is void variable.
Sorry.
> try (latex-mode)
I don't understand what you want. I tied replacing 'latex-mode with
'(latex-mode) to no avail.
> or `M-x latex-mode'.
Given my setup, this runs spell check, and the key values in
\citeNP{key} naturlly turn red as the result. When the cursor hits
them,the red turns off, but I return to black foreground color for the
{key} value, not the forest green I wanted.
Toggling M-x font-lock-mode didn't help any more than toggling M-x
latex-mode.
I tried:
(add-hook 'latex-mode
(lambda ()
(font-lock-add-keywords nil
'(("citeNP\{\\(.*\\)\}" (1 'font-lock-constant-face))))))
and didn't do any better with it. I changed to constant-face because
my comment-face with command package is black foreground.
Haines
- colorization of mode contents, Haines Brown, 2014/01/24
- Re: colorization of mode contents, Emanuel Berg, 2014/01/25
- Re: colorization of mode contents,
Haines Brown <=
- Re: colorization of mode contents, Haines Brown, 2014/01/25
- Re: colorization of mode contents, Emanuel Berg, 2014/01/25
- Re: colorization of mode contents, Emanuel Berg, 2014/01/25
- Re: colorization of mode contents, Haines Brown, 2014/01/26
- Re: colorization of mode contents, Emanuel Berg, 2014/01/26
- Re: colorization of mode contents, Haines Brown, 2014/01/27
- Re: colorization of mode contents, Emanuel Berg, 2014/01/27
- Re: colorization of mode contents, Haines Brown, 2014/01/27
Re: colorization of mode contents, Stefan Monnier, 2014/01/25