Mention cond/if as generalized variables in the manual

* doc/lispref/variables.texi (Setting Generalized Variables):
Mention cond and if (bug#52290).
This commit is contained in:
Lars Ingebrigtsen 2022-10-04 13:57:45 +02:00
parent d52d6e1e10
commit 25b97474ef

View file

@ -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