Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
a152877d
Commit
a152877d
authored
Apr 08, 2008
by
Stefan Monnier
Browse files
(Font Lock): Prefer add-hook to using a non-nil `mode' arg
in `font-lock-add-keywords'.
parent
3ed051d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
doc/emacs/ChangeLog
doc/emacs/ChangeLog
+5
-0
doc/emacs/display.texi
doc/emacs/display.texi
+4
-3
No files found.
doc/emacs/ChangeLog
View file @
a152877d
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.
...
...
doc/emacs/display.texi
View file @
a152877d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment