diff options
Diffstat (limited to 'devdocs/elisp/keymaps-and-minor-modes.html')
| -rw-r--r-- | devdocs/elisp/keymaps-and-minor-modes.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/devdocs/elisp/keymaps-and-minor-modes.html b/devdocs/elisp/keymaps-and-minor-modes.html new file mode 100644 index 00000000..45a21509 --- /dev/null +++ b/devdocs/elisp/keymaps-and-minor-modes.html @@ -0,0 +1,6 @@ + <h4 class="subsection">Keymaps and Minor Modes</h4> <p>Each minor mode can have its own keymap, which is active when the mode is enabled. To set up a keymap for a minor mode, add an element to the alist <code>minor-mode-map-alist</code>. See <a href="controlling-active-maps#Definition-of-minor_002dmode_002dmap_002dalist">Definition of minor-mode-map-alist</a>. </p> <p>One use of minor mode keymaps is to modify the behavior of certain self-inserting characters so that they do something else as well as self-insert. (Another way to customize <code>self-insert-command</code> is through <code>post-self-insert-hook</code>, see <a href="commands-for-insertion">Commands for Insertion</a>. Apart from this, the facilities for customizing <code>self-insert-command</code> are limited to special cases, designed for abbrevs and Auto Fill mode. Do not try substituting your own definition of <code>self-insert-command</code> for the standard one. The editor command loop handles this function specially.) </p> <p>Minor modes may bind commands to key sequences consisting of <kbd>C-c</kbd> followed by a punctuation character. However, sequences consisting of <kbd>C-c</kbd> followed by one of <kbd>{}<>:;</kbd>, or a control character or digit, are reserved for major modes. Also, <kbd>C-c <var>letter</var></kbd> is reserved for users. See <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html">Key Binding Conventions</a>. </p><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/Keymaps-and-Minor-Modes.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Keymaps-and-Minor-Modes.html</a> + </p> +</div> |
