summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-05-09 01:11:15 -0700
committerKaz Kylheku <kaz@kylheku.com>2025-05-09 01:11:15 -0700
commit8263cb7dbaf8f9238ff1573c2836e869f4811488 (patch)
tree3e58118e7b4d522f7a0d187d9e17f1d7e6bd9363
parentdc9288010b7ee83a56a982a0b8aa4bf1abdf466a (diff)
downloadtxr-8263cb7dbaf8f9238ff1573c2836e869f4811488.tar.gz
txr-8263cb7dbaf8f9238ff1573c2836e869f4811488.tar.bz2
txr-8263cb7dbaf8f9238ff1573c2836e869f4811488.zip
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.
-rw-r--r--stdlib/error.tl3
1 files changed, 1 insertions, 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)