From b9243b034b9218bbc0bf6a1e12903aea008316cb Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 16 Aug 2021 14:24:53 +0200 Subject: [PATCH] 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 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 (@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 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. 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. -- 2.39.5