Add in checks to deal with functions/macros whose names aren't symbols
authorMarco Baringer <mb@bese.it>
Mon, 12 Sep 2005 08:17:00 +0000 (08:17 +0000)
committerMarco Baringer <mb@bese.it>
Mon, 12 Sep 2005 08:17:00 +0000 (08:17 +0000)
js.lisp

diff --git a/js.lisp b/js.lisp
index 1a633f3..482a46a 100644 (file)
--- a/js.lisp
+++ b/js.lisp
@@ -226,11 +226,13 @@ to the ongoing javascript compilation."
       (setf (gethash ,(symbol-name name) *js-compiler-macros*) #',js-name))))
 
 (defun js-compiler-macro-form-p (form)
-  (when (gethash (symbol-name (car form)) *js-compiler-macros*)
+  (when (and (symbolp (car form))
+             (gethash (symbol-name (car form)) *js-compiler-macros*))
     t))
 
 (defun js-get-compiler-macro (name)
-  (gethash (symbol-name name) *js-compiler-macros*))
+  (when (symbolp name)
+    (gethash (symbol-name name) *js-compiler-macros*)))
 
 ;;; macro expansion