[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: highlighting keywords in comments
From: |
Stefan Monnier |
Subject: |
Re: highlighting keywords in comments |
Date: |
Sun, 06 Mar 2011 16:31:31 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> In java-mode (and other cc-modes), I have the following code
> (font-lock-add-keywords
> nil
> '(("\\(FIXME\\|TODO\\)" 1 font-lock-warning-face)))
> However, this doesn't work on FIXME or TODO words in comments, making it
> much less useful. Is there a way for these keywords to be highlighted in
> font-lock-warning-face, even in comments?
Check the doc of `font-lock-keywords', especially the OVERRIDE part.
Stefan