Function: unless

unless is a macro defined in subr.el.gz.

Signature

(unless COND BODY...)

Documentation

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.

Probably introduced at or before Emacs version 1.2.

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defmacro unless (cond &rest body)
  "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))))