diff --git a/src/interp/comp.lisp.pamphlet b/src/interp/comp.lisp.pamphlet index f822aad..08a1438 100644 --- a/src/interp/comp.lisp.pamphlet +++ b/src/interp/comp.lisp.pamphlet @@ -309,16 +309,20 @@ (let ((fluids (S+ fluidvars SpecialVars))) (setq x (if fluids - `(,(first x) ,(second x) - (prog ,lvars (declare (special . ,fluids)) - (return ,(third x)))) - (list (first x) (second x) - (if (or lvars (contained 'RETURN (third x))) - `(prog ,lvars (return ,(third x))) - (third x)) ))))) + (progn + (format out-stream "~%~{(defvar ~S)~%~}" fluids) + `(,(first x) ,(second x) + (prog ,lvars (declare (special . ,fluids)) + (return ,(third x))))) + (list (first x) (second x) + (if (or lvars (contained 'RETURN (third x))) + `(prog ,lvars (return ,(third x))) + (third x))))))) (let ((fluids (S+ (comp-fluidize (second x)) SpecialVars))) (if fluids - `(,(first x) ,(second x) (declare (special . ,fluids)) . ,(cddr x)) + (progn + (format out-stream "~%~{(defvar ~S)~%~}" fluids) + `(,(first x) ,(second x) (declare (special . ,fluids)) . ,(cddr x))) `(,(first x) ,(second x) . ,(cddr x)))))) ; Fluidize: Returns a list of fluid variables in X