From 8263cb7dbaf8f9238ff1573c2836e869f4811488 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 9 May 2025 01:11:15 -0700 Subject: dig: don't stop at form that has source location. * stdlib/error.tl (sys:dig): Do not stop tracing the macro ancestry of a form upon finding source location info. This can be counterproductive because there are situations in which intermediate forms receive the info via rlcp or rlcp_tree. We would like to get to the form that actually exists in that file at that line number. --- stdlib/error.tl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stdlib/error.tl b/stdlib/error.tl index 6fb7178b..e83e6a5f 100644 --- a/stdlib/error.tl +++ b/stdlib/error.tl @@ -27,8 +27,7 @@ (defun sys:dig (ctx) (whilet ((form (sys:ctx-form ctx)) - (anc (unless (source-loc form) - (macro-ancestor form)))) + (anc (macro-ancestor form))) (sys:setq ctx anc)) ctx) -- cgit v1.2.3