Font Lock mode can highlight using any face, but Emacs defines several faces specifically for Font Lock to use to highlight text. These Font Lock faces are listed below. They can also be used by major modes for syntactic highlighting outside of Font Lock mode (see Major Mode Conventions).
Each of these symbols is both a face name, and a variable whose
default value is the symbol itself. Thus, the default value of
The faces are listed with descriptions of their typical usage, and in order of greater to lesser prominence. If a mode’s syntactic categories do not fit well with the usage descriptions, the faces can be assigned using the ordering as a guide.
for a construct that is peculiar (e.g., an unescaped confusable quote in an Emacs Lisp symbol like ‘‘foo’), or that greatly changes the meaning of other text, like ‘;;;###autoload’ in Emacs Lisp and ‘#error’ in C.
for the name of a function being defined or declared.
for the name of a variable being defined or declared.
for a keyword with special syntactic significance, like ‘for’ and ‘if’ in C.
for comments delimiters, like ‘/*’ and ‘*/’ in C. On most
terminals, this inherits from
for the names of user-defined data types.
for the names of constants, like ‘NULL’ in C.
for the names of built-in functions.
for preprocessor commands. This inherits, by default, from
for string constants.
for documentation embedded in program code inside specially-formed
comments or strings. This face inherits, by default, from
for mark-up elements in text using
It is typically used for the mark-up constructs in documentation embedded
in program code, following conventions such as Haddock, Javadoc or Doxygen.
This face inherits, by default, from
for easily-overlooked negation characters.