From: Cyrus H. <ch...@bo...> - 2012-05-17 04:34:24
|
I'm always annoyed by messages like: Implicitly creating new generic function FOO. scrolling by in my slime window. WTF is FOO? Well, the problem is that FOO is usually in the then-current package and so the package identifier isn't printed out. The following patch causes the package name to be printed in the STYLE-WARNING. Any objections to seeing this in the tree post-freeze? thanks, Cyrus diff --git a/src/code/condition.lisp b/src/code/condition.lisp index 3e7e84e..d0b7013 100644 --- a/src/code/condition.lisp +++ b/src/code/condition.lisp @@ -1004,8 +1004,9 @@ (define-condition implicit-generic-function-warning (style-warning) ((name :initarg :name :reader implicit-generic-function-name)) (:report (lambda (condition stream) - (format stream "~@<Implicitly creating new generic function ~S.~:@>" - (implicit-generic-function-name condition))))) + (let ((*package* (find-package :keyword))) + (format stream "~@<Implicitly creating new generic function ~S.~:@>" + (implicit-generic-function-name condition)))))) (define-condition extension-failure (reference-condition simple-error) ()) |