From: David Vazquez Date: Sun, 23 Dec 2012 21:41:28 +0000 (+0000) Subject: Fix js-eval. Macros bug fixed! X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=c145fe9a3356a4a710dc8ccd9cb34c2e852f2370;p=jscl.git Fix js-eval. Macros bug fixed! --- diff --git a/lispstrack.lisp b/lispstrack.lisp index 3fff9a3..0cd2d69 100644 --- a/lispstrack.lisp +++ b/lispstrack.lisp @@ -604,8 +604,7 @@ "})()" *newline*)))) (define-compilation js-eval (string) - (concat "eval(" (ls-compile string env fenv) ")")) - + (concat "eval.apply(window, [" (ls-compile string env fenv) "])")) (define-compilation error (string) (concat "(function (){ throw " (ls-compile string env fenv) ";" "return 0;})()")) diff --git a/test.lisp b/test.lisp index 101964c..10187b6 100644 --- a/test.lisp +++ b/test.lisp @@ -939,7 +939,7 @@ "})()" *newline*)))) (define-compilation js-eval (string) - (concat "eval(" (ls-compile string env fenv) ")")) + (concat "eval.apply(window, [" (ls-compile string env fenv) "])")) (define-compilation error (string)