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

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

Re: set font for TODO


From: Luca Ferrari
Subject: Re: set font for TODO
Date: Mon, 3 Jun 2013 15:11:34 +0200

On Mon, Jun 3, 2013 at 2:43 PM, Tim Visher <tim.visher@gmail.com> wrote:

> 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.
>


I need a little help here, I'm not getting how to do it:

(defface fluca1978-programming-fixme-face
  '((t (:inherit font-lock-warning-face)))
  "Face used to emphasize fixme words" )

(defun fluca1978/fontify-fixme ()
  (font-lock-add-keywords
   nil '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\|XXX\\)[ \t\s\n:]*"
          1 fluca1978-programming-fixme-face t))))

The result is that nothing is emphasized. Moreover if I write, for
instance, FIXME (without the colon) I get the following words
un-fontified, as if the regular expression was wrong. What am I
missing?

Thanks,
Luca



reply via email to

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