Commit a152877d authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(Font Lock): Prefer add-hook to using a non-nil `mode' arg

in `font-lock-add-keywords'.
parent 3ed051d4
2008-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
* display.texi (Font Lock): Prefer add-hook to using a non-nil `mode' arg
in `font-lock-add-keywords'.
2008-04-08 Glenn Morris <rgm@gnu.org>
* cal-xtra.texi, calendar.texi: Update for calendar name changes.
......
......@@ -605,9 +605,10 @@ a particular mode. For example, to highlight @samp{FIXME:} words in C
comments, use this:
@example
(font-lock-add-keywords
'c-mode
'(("\\<\\(FIXME\\):" 1 font-lock-warning-face t)))
(add-hook 'c-mode-hook
(lambda ()
(font-lock-add-keywords nil
'(("\\<\\(FIXME\\):" 1 font-lock-warning-face t)))))
@end example
@findex font-lock-remove-keywords
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment