-BODY contains code that will be executed each time the mode is (dis)activated.
- It will be executed after any toggling but before running the hooks.
- BODY can start with a list of CL-style keys specifying additional arguments.
- The following keyword arguments are supported:
-:group Followed by the group name to use for any generated `defcustom'.
-:global If non-nil specifies that the minor mode is not meant to be
- buffer-local. By default, the variable is made buffer-local.
-:init-value Same as the INIT-VALUE argument.
-:lighter Same as the LIGHTER argument."
+BODY contains code to execute each time the mode is activated or deactivated.
+ It is executed after toggling the mode,
+ and before running the hook variable `mode-HOOK'.
+ Before the actual body code, you can write keyword arguments (alternating
+ keywords and values). These following keyword arguments are supported (other
+ keywords will be passed to `defcustom' if the minor mode is global):
+:group GROUP Custom group name to use in all generated `defcustom' forms.
+ Defaults to MODE without the possible trailing \"-mode\".
+ Don't use this default group name unless you have written a
+ `defgroup' to define that group properly.
+:global GLOBAL If non-nil specifies that the minor mode is not meant to be
+ buffer-local, so don't make the variable MODE buffer-local.
+ By default, the mode is buffer-local.
+:init-value VAL Same as the INIT-VALUE argument.
+:lighter SPEC Same as the LIGHTER argument.
+:keymap MAP Same as the KEYMAP argument.
+:require SYM Same as in `defcustom'.
+
+For example, you could write
+ (define-minor-mode foo-mode \"If enabled, foo on you!\"
+ :lighter \" Foo\" :require 'foo :global t :group 'hassle :version \"27.5\"
+ ...BODY CODE...)"
+ (declare (debug (&define name stringp
+ [&optional [¬ keywordp] sexp
+ &optional [¬ keywordp] sexp
+ &optional [¬ keywordp] sexp]
+ [&rest [keywordp sexp]]
+ def-body)))
+