Next: Faces for Font Lock, Previous: Levels of Font Lock, Up: Font Lock Mode
In addition to using font-lock-defaults for search-based
fontification, you may use the special character property
font-lock-face (see Special Properties). This property
acts just like the explicit face property, but its activation
is toggled when the user calls M-x font-lock-mode. Using
font-lock-face is especially convenient for special modes
which construct their text programmatically, such as
list-buffers and occur.
If your mode does not use any of the other machinery of Font Lock
(i.e. it only uses the font-lock-face property), it should not
set the variable font-lock-defaults. That way, it will not
cause loading of the font-lock library.
