]> git.eshelyaron.com Git - emacs.git/commitdiff
Mention cond/if as generalized variables in the manual
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 4 Oct 2022 11:57:45 +0000 (13:57 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 4 Oct 2022 11:57:45 +0000 (13:57 +0200)
* doc/lispref/variables.texi (Setting Generalized Variables):
Mention cond and if (bug#52290).

doc/lispref/variables.texi

index c70942cf3502eb3ae4ac844d214f7b511747fbd5..1d891618dad35b6e54f2f4d1c3ca70fdaa7b50fd 100644 (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