[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: set font for TODO
From: |
Tim Visher |
Subject: |
Re: set font for TODO |
Date: |
Mon, 3 Jun 2013 08:43:55 -0400 |
On Mon, Jun 3, 2013 at 2:54 AM, Luca Ferrari <fluca1978@infinito.it> wrote:
> this could be trivial but I cannot find a solution: I'd like to
> emphasize some warning/todo words with a special font, so in the
> beginning I did:
>
> (custom-set-faces
> '(font-lock-warning-face ((t (:foreground "Yellow" :weight bold )))) )
>
> (defun fluca1978/fontify-fixme ()
> (font-lock-add-keywords
> nil '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\|XXX\\)[ \t\s\n:]*"
> 1 font-lock-warning-face t))))
>
>
> but of course this has the side effect to fontify also every other
> string that emacs applies warning-face to. So how can I isolate my
> keyword list from the emacs one?
You'll probably need to define your own custom face, maybe having it
inherit from font-lock-warning-face, and then have font-lock apply
your new face rather than the old face to your keywords.
--
In Christ,
Timmy V.
http://blog.twonegatives.com/
http://five.sentenc.es/ -- Spend less time on mail