How can I eval something a second time while keeping the lexical context?
* (defvar form '(+ 1 2))
form
* form
(+ 1 2)
* (eval form) ;; This loses the lexical scope (not an issue here)
3
For an example of the problem where the lexical scope is needed
(let ((a 1) (b 2)
(form '(+ a b)))
(print form)
(print (eval form)) )
(+ a b)
The variable A is unbound.
How do I eval that form twice in the same lexical scope?
How do eval as many times I as want (in the same lexical scope)?
Related to a previous question Why does SBCL eval function lose the macrolet it's running in?