summaryrefslogtreecommitdiff
path: root/doc/lispref/variables.texi
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-10-04 13:57:45 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-10-04 13:57:45 +0200
commit25b97474ef00ee27fe5c1adf765e062ebd13454e (patch)
tree66d89afb4e291cb7c7133241eef0c30eaf061f4c /doc/lispref/variables.texi
parentd52d6e1e106117eb4bba81a65e256e2e793037b6 (diff)
downloademacs-25b97474ef00ee27fe5c1adf765e062ebd13454e.tar.gz
Mention cond/if as generalized variables in the manual
* doc/lispref/variables.texi (Setting Generalized Variables): Mention cond and if (bug#52290).
Diffstat (limited to 'doc/lispref/variables.texi')
-rw-r--r--doc/lispref/variables.texi12
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index c70942cf350..1d891618dad 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -2697,7 +2697,17 @@ a
@result{} ("hello" "wood")
@end example
-@c FIXME? Also 'eq'? (see gv.el)
+@item
+The @code{if} and @code{cond} conditionals will work as generalized
+variables. For instance, this will set either the @code{foo} or the
+@code{bar} variable to @code{zot}:
+
+@example
+(setf (if (zerop (random 2))
+ foo
+ bar)
+ 'zot)
+@end example
@end itemize
@noindent