Rebind var in dolist to make also clisp happy
authorAttila Lendvai <attila.lendvai@gmail.com>
Tue, 11 Jul 2006 21:17:50 +0000 (21:17 +0000)
committerAttila Lendvai <attila.lendvai@gmail.com>
Tue, 11 Jul 2006 21:17:50 +0000 (21:17 +0000)
import-macros-from-lisp was broken due to this.

src/js.lisp

index e543092..bc573b8 100644 (file)
@@ -270,10 +270,11 @@ this macro."
 (defun import-macros-from-lisp (&rest names)
   "Import the named lisp macros into the js macro expansion"
   (dolist (name names)
-    (undefine-js-compiler-macro name)
-    (setf (gethash (symbol-name name) *js-macro-toplevel*)
-          (lambda (&rest args)
-            (macroexpand `(,name ,@args))))))
+    (let ((name name))
+      (undefine-js-compiler-macro name)
+      (setf (gethash (symbol-name name) *js-macro-toplevel*)
+            (lambda (&rest args)
+              (macroexpand `(,name ,@args)))))))
 
 (defun js-expand-form (expr)
   "Expand a javascript form."