Function: cond-let--when$

cond-let--when$ is a macro defined in cond-let.el.

Signature

(cond-let--when$ VARLIST BODY...)

Documentation

Bind variable $ to value of VARFORM and conditionally evaluate BODY.

If VARFORM yields a non-nil value, bind the symbol $ to that value, evaluate BODY with that binding in effect, and return the value of the last form. If VARFORM yields nil, do not evaluate BODY, and return nil. BODY must be one or more expressions. If VARLIST is empty, do nothing and return nil.

Source Code

;; Defined in ~/.emacs.d/elpa/cond-let-20260201.1500/cond-let.el
(defmacro cond-let--when$ (varform bodyform &rest body)
  "Bind variable `$' to value of VARFORM and conditionally evaluate BODY.

If VARFORM yields a non-nil value, bind the symbol `$' to that value,
evaluate BODY with that binding in effect, and return the value of the
last form.  If VARFORM yields nil, do not evaluate BODY, and return nil.
BODY must be one or more expressions.  If VARLIST is empty, do nothing
and return nil.

\(fn VARLIST BODY...)"
  (declare (indent 1) (debug (form form)))
  `(let (($ ,varform))
     (when $
       ,bodyform ,@body)))