summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-08-28 07:16:50 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-08-28 07:16:50 -0700
commit2aac8b96d028bfda879da660062ee58aae0b47be (patch)
treeb32dbaeef975858cc6725505bc589fda186acfc6 /share
parent5dfae394410270cb884f32d4f8591a60e1e4a76c (diff)
downloadtxr-2aac8b96d028bfda879da660062ee58aae0b47be.tar.gz
txr-2aac8b96d028bfda879da660062ee58aae0b47be.tar.bz2
txr-2aac8b96d028bfda879da660062ee58aae0b47be.zip
trace: bugfix: trace-redefine-check doesn't untrace.
* share/txr/stdlib/trace.tl (sys:trace-redefine-check): Move the sys:untrace call before the warning throw. That throw doesn't return; it ends up transferring control to the continue catch, and so the untrace is skipped.
Diffstat (limited to 'share')
-rw-r--r--share/txr/stdlib/trace.tl6
1 files changed, 3 insertions, 3 deletions
diff --git a/share/txr/stdlib/trace.tl b/share/txr/stdlib/trace.tl
index ae4ea7ce..28e569e6 100644
--- a/share/txr/stdlib/trace.tl
+++ b/share/txr/stdlib/trace.tl
@@ -110,10 +110,10 @@
(throwf 'warning "~!~s won't be traced, though it overrides\n\
~s which is currently traced"
name orig-name))
- (t (throwf 'warning "previously traced ~s is redefined and no\ \
+ (t (sys:untrace (list name))
+ (throwf 'warning "previously traced ~s is redefined and no\ \
longer traced"
- name)
- (sys:untrace (list name))))
+ name)))
(continue ())))))
(defmacro usr:trace (. names)