From 39c7a72827a80326b7095331eceaa67661b2c6b9 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 1 Mar 2014 00:29:37 -0800 Subject: * eval.c (expand_qquote): Another bugfix: not recognizing a trailing atom that comes out of recursive call, wrapped in (quote ...), resulting in '(,a . b) expanding to (append 'a . quote b) rather than (append (list 'a) (quote b)); i.e. (append (list 'a) 'b). --- ChangeLog | 7 +++++++ eval.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 073e9a24..87855a90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-03-01 Kaz Kylheku + + * eval.c (expand_qquote): Another bugfix: not recognizing a trailing + atom that comes out of recursive call, wrapped in (quote ...), + resulting in '(,a . b) expanding to (append 'a . quote b) + rather than (append (list 'a) (quote b)); i.e. (append (list 'a) 'b). + 2014-02-28 Kaz Kylheku * eval.c (lookup_sym_lisp1): Bugfix: wasn't following the dynamic diff --git a/eval.c b/eval.c index c1b28671..dc712b89 100644 --- a/eval.c +++ b/eval.c @@ -2034,7 +2034,7 @@ static val expand_qquote(val qquoted_form, val menv) val args = expand_qquote(second(qquoted_form), menv); return rlcp(list(vector_list_s, args, nao), qquoted_form); } else { - val f = car(qquoted_form); + val f = sym; val r = cdr(qquoted_form); val f_ex; val r_ex = expand_qquote(r, menv); @@ -2065,6 +2065,8 @@ static val expand_qquote(val qquoted_form, val menv) r_ex = cons(r_ex, nil); else if (car(r_ex) == append_s) r_ex = cdr(r_ex); + else if (car(r_ex) == quote_s) + r_ex = cons(r_ex, nil); return rlcp(cons(append_s, cons(f_ex, r_ex)), qquoted_form); } } -- cgit v1.2.3