diff options
Diffstat (limited to 'devdocs/elisp/faces-for-font-lock.html')
| -rw-r--r-- | devdocs/elisp/faces-for-font-lock.html | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/devdocs/elisp/faces-for-font-lock.html b/devdocs/elisp/faces-for-font-lock.html new file mode 100644 index 00000000..b80f7e59 --- /dev/null +++ b/devdocs/elisp/faces-for-font-lock.html @@ -0,0 +1,21 @@ + <h4 class="subsection">Faces for Font Lock</h4> <p>Font Lock mode can highlight using any face, but Emacs defines several faces specifically for Font Lock to use to highlight text. These <em>Font Lock faces</em> are listed below. They can also be used by major modes for syntactic highlighting outside of Font Lock mode (see <a href="major-mode-conventions">Major Mode Conventions</a>). </p> <p>Each of these symbols is both a face name, and a variable whose default value is the symbol itself. Thus, the default value of <code>font-lock-comment-face</code> is <code>font-lock-comment-face</code>. </p> <p>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. </p> <dl compact> <dt><code>font-lock-warning-face</code></dt> <dd> + <p>for a construct that is peculiar (e.g., an unescaped confusable quote in an Emacs Lisp symbol like ‘<samp>‘foo</samp>’), or that greatly changes the meaning of other text, like ‘<samp>;;;###autoload</samp>’ in Emacs Lisp and ‘<samp>#error</samp>’ in C. </p> </dd> <dt><code>font-lock-function-name-face</code></dt> <dd> + <p>for the name of a function being defined or declared. </p> </dd> <dt><code>font-lock-variable-name-face</code></dt> <dd> + <p>for the name of a variable being defined or declared. </p> </dd> <dt><code>font-lock-keyword-face</code></dt> <dd> + <p>for a keyword with special syntactic significance, like ‘<samp>for</samp>’ and ‘<samp>if</samp>’ in C. </p> </dd> <dt><code>font-lock-comment-face</code></dt> <dd> + <p>for comments. </p> </dd> <dt><code>font-lock-comment-delimiter-face</code></dt> <dd> + <p>for comments delimiters, like ‘<samp>/*</samp>’ and ‘<samp>*/</samp>’ in C. On most terminals, this inherits from <code>font-lock-comment-face</code>. </p> </dd> <dt><code>font-lock-type-face</code></dt> <dd> + <p>for the names of user-defined data types. </p> </dd> <dt><code>font-lock-constant-face</code></dt> <dd> + <p>for the names of constants, like ‘<samp>NULL</samp>’ in C. </p> </dd> <dt><code>font-lock-builtin-face</code></dt> <dd> + <p>for the names of built-in functions. </p> </dd> <dt><code>font-lock-preprocessor-face</code></dt> <dd> + <p>for preprocessor commands. This inherits, by default, from <code>font-lock-builtin-face</code>. </p> </dd> <dt><code>font-lock-string-face</code></dt> <dd> + <p>for string constants. </p> </dd> <dt><code>font-lock-doc-face</code></dt> <dd> + <p>for documentation embedded in program code inside specially-formed comments or strings. This face inherits, by default, from <code>font-lock-string-face</code>. </p> </dd> <dt><code>font-lock-doc-markup-face</code></dt> <dd> + <p>for mark-up elements in text using <code>font-lock-doc-face</code>. 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 <code>font-lock-constant-face</code>. </p> </dd> <dt><code>font-lock-negation-char-face</code></dt> <dd> + <p>for easily-overlooked negation characters. </p> +</dd> </dl><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Faces-for-Font-Lock.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Faces-for-Font-Lock.html</a> + </p> +</div> |
