Manual: fix 'my-or' examples to use let-bound variable.
authorMark H Weaver <mhw@netris.org>
Sun, 14 Apr 2013 17:36:20 +0000 (13:36 -0400)
committerMark H Weaver <mhw@netris.org>
Sun, 14 Apr 2013 17:38:28 +0000 (13:38 -0400)
Fixes <http://bugs.gnu.org/14203> reported by Nikita Karetnikov.

* doc/ref/api-macros.texi (Defining Macros, Syntax Rules): Fix
  definition of 'my-or' example macro to use the let-bound variable.

doc/ref/api-macros.texi

index ea4e8d6..a3fa83f 100644 (file)
@@ -122,8 +122,8 @@ same @var{letrec-syntax}.
                     exp)
                    ((my-or exp rest ...)
                     (let ((t exp))
-                      (if exp
-                          exp
+                      (if t
+                          t
                           (my-or rest ...)))))))
   (my-or #f "rockaway beach"))
 @result{} "rockaway beach"
@@ -323,8 +323,8 @@ Consider the definition of @code{my-or} from the previous section:
      exp)
     ((my-or exp rest ...)
      (let ((t exp))
-       (if exp
-           exp
+       (if t
+           t
            (my-or rest ...))))))
 @end example