summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index a5b5aba5..bfc42f18 100644
--- a/eval.c
+++ b/eval.c
@@ -2051,8 +2051,10 @@ static val expand_qquote(val qquoted_form, val menv)
f_ex = cons(list_s, cons(expand_qquote(f, menv), nil));
}
- if (atom(r_ex)) {
- return rlcp(cons(append_s, cons(f_ex, r_ex)), qquoted_form);
+ if (nilp(r_ex)) {
+ return rlcp(cons(append_s, cons(f_ex, nil)), qquoted_form);
+ } else if (atom(r_ex)) {
+ return rlcp(cons(append_s, cons(f_ex, cons(r_ex, nil))), qquoted_form);
} else {
if (consp(r) && car(r) == unquote_s)
r_ex = cons(r_ex, nil);