From ee21c61785cead30fb0f1cde1f6fd9900e358268 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 6 Feb 2015 06:58:20 -0800 Subject: * eval.c (subst_vars): Bugfix. When an ordinary variable occurs in the quasi syntax (which is the result of substitution of metanums like @1 by the op macro), if that variable evaluated to a list form, it was not being converted to a string. The resulting form was then examined for variable substitutions as if it were part of the quasi syntax. This was introduced at the same time as the feature of being able to use metanums in a quasiliteral (Feb 13, 2012: last change before Version 57). --- eval.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index eaa7960f..87616a08 100644 --- a/eval.c +++ b/eval.c @@ -2071,18 +2071,8 @@ static val subst_vars(val forms, val env) continue; } } else if (bindable(form)) { - val pair = lookup_var(env, form); - - if (pair) { - val str = cdr(pair); - - if (!stringp(str) && !listp(str)) - str = format(nil, lit("~a"), str, nao); - - forms = cons(str, rest(forms)); - continue; - } - eval_error(forms, lit("unbound variable ~s"), form, nao); + forms = cons(cons(var_s, cons(form, nil)), cdr(forms)); + continue; } iter = list_collect(iter, form); -- cgit v1.2.3