Mercurial > emacs
changeset 93879:36855e43119a
(Font Lock): Prefer add-hook to using a non-nil `mode' arg
in `font-lock-add-keywords'.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 08 Apr 2008 21:23:36 +0000 |
parents | aadd0f370629 |
children | c6152337e4ad |
files | doc/emacs/ChangeLog doc/emacs/display.texi |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/emacs/ChangeLog Tue Apr 08 20:18:14 2008 +0000 +++ b/doc/emacs/ChangeLog Tue Apr 08 21:23:36 2008 +0000 @@ -1,3 +1,8 @@ +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.
--- a/doc/emacs/display.texi Tue Apr 08 20:18:14 2008 +0000 +++ b/doc/emacs/display.texi Tue Apr 08 21:23:36 2008 +0000 @@ -605,9 +605,10 @@ 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