summaryrefslogtreecommitdiff
path: root/devdocs/elisp/font-lock-mode.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/font-lock-mode.html
new repository
Diffstat (limited to 'devdocs/elisp/font-lock-mode.html')
-rw-r--r--devdocs/elisp/font-lock-mode.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/devdocs/elisp/font-lock-mode.html b/devdocs/elisp/font-lock-mode.html
new file mode 100644
index 00000000..c8a9bba4
--- /dev/null
+++ b/devdocs/elisp/font-lock-mode.html
@@ -0,0 +1,51 @@
+ <h3 class="section">Font Lock Mode</h3> <p><em>Font Lock mode</em> is a buffer-local minor mode that automatically attaches <code>face</code> 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 major mode. </p> <p>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. Search-based fontification happens second. </p> <table class="menu" border="0" cellspacing="0"> <tr>
+<td align="left" valign="top">• <a href="font-lock-basics" accesskey="1">Font Lock Basics</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Overview of customizing Font Lock. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="search_002dbased-fontification" accesskey="2">Search-based Fontification</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Fontification based on regexps. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="customizing-keywords" accesskey="3">Customizing Keywords</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Customizing search-based fontification. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="other-font-lock-variables" accesskey="4">Other Font Lock Variables</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Additional customization facilities. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="levels-of-font-lock" accesskey="5">Levels of Font Lock</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Each mode can define alternative levels so that the user can select more or less. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="precalculated-fontification" accesskey="6">Precalculated Fontification</a>
+</td>
+<td> </td>
+<td align="left" valign="top">How Lisp programs that produce the buffer contents can also specify how to fontify it. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="faces-for-font-lock" accesskey="7">Faces for Font Lock</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Special faces specifically for Font Lock. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="syntactic-font-lock" accesskey="8">Syntactic Font Lock</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Fontification based on syntax tables. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="multiline-font-lock" accesskey="9">Multiline Font Lock</a>
+</td>
+<td> </td>
+<td align="left" valign="top">How to coerce Font Lock into properly highlighting multiline constructs. </td>
+</tr> </table><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 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/Font-Lock-Mode.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Font-Lock-Mode.html</a>
+ </p>
+</div>