Suppose I want to make additions to a major mode's syntax highlighting, how would I do this without modifying the major mode's source code?
Some ideas:
- Redefine variable in .emacs
- Define a minor mode with the changes
Use font-lock-add-keywords
. See the Elisp manual, node Customizing Keywords.
The Elisp manual is your friend: C-h i
, then choose it. In the manual, i
is your friend. E.g., i font-lock TAB
.