From 2aac8b96d028bfda879da660062ee58aae0b47be Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 28 Aug 2019 07:16:50 -0700 Subject: 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. --- share/txr/stdlib/trace.tl | 6 +++--- 1 file 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) -- cgit v1.2.3