summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2023-03-30 09:09:43 +0300
committerEli Zaretskii <eliz@gnu.org>2023-03-30 09:09:43 +0300
commit9b32bc134c4b4d8928df1bdc39907d9b1d6c73b5 (patch)
treea887b7c576831f9ff9d7fc77f04fa98d96af4a01 /doc
parentab4273056e0ab68a27fe807b16e2995bf84b72ec (diff)
downloademacs-9b32bc134c4b4d8928df1bdc39907d9b1d6c73b5.tar.gz
Improve documentation of 'defcustom's :set keyword
* lisp/custom.el (defcustom): * doc/lispref/customize.texi (Variable Definitions): Improve the documentation of the :set keyword in 'defcustom'.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/customize.texi9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index 308145def55..6015c134d21 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -378,8 +378,15 @@ the option as a Lisp variable); preferably, though, it should not
modify its value argument destructively. The default for
@var{setfunction} is @code{set-default-toplevel-value}.
+If defined, @var{setfunction} will also be called when evaluating a
+@code{defcustom} form with @kbd{C-M-x} in Emacs Lisp mode and when the
+@var{option}'s value is changed via the @code{setopt} macro
+(@pxref{Setting Variables, setopt}).
+
If you specify this keyword, the variable's documentation string
-should describe how to do the same job in hand-written Lisp code.
+should describe how to do the same job in hand-written Lisp code,
+either by invoking @var{setfunction} directly or by using
+@code{setopt}.
@item :get @var{getfunction}
@kindex get@r{, @code{defcustom} keyword}