diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-06-18 08:50:54 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-06-18 08:50:54 +0300 |
commit | b3f11e94fad97144c4bd01c0d6e729d27bc7bfc7 (patch) | |
tree | eaf7541b4b56debf2112904155304f7a1bc16ce3 /doc/lispref/modes.texi | |
parent | 02f0be03017f7f07f37d541a5c665995f1494a84 (diff) | |
download | emacs-b3f11e94fad97144c4bd01c0d6e729d27bc7bfc7.tar.gz emacs-b3f11e94fad97144c4bd01c0d6e729d27bc7bfc7.tar.bz2 emacs-b3f11e94fad97144c4bd01c0d6e729d27bc7bfc7.zip |
Fix documentation of :predicate in 'define-globalized-minor-mode'
* doc/lispref/modes.texi (Defining Minor Modes):
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Document that :predicate creates a customizable user option.
(Bug#64048)
Diffstat (limited to 'doc/lispref/modes.texi')
-rw-r--r-- | doc/lispref/modes.texi | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 3eb61b4d565..4a54d6ec290 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1888,11 +1888,14 @@ user option called the same as the global mode variable, but with @code{-modes} instead of @code{-mode} at the end, i.e.@: @code{@var{global-mode}s}. This variable will be used in a predicate function that determines whether the minor mode should be activated in -a particular major mode. Valid values of @code{:predicate} include -@code{t} (use in all major modes), @code{nil} (don't use in any major -modes), or a list of mode names, optionally preceded with @code{not} -(as in @w{@code{(not @var{mode-name} @dots{})}}). These elements can -be mixed, as shown in the following examples. +a particular major mode, and users can customize the value of the +variable to control the modes in which the minor mode will be switched +on. Valid values of @code{:predicate} (and thus valid values of the +user option it creates) include @code{t} (use in all major modes), +@code{nil} (don't use in any major modes), or a list of mode names, +optionally preceded with @code{not} (as in @w{@code{(not +@var{mode-name} @dots{})}}). These elements can be mixed, as shown in +the following examples. @example (c-mode (not mail-mode message-mode) text-mode) |