Function: cps--with-value-wrapper

cps--with-value-wrapper is a macro defined in generator.el.gz.

Signature

(cps--with-value-wrapper WRAPPER &rest BODY)

Documentation

Evaluate BODY with WRAPPER added to the stack of atomic-form wrappers.

WRAPPER is a function that takes an atomic form and returns a wrapped form.

Whenever we generate an atomic form (i.e., a form that can't iter-yield), we first (before actually inserting that form in our generated code) pass that form through all the transformer functions. We use this facility to wrap forms that can transfer control flow non-locally in goo that diverts this control flow to the CPS state machinery.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/generator.el.gz
(defmacro cps--with-value-wrapper (wrapper &rest body)
  "Evaluate BODY with WRAPPER added to the stack of atomic-form wrappers.
WRAPPER is a function that takes an atomic form and returns a wrapped form.

Whenever we generate an atomic form (i.e., a form that can't
`iter-yield'), we first (before actually inserting that form in our
generated code) pass that form through all the transformer
functions.  We use this facility to wrap forms that can transfer
control flow non-locally in goo that diverts this control flow to
the CPS state machinery."
  (declare (indent 1))
  `(let ((cps--dynamic-wrappers
          (cons
           ,wrapper
           cps--dynamic-wrappers)))
     ,@body))