# HG changeset patch # User Kim F. Storm # Date 1174178664 0 # Node ID 5813a2f3af13781777748583f6e1d08311223b1a # Parent 52ad79a161180479638bae5e8ec9f3754843aa0a (when, unless): Doc fix. diff -r 52ad79a16118 -r 5813a2f3af13 lisp/subr.el --- a/lisp/subr.el Sun Mar 18 00:44:10 2007 +0000 +++ b/lisp/subr.el Sun Mar 18 00:44:24 2007 +0000 @@ -99,12 +99,20 @@ (list 'setq listname (list 'cdr listname))))) (defmacro when (cond &rest body) - "If COND yields non-nil, do BODY, else return nil." + "If COND yields non-nil, do BODY, else return nil. +When COND yields non-nil, eval BODY forms sequentially and return +value of last one, or nil if there are none. + +\(fn COND BODY ...)" (declare (indent 1) (debug t)) (list 'if cond (cons 'progn body))) (defmacro unless (cond &rest body) - "If COND yields nil, do BODY, else return nil." + "If COND yields nil, do BODY, else return nil. +When COND yields nil, eval BODY forms sequentially and return +value of last one, or nil if there are none. + +\(fn COND BODY ...)" (declare (indent 1) (debug t)) (cons 'if (cons cond (cons nil body))))