File: easy-mmode.el.html

Minor modes are useful and common. This package makes defining a minor mode easy, by focusing on the writing of the minor mode functionalities themselves. Moreover, this package enforces a conventional naming of user interface primitives, making things natural for the minor-mode end-users.

For each mode, easy-mmode defines the following:
<mode> : The minor mode predicate. A buffer-local variable.
<mode>-map : The keymap possibly associated to <mode>.
      see define-minor-mode documentation

eval
 (pp (macroexpand '(define-minor-mode <your-mode> <doc>)))
to check the result before using it.

The order in which minor modes are installed is important. Keymap lookup proceeds down minor-mode-map-alist, and the order there tends to be the reverse of the order in which the modes were installed. Perhaps there should be a feature to let you specify orderings.

Additionally to define-minor-mode, the package provides convenient ways to define keymaps, and other helper functions for major and minor modes.

Defined variables (0)

Defined functions (16)

define-global-minor-mode(GLOBAL-MODE MODE TURN-ON [KEY VALUE]... BODY...)
define-globalized-minor-mode(GLOBAL-MODE MODE TURN-ON [KEY VALUE]... BODY...)
define-minor-mode(MODE DOC [KEYWORD VAL ... &rest BODY])
easy-mmode--globalized-predicate-p(PREDICATE)
easy-mmode--mode-docstring(DOC MODE-PRETTY-NAME KEYMAP-SYM GETTER GLOBAL)
easy-mmode--next(RE NAME COUNT &optional ENDFUN NARROWFUN)
easy-mmode--prev(RE NAME COUNT &optional ENDFUN NARROWFUN)
easy-mmode-define-global-mode(GLOBAL-MODE MODE TURN-ON [KEY VALUE]... BODY...)
easy-mmode-define-keymap(BS &optional NAME M ARGS)
easy-mmode-define-minor-mode(MODE DOC [KEYWORD VAL ... &rest BODY])
easy-mmode-define-navigation(BASE RE &optional NAME ENDFUN NARROWFUN &rest BODY)
easy-mmode-define-syntax(CSS ARGS)
easy-mmode-defmap(M BS DOC &rest ARGS)
easy-mmode-defsyntax(ST CSS DOC &rest ARGS)
easy-mmode-pretty-mode-name(MODE &optional LIGHTER)
easy-mmode-set-keymap-parents(M PARENTS)

Defined faces (0)