From 955bf2b707a424dd7db884362089ee7299908b2e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 29 Dec 2015 21:04:11 -0800 Subject: last_form_evaled must track argument evaluation. * eval.c (do_eval): Set last_form_evaled to form before evaluating the arguments, so that any errors which are not attributed to their own sub forms (such as unbound symbols) are attributed to this form. --- eval.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 290ab085..2b1a3ac1 100644 --- a/eval.c +++ b/eval.c @@ -1138,16 +1138,15 @@ static val do_eval(val form, val env, val ctx, val ret, lfe_save = last_form_evaled; args_decl(args, argc); - do_eval_args(rest(form), env, form, &lookup_var, args); - last_form_evaled = form; + do_eval_args(rest(form), env, form, &lookup_var, args); debug_frame(oper, args, nil, env, nil, nil, nil); - ret = generic_funcall(cdr(fbinding), args); + debug_end; last_form_evaled = lfe_save; - debug_end; + debug_return (ret); } } -- cgit v1.2.3