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

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

set font for TODO


From: Luca Ferrari
Subject: set font for TODO
Date: Mon, 3 Jun 2013 08:54:11 +0200

Hi,
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?

Thanks,
Luca



reply via email to

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