From 44a9952f4d2b8146baff65bb4a8d1f898cb191eb Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Fri, 8 Feb 2008 12:55:54 +0000 Subject: [PATCH] 1.0.14.25: trivial WHEN & UNLESS change * Implement directly on top of IF & PROGN instead of COND: clearer macroexpansion, and slightly less work to compile to boot. --- src/code/defboot.lisp | 12 +++++++----- version.lisp-expr | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/code/defboot.lisp b/src/code/defboot.lisp index 5035116..bce8766 100644 --- a/src/code/defboot.lisp +++ b/src/code/defboot.lisp @@ -84,17 +84,18 @@ (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)) @@ -102,6 +103,7 @@ `(if ,(first forms) (and ,@(rest forms)) nil)))) + (defmacro-mundanely or (&rest forms) (cond ((endp forms) nil) ((endp (rest forms)) (first forms)) diff --git a/version.lisp-expr b/version.lisp-expr index f7d2a6e..2b56830 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4