help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: set face for added font lock keywords


From: Suvayu Ali
Subject: Re: set face for added font lock keywords
Date: Sun, 9 Jan 2011 21:31:22 -0800

On Sun, 9 Jan 2011 07:27:30 -0800 (PST)
extronom <extronom@googlemail.com> wrote:

> I'm trying to add some new keywords by doing  font-lock-add-keywords
> so that a FIXME keyword gets highlighted, which works quite well. When
> I try to change the color of the used face it doesn't work and
> probably somebody could give me a hint what the problem is here

Why don't you use `M-x customize-face' to customise the face you want
to?

That apart, I have a similar setup but all I do is add this hook:

(add-hook 'find-file-hook
          (lambda ()
            (font-lock-add-keywords
             nil '(("\\<\\(FIXME\\):" 1 font-lock-warning-face prepend)))
            (if (vc-working-revision (buffer-file-name))
                (auto-revert-mode t))
            ))

Hope this helps.

-- 
Suvayu

Open source is the future. It sets us free.



reply via email to

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