(defmacro fn (&environment env &body body)
(with-walker-configuration (:undefined-reference-handler nil)
;; .VARS is modified implicitly in macroexpansion of the form
;; package protects against leaking symbols
(let* ((.vars nil)
(macro-name (gensym))
(ret (macroexpand-all `(macrolet ((,macro-name ()
(car (push (gensym) .vars))))
(symbol-macrolet ((_ (,macro-name)))
(progn . ,body)))
env)))
(declare (special .vars))
`(lambda ,(reverse .vars)
,ret))))
and had to add the comment because it wasn't immediately obvious what this code does.CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively