From 35371c654ec1bd8d6bb6d3dbfb101120c489518b Mon Sep 17 00:00:00 2001 From: Attila Lendvai Date: Fri, 27 Nov 2009 13:46:51 +0100 Subject: [PATCH 09/11] make UNTRACE not error after FMAKUNBOUND'ing a previously traced function --- src/code/ntrace.lisp | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/code/ntrace.lisp b/src/code/ntrace.lisp index ce60ee6..6e32b1d 100644 --- a/src/code/ntrace.lisp +++ b/src/code/ntrace.lisp @@ -124,9 +124,13 @@ (error "can't trace special form ~S" x)) ((macro-function x)) (t - (values (fdefinition x) t)))) + (values (when (fboundp x) + (fdefinition x)) + t)))) (function x) - (t (values (fdefinition x) t))) + (t (values (when (fboundp x) + (fdefinition x)) + t))) (typecase res (closure (values (sb-kernel:%closure-fun res) @@ -647,7 +651,8 @@ are evaluated in the null environment." (info (gethash fun *traced-funs*))) (cond ((not info) - (warn "Function is not TRACEd: ~S" function-or-name)) + (when fun + (warn "Function is not TRACEd: ~S" function-or-name))) (t (cond ((trace-info-encapsulated info) -- 1.6.3.3