Font Lock mode is a feature that automatically attaches
face
properties to certain parts of the buffer based on their
syntactic role. How it parses the buffer depends on the major mode;
most major modes define syntactic criteria for which faces to use, in
which contexts. This section explains how to customize Font Lock for a
particular language--in other words, for a particular major mode.
Font Lock mode finds text to highlight in two ways: through syntactic
parsing based on the syntax table, and through searching (usually for
regular expressions). Syntactic fontification happens first; it finds
comments and string constants, and highlights them using
font-lock-comment-face
and font-lock-string-face
(see section Faces for Font Lock); search-based fontification follows.
Go to the first, previous, next, last section, table of contents.