(defmacro-mundanely cond (&rest clauses)
(if (endp clauses)
nil
- (let ((clause (first clauses)))
+ (let ((clause (first clauses))
+ (more (rest clauses)))
(if (atom clause)
(error "COND clause is not a list: ~S" clause)
(let ((test (first clause))
`(let ((,n-result ,test))
(if ,n-result
,n-result
- (cond ,@(rest clauses)))))
- `(if ,test
- (progn ,@forms)
- (cond ,@(rest clauses)))))))))
+ (cond ,@more))))
+ (if (eq t test)
+ `(progn ,@forms)
+ `(if ,test
+ (progn ,@forms)
+ ,(when more `(cond ,@more))))))))))
(defmacro-mundanely when (test &body forms)
#!+sb-doc
Form: (PROGN B) Context: EVAL
Form: B Context: EVAL
Form: (COND ((FOO BAR) A (FOO A))) Context: EVAL
-Form: (IF (FOO BAR) (PROGN A (FOO A)) (COND)) Context: EVAL
+Form: (IF (FOO BAR) (PROGN A (FOO A)) NIL) Context: EVAL
Form: (FOO BAR) Context: EVAL
Form: 'GLOBAL-FOO Context: EVAL
Form: (PROGN A (FOO A)) Context: EVAL
Form: A Context: EVAL
Form: (FOO A) Context: EVAL
Form: 'GLOBAL-FOO Context: EVAL
-Form: (COND) Context: EVAL
Form: NIL Context: EVAL; bound: NIL
(COND (A B) ((FOO BAR) A (FOO A)))"))
;;; 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.25"
+"1.0.14.26"