From 8b34ba17b1e9420a421a65e3eaea45fec9044ead Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 14 Feb 2022 19:47:44 +0200 Subject: [PATCH] ; * doc/lispref/variables.texi (Setting Variables): Fix markup. --- doc/lispref/variables.texi | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 8b5f50562e7..9088397f9a6 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -868,24 +868,27 @@ particular, @code{setopt} will run the setter function associated with the variable. For instance, if you have: @example +@group (defcustom my-var 1 "My var." :type 'number :set (lambda (var val) (set-default var val) (message "We set %s to %s" var val))) +@end group @end example -Then the following, in addition to setting @code{my-var} to @samp{2}, +@noindent +then the following, in addition to setting @code{my-var} to @samp{2}, will also issue a message: @example (setop my-var 2) @end example -@code{setopt} can be used on regular, non-user option variables, but -is much less efficient than @code{setq}. The main use case for this -macro is setting user options in the user's init file. +The @code{setopt} macro can be used on regular, non-user option +variables, but is much less efficient than @code{setq}. The main use +case for this macro is setting user options in the user's init file. @end defmac @node Watching Variables -- 2.39.5