[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b9243b0 2/2: Minor clarification for define-minor-mode :variable
From: |
Lars Ingebrigtsen |
Subject: |
master b9243b0 2/2: Minor clarification for define-minor-mode :variable |
Date: |
Mon, 16 Aug 2021 08:25:02 -0400 (EDT) |
branch: master
commit b9243b034b9218bbc0bf6a1e12903aea008316cb
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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).
---
doc/lispref/modes.texi | 3 ++-
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 4274810..d9caeab 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
(@pxref{Generalized Variables}).
@var{place} can also be a cons @code{(@var{get} . @var{set})},
where @var{get} is an expression that returns the current state,
-and @var{set} is a function of one argument (a state) that sets it.
+and @var{set} is a function of one argument (a state) which should be
+assigned to @var{place}.
@item :after-hook @var{after-hook}
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 8a2b3b4..d9b5ea7 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.
named variable, or a generalized variable.
PLACE can also be of the form (GET . SET), where GET is
an expression that returns the current state, and SET is
- a function that takes one argument, the new state, and
- sets it. If you specify a :variable, this function does
- not define a MODE variable (nor any of the terms used
+ a function that takes one argument, the new state, which should
+ be assigned to PLACE. If you specify a :variable, this
function
+ does not define a MODE variable (nor any of the terms used
in :variable).
:after-hook A single lisp form which is evaluated after the mode hooks
have been run. It should not be quoted.