1.0.14.25: trivial WHEN & UNLESS change
authorNikodemus Siivola <nikodemus@random-state.net>
Fri, 8 Feb 2008 12:55:54 +0000 (12:55 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Fri, 8 Feb 2008 12:55:54 +0000 (12:55 +0000)
 * Implement directly on top of IF & PROGN instead of COND: clearer
   macroexpansion, and slightly less work to compile to boot.

src/code/defboot.lisp
version.lisp-expr

index 5035116..bce8766 100644 (file)
                        (progn ,@forms)
                        (cond ,@(rest clauses)))))))))
 
-;;; other things defined in terms of COND
 (defmacro-mundanely when (test &body forms)
   #!+sb-doc
   "If the first argument is true, the rest of the forms are
-  evaluated as a PROGN."
-  `(cond (,test nil ,@forms)))
+evaluated as a PROGN."
+  `(if ,test (progn ,@forms) nil))
+
 (defmacro-mundanely unless (test &body forms)
   #!+sb-doc
   "If the first argument is not true, the rest of the forms are
-  evaluated as a PROGN."
-  `(cond ((not ,test) nil ,@forms)))
+evaluated as a PROGN."
+  `(if ,test nil (progn ,@forms)))
+
 (defmacro-mundanely and (&rest forms)
   (cond ((endp forms) t)
         ((endp (rest forms)) (first forms))
          `(if ,(first forms)
               (and ,@(rest forms))
               nil))))
+
 (defmacro-mundanely or (&rest forms)
   (cond ((endp forms) nil)
         ((endp (rest forms)) (first forms))
index f7d2a6e..2b56830 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.14.24"
+"1.0.14.25"