From 3eb2ddbf68c4e76bf771b3397c3c720128d0e2a2 Mon Sep 17 00:00:00 2001 From: David Vazquez Date: Tue, 15 Jan 2013 13:43:45 +0000 Subject: [PATCH] Different quote compilation in CL and ecmalisp --- ecmalisp.lisp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ecmalisp.lisp b/ecmalisp.lisp index 396ade5..30649d2 100644 --- a/ecmalisp.lisp +++ b/ecmalisp.lisp @@ -1008,12 +1008,18 @@ ((integerp sexp) (integer-to-string sexp)) ((stringp sexp) (concat "\"" (escape-string sexp) "\"")) ((symbolp sexp) + #+common-lisp (or (cdr (assoc sexp *literal-symbols*)) (let ((v (genlit)) (s (concat "{name: \"" (escape-string (symbol-name sexp)) "\"}"))) (push (cons sexp v) *literal-symbols*) (push (concat "var " v " = " s) *toplevel-compilations*) - v))) + v)) + #+ecmalisp + (let ((v (genlit))) + (push (concat "var " v " = " (ls-compile `(intern ,(symbol-name sexp)))) + *toplevel-compilations*) + v)) ((consp sexp) (let ((c (concat "{car: " (literal (car sexp) t) ", " "cdr: " (literal (cdr sexp) t) "}"))) -- 1.7.10.4