comparison lisp/subr.el @ 81863:885122f2f146

(when, unless): Doc fix.
author Juanma Barranquero <lekktu@gmail.com>
date Sat, 14 Jul 2007 11:07:24 +0000
parents f7d2bfbd3abc
children 76546b143f2d 0ece58f6e0aa a66921565bcb
comparison
equal deleted inserted replaced
81862:4dbb728eaf94 81863:885122f2f146
101 (defmacro when (cond &rest body) 101 (defmacro when (cond &rest body)
102 "If COND yields non-nil, do BODY, else return nil. 102 "If COND yields non-nil, do BODY, else return nil.
103 When COND yields non-nil, eval BODY forms sequentially and return 103 When COND yields non-nil, eval BODY forms sequentially and return
104 value of last one, or nil if there are none. 104 value of last one, or nil if there are none.
105 105
106 \(fn COND BODY ...)" 106 \(fn COND BODY...)"
107 (declare (indent 1) (debug t)) 107 (declare (indent 1) (debug t))
108 (list 'if cond (cons 'progn body))) 108 (list 'if cond (cons 'progn body)))
109 109
110 (defmacro unless (cond &rest body) 110 (defmacro unless (cond &rest body)
111 "If COND yields nil, do BODY, else return nil. 111 "If COND yields nil, do BODY, else return nil.
112 When COND yields nil, eval BODY forms sequentially and return 112 When COND yields nil, eval BODY forms sequentially and return
113 value of last one, or nil if there are none. 113 value of last one, or nil if there are none.
114 114
115 \(fn COND BODY ...)" 115 \(fn COND BODY...)"
116 (declare (indent 1) (debug t)) 116 (declare (indent 1) (debug t))
117 (cons 'if (cons cond (cons nil body)))) 117 (cons 'if (cons cond (cons nil body))))
118 118
119 (defvar --dolist-tail-- nil 119 (defvar --dolist-tail-- nil
120 "Temporary variable used in `dolist' expansion.") 120 "Temporary variable used in `dolist' expansion.")