diff options
| author | Lars Ingebrigtsen | 2021-08-16 14:24:53 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-08-16 14:24:53 +0200 |
| commit | b9243b034b9218bbc0bf6a1e12903aea008316cb (patch) | |
| tree | e8d6e3a5f3ac10db19e61592038e848f554b71bb | |
| parent | adb450719a63621decab2bfb4addb030afd14db2 (diff) | |
| download | emacs-b9243b034b9218bbc0bf6a1e12903aea008316cb.tar.gz emacs-b9243b034b9218bbc0bf6a1e12903aea008316cb.zip | |
Minor clarification for define-minor-mode :variable
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
* doc/lispref/modes.texi (Defining Minor Modes): Clarify what the
setter function should do (bug#14875).
| -rw-r--r-- | doc/lispref/modes.texi | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 4274810cba5..d9caeab3bc3 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -1728,7 +1728,8 @@ anything that can be used with the @code{setf} function | |||
| 1728 | (@pxref{Generalized Variables}). | 1728 | (@pxref{Generalized Variables}). |
| 1729 | @var{place} can also be a cons @code{(@var{get} . @var{set})}, | 1729 | @var{place} can also be a cons @code{(@var{get} . @var{set})}, |
| 1730 | where @var{get} is an expression that returns the current state, | 1730 | where @var{get} is an expression that returns the current state, |
| 1731 | and @var{set} is a function of one argument (a state) that sets it. | 1731 | and @var{set} is a function of one argument (a state) which should be |
| 1732 | assigned to @var{place}. | ||
| 1732 | 1733 | ||
| 1733 | @item :after-hook @var{after-hook} | 1734 | @item :after-hook @var{after-hook} |
| 1734 | This defines a single Lisp form which is evaluated after the mode hooks | 1735 | This defines a single Lisp form which is evaluated after the mode hooks |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 8a2b3b4626a..d9b5ea74f6e 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -178,9 +178,9 @@ BODY contains code to execute each time the mode is enabled or disabled. | |||
| 178 | named variable, or a generalized variable. | 178 | named variable, or a generalized variable. |
| 179 | PLACE can also be of the form (GET . SET), where GET is | 179 | PLACE can also be of the form (GET . SET), where GET is |
| 180 | an expression that returns the current state, and SET is | 180 | an expression that returns the current state, and SET is |
| 181 | a function that takes one argument, the new state, and | 181 | a function that takes one argument, the new state, which should |
| 182 | sets it. If you specify a :variable, this function does | 182 | be assigned to PLACE. If you specify a :variable, this function |
| 183 | not define a MODE variable (nor any of the terms used | 183 | does not define a MODE variable (nor any of the terms used |
| 184 | in :variable). | 184 | in :variable). |
| 185 | :after-hook A single lisp form which is evaluated after the mode hooks | 185 | :after-hook A single lisp form which is evaluated after the mode hooks |
| 186 | have been run. It should not be quoted. | 186 | have been run. It should not be quoted. |