Function: and-let*

and-let* is a macro defined in subr.el.gz.

Signature

(and-let* VARLIST &rest BODY)

Documentation

Bind variables according to VARLIST and conditionally evaluate BODY.

Like when-let*, except if BODY is empty and all the bindings are non-nil, then the result is non-nil.

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defmacro and-let* (varlist &rest body)
  "Bind variables according to VARLIST and conditionally evaluate BODY.
Like `when-let*', except if BODY is empty and all the bindings
are non-nil, then the result is non-nil."
  (declare (indent 1) (debug if-let*))
  (let (res)
    (if varlist
        `(let* ,(setq varlist (internal--build-bindings varlist))
           (when ,(setq res (caar (last varlist)))
             ,@(or body `(,res))))
      `(let* () ,@(or body '(t))))))