summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--eval.c4
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 073e9a24..87855a90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-03-01 Kaz Kylheku <kaz@kylheku.com>
+
+ * 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 <kaz@kylheku.com>
* 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);
}
}