From 6f554189b6081f8582e15936df914ffa73bfac62 Mon Sep 17 00:00:00 2001 From: Attila Lendvai Date: Mon, 21 Sep 2009 11:16:22 +0200 Subject: [PATCH 07/11] Use sb-impl::print-symbol-with-prefix at a few places where it's useful to see fully qualified symbol names --- src/code/class.lisp | 3 ++- src/code/condition.lisp | 8 +++++--- src/code/defmacro.lisp | 3 ++- src/code/defstruct.lisp | 3 ++- src/pcl/cpl.lisp | 9 ++++++--- src/pcl/macros.lisp | 3 ++- src/pcl/std-class.lisp | 2 +- 7 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/code/class.lisp b/src/code/class.lisp index 4e2d8fc..0db908d 100644 --- a/src/code/class.lisp +++ b/src/code/class.lisp @@ -767,7 +767,8 @@ (:primitive (error "Cannot redefine standard type ~S." name)) (:defined - (warn "Redefining DEFTYPE type to be a class: ~S" name) + (warn "redefining DEFTYPE type to be a class: ~ + ~/sb-impl::print-symbol-with-prefix/" name) (setf (info :type :expander name) nil (info :type :lambda-list name) nil (info :type :source-location name) nil))) diff --git a/src/code/condition.lisp b/src/code/condition.lisp index f9909cb..1973f74 100644 --- a/src/code/condition.lisp +++ b/src/code/condition.lisp @@ -668,7 +668,7 @@ (:report (lambda (condition stream) (format stream - "The function ~S is undefined." + "The function ~/sb-impl::print-symbol-with-prefix/ is undefined." (cell-error-name condition))))) (define-condition special-form-function (undefined-function) () @@ -1334,14 +1334,16 @@ handled by any other handler, it will be muffled.") (new-location :initarg :new-location :reader redefinition-with-defun-new-location)) (:report (lambda (warning stream) - (format stream "redefining ~S in DEFUN" + (format stream "redefining ~/sb-impl::print-symbol-with-prefix/ ~ + in DEFUN" (function-redefinition-warning-name warning))))) (define-condition redefinition-with-defgeneric (function-redefinition-warning) ((new-location :initarg :new-location :reader redefinition-with-defgeneric-new-location)) (:report (lambda (warning stream) - (format stream "redefining ~S in DEFGENERIC" + (format stream "redefining ~/sb-impl::print-symbol-with-prefix/ ~ + in DEFGENERIC" (function-redefinition-warning-name warning))))) (define-condition redefinition-with-defmethod (redefinition-warning) diff --git a/src/code/defmacro.lisp b/src/code/defmacro.lisp index 39ec97c..c43a723 100644 --- a/src/code/defmacro.lisp +++ b/src/code/defmacro.lisp @@ -89,7 +89,8 @@ ;; being incompatibly redefined. Doing this right ;; will involve finding the old macro lambda-list ;; and comparing it with the new one. - (style-warn "redefining ~S in DEFMACRO" name)) + (style-warn "redefining ~/sb-impl::print-symbol-with-prefix/ ~ + in DEFMACRO" name)) (setf (sb!xc:macro-function name) definition) ,(when set-p `(setf (%fun-doc definition) doc diff --git a/src/code/defstruct.lisp b/src/code/defstruct.lisp index 76f3c83..3d3e32c 100644 --- a/src/code/defstruct.lisp +++ b/src/code/defstruct.lisp @@ -732,7 +732,8 @@ ;;x#-sb-xc-host ;;x(when (and (fboundp accessor-name) ;;x (not (accessor-inherited-data accessor-name defstruct))) - ;;x (style-warn "redefining ~S in DEFSTRUCT" accessor-name))) + ;;x (style-warn "redefining ~/sb-impl::print-symbol-with-prefix/ ~ + ;; in DEFSTRUCT" accessor-name))) ;; which was done until sbcl-0.8.11.18 or so, is wrong: it causes ;; a warning at MACROEXPAND time, when instead the warning should ;; occur not just because the code was constructed, but because it diff --git a/src/pcl/cpl.lisp b/src/pcl/cpl.lisp index e1ac1aa..7bae6a2 100644 --- a/src/pcl/cpl.lisp +++ b/src/pcl/cpl.lisp @@ -200,14 +200,16 @@ (defun cpl-error (class format-string &rest format-args) (error "While computing the class precedence list of the class ~A.~%~A" (if (class-name class) - (format nil "named ~S" (class-name class)) + (format nil "named ~/sb-impl::print-symbol-with-prefix/" + (class-name class)) class) (apply #'format nil format-string format-args))) (defun cpl-forward-referenced-class-error (class forward-class) (flet ((class-or-name (class) (if (class-name class) - (format nil "named ~S" (class-name class)) + (format nil "named ~/sb-impl::print-symbol-with-prefix/" + (class-name class)) class))) (if (eq class forward-class) (cpl-error class @@ -256,7 +258,8 @@ (flet ((class-or-name (cpd) (let ((class (cpd-class cpd))) (if (class-name class) - (format nil "named ~S" (class-name class)) + (format nil "named ~/sb-impl::print-symbol-with-prefix/" + (class-name class)) class)))) (mapcar (lambda (reason) diff --git a/src/compiler/early-c.lisp b/src/compiler/early-c.lisp index 21f89b5..bb883b4 100644 --- a/src/compiler/early-c.lisp +++ b/src/compiler/early-c.lisp @@ -186,7 +186,8 @@ the stack without triggering overflow protection.") ;; FIXME: should be COMPILER-STYLE-WARNING? (style-warn 'sb!kernel:asterisks-around-lexical-variable-name :format-control - "using the lexical binding of the symbol ~S, not the~@ + "using the lexical binding of the symbol ~ + ~/sb-impl::print-symbol-with-prefix/, not the~@ dynamic binding" :format-arguments (list symbol))) (values)) diff --git a/src/pcl/macros.lisp b/src/pcl/macros.lisp index 996e05f..80dab6b 100644 --- a/src/pcl/macros.lisp +++ b/src/pcl/macros.lisp @@ -96,7 +96,8 @@ (ensure-non-standard-class symbol classoid)))))) (cond ((null errorp) nil) ((legal-class-name-p symbol) - (error "There is no class named ~S." symbol)) + (error "There is no class named ~ + ~/sb-impl::print-symbol-with-prefix/." symbol)) (t (error "~S is not a legal class name." symbol))))) diff --git a/src/pcl/std-class.lisp b/src/pcl/std-class.lisp index c7869ec..b1a60df 100644 --- a/src/pcl/std-class.lisp +++ b/src/pcl/std-class.lisp @@ -963,7 +963,7 @@ (style-warn "~@~@:>" + for class ~S:~4I~@:_~<~@{~/sb-impl::print-symbol-with-prefix/~^~:@_~}~:>~@:>" class dupes))) (let* ((slot (car slots)) (oslots (remove (slot-definition-name slot) (cdr slots) -- 1.6.3.3