From c145fe9a3356a4a710dc8ccd9cb34c2e852f2370 Mon Sep 17 00:00:00 2001 From: David Vazquez Date: Sun, 23 Dec 2012 21:41:28 +0000 Subject: [PATCH] Fix js-eval. Macros bug fixed! --- lispstrack.lisp | 3 +-- test.lisp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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) -- 1.7.10.4