() Stefan Monnier () Mon, 22 Jul 2013 17:04:04 -0400 > RMS suggested instead: > (cond VAR (CONDITION [BODY...]) > ...) As I pointed out back then, a more general solution is a way to let-bind new variables in between cond clauses, as in (cond ( ) (let x ) ( )) which would be used in cases where we currently use (let (x) (cond ( ) ((progn (setq x ) ) )) Yes, i see this can be used as the basis of the other forms. Cool. Has anyone done a C implementation? Here's a sketch (in *scratch*): (defmacro cool-cond (&rest clauses) (let ((rev (reverse clauses)) one elab) (while (setq one (pop rev)) (setq elab (pcase one (`(let ,var ,exp) `((t (let ((,var ,exp)) (cond ,@elab))))) (`(let ,var) `((t (let (,var) (cond ,@elab))))) (_ (cons one elab))))) `(cond ,@elab))) (macroexpand '(cool-cond (nil t) (t nil))) (cond (nil t) (t nil)) (macroexpand '(cool-cond (let bar 'none) (nil t) (let foo (list bar 42)) (foo) (t nil))) (cond (t (let ((bar 'none)) (cond (nil t) (t (let ((foo (list bar 42))) (cond (foo) (t nil)))))))) -- Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) => nil