Function: thunk-delay

thunk-delay is a macro defined in thunk.el.gz.

Signature

(thunk-delay &rest BODY)

Documentation

Delay the evaluation of BODY.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/thunk.el.gz
(defmacro thunk-delay (&rest body)
  "Delay the evaluation of BODY."
  (declare (debug (def-body)))
  (cl-assert lexical-binding)
  `(let (forced
         (val (lambda () ,@body)))
     (lambda (&optional check)
       (if check
           forced
         (unless forced
           (setf val (funcall val))
           (setf forced t))
         val))))