Next: Mode Line Format Prev: Major Modes Up: Modes
A "minor mode" provides features that users may enable or disable
independently of the choice of major mode. Minor modes can be enabled
individually or in combination. Minor modes would be better named
"Generally available, optional feature modes" except that such a name is
A minor mode is not usually a modification of single major mode. For
example, Auto Fill mode may be used in any major mode that permits text
insertion. To be general, a minor mode must be effectively independent
of the things major modes do.
A minor mode is often much more difficult to implement than a major
mode. One reason is that you should be able to deactivate a minor mode
and restore the environment of the major mode to the state it was in
before the minor mode was activated.
Often the biggest problem in implementing a minor mode is finding a
way to insert the necessary hook into the rest of Emacs. Minor mode
keymaps make this easier.
- Minor Mode Conventions
- Tips for writing a minor mode.
- Keymaps and Minor Modes
- How a minor mode can have its own keymap.
automatically generated by info2www