summaryrefslogtreecommitdiff
path: root/devdocs/elisp/modes.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/modes.html
new repository
Diffstat (limited to 'devdocs/elisp/modes.html')
-rw-r--r--devdocs/elisp/modes.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/devdocs/elisp/modes.html b/devdocs/elisp/modes.html
new file mode 100644
index 00000000..8a37ff79
--- /dev/null
+++ b/devdocs/elisp/modes.html
@@ -0,0 +1,46 @@
+ <h2 class="chapter">Major and Minor Modes</h2> <p>A <em>mode</em> is a set of definitions that customize Emacs behavior in useful ways. There are two varieties of modes: <em>minor modes</em>, which provide features that users can turn on and off while editing; and <em>major modes</em>, which are used for editing or interacting with a particular kind of text. Each buffer has exactly one <em>major mode</em> at a time. </p> <p>This chapter describes how to write both major and minor modes, how to indicate them in the mode line, and how they run hooks supplied by the user. For related topics such as keymaps and syntax tables, see <a href="keymaps">Keymaps</a>, and <a href="syntax-tables">Syntax Tables</a>. </p> <table class="menu" border="0" cellspacing="0"> <tr>
+<td align="left" valign="top">• <a href="hooks" accesskey="1">Hooks</a>
+</td>
+<td> </td>
+<td align="left" valign="top">How to use hooks; how to write code that provides hooks. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="major-modes" accesskey="2">Major Modes</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Defining major modes. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="minor-modes" accesskey="3">Minor Modes</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Defining minor modes. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="mode-line-format" accesskey="4">Mode Line Format</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Customizing the text that appears in the mode line. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="imenu" accesskey="5">Imenu</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Providing a menu of definitions made in a buffer. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="font-lock-mode" accesskey="6">Font Lock Mode</a>
+</td>
+<td> </td>
+<td align="left" valign="top">How modes can highlight text according to syntax. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="auto_002dindentation" accesskey="7">Auto-Indentation</a>
+</td>
+<td> </td>
+<td align="left" valign="top">How to teach Emacs to indent for a major mode. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="desktop-save-mode" accesskey="8">Desktop Save Mode</a>
+</td>
+<td> </td>
+<td align="left" valign="top">How modes can have buffer state saved between Emacs sessions. </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/Modes.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Modes.html</a>
+ </p>
+</div>