Implement JS and JS-INLINE in terms of JS* and JS-INLINE*
authorMarco Baringer <mb@bese.it>
Mon, 15 Aug 2005 06:39:21 +0000 (06:39 +0000)
committerMarco Baringer <mb@bese.it>
Mon, 15 Aug 2005 06:39:21 +0000 (06:39 +0000)
js.lisp

diff --git a/js.lisp b/js.lisp
index 69aebe6..3d19a8e 100644 (file)
--- a/js.lisp
+++ b/js.lisp
@@ -1256,13 +1256,12 @@ this macro."
   
 
 (defmacro js (&rest body)
-  `(string-join
-    (js-to-statement-strings (js-compile '(progn ,@body)) 0)
-    (string #\Newline)))
+  `(js* '(progn ,@body)))
 
 (defmacro js* (&rest body)
-  "Just like JS except that BODY is evaluated before being
-converted to javascript."
+  "Return the javascript string representing BODY.
+
+Body is evaluated."
   `(string-join
     (js-to-statement-strings (js-compile (list 'progn ,@body)) 0)
     (string #\Newline)))
@@ -1288,8 +1287,7 @@ converted to javascript."
     (:princ (format nil "~%// ]]>~%"))))
 
 (defmacro js-inline (&rest body)
-  `(concatenate 'string "javascript:"
-    (string-join (js-to-statement-strings (js-compile '(progn ,@body)) 0) " ")))
+  `(js-inline '(progn ,@body)))
 
 (defmacro js-inline* (&rest body)
   "Just like JS-INLINE except that BODY is evaluated before being