From: Kim F. Storm Date: Sun, 18 Mar 2007 00:44:24 +0000 (+0000) Subject: (when, unless): Doc fix. X-Git-Tag: emacs-pretest-22.0.96~80 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7f67eea000b0ba102dd86c2666041dc395137413;p=emacs.git (when, unless): Doc fix. --- diff --git a/lisp/subr.el b/lisp/subr.el index 846acf52385..7f5dd726a12 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -99,12 +99,20 @@ change the list." (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))))