emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 25b97474ef: Mention cond/if as generalized variables in the manua


From: Lars Ingebrigtsen
Subject: master 25b97474ef: Mention cond/if as generalized variables in the manual
Date: Tue, 4 Oct 2022 07:57:57 -0400 (EDT)

branch: master
commit 25b97474ef00ee27fe5c1adf765e062ebd13454e
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Mention cond/if as generalized variables in the manual
    
    * doc/lispref/variables.texi (Setting Generalized Variables):
    Mention cond and if (bug#52290).
---
 doc/lispref/variables.texi | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index c70942cf35..1d891618da 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]