Use sb!ext:print-symbol-with-prefix in implicit-generic-function-warning.
authorAttila Lendvai <attila.lendvai@gmail.com>
Sun, 2 Jan 2011 15:42:15 +0000 (16:42 +0100)
committerPaul Khuong <pvk@pvk.ca>
Fri, 28 Jun 2013 04:18:16 +0000 (00:18 -0400)
 and export this useful function from sb-exr.

 Slight mangling by Paul Khuong.

NEWS
package-data-list.lisp-expr
src/code/condition.lisp

diff --git a/NEWS b/NEWS
index 6d75cdf..6ac9c92 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ changes relative to sbcl-1.1.8:
   * enhancement: disassemble now annotates some previously missing static
     functions, like LENGTH.
   * enhancement: clean.sh now also cleans doc/internals.
+  * enhancement: SB-EXT:PRINT-SYMBOL-WITH-PREFIX can be used within ~// to
+    print a symbol with a package prefix.
   * optimization: calls to static functions on x86-64 use less instructions.
   * optimization: compute encode-universal-time at compile time when possible.
   * optimization: when referencing internal functions as #'x, don't go through
index f769209..d0ced09 100644 (file)
@@ -824,6 +824,7 @@ like *STACK-TOP-HINT* and unsupported stuff like *TRACED-FUN-LIST*."
                "DELETE-DIRECTORY"
                "SET-SBCL-SOURCE-LOCATION"
                "*DISASSEMBLE-ANNOTATE*"
+               "PRINT-SYMBOL-WITH-PREFIX"
 
                ;; stepping interface
                "STEP-CONDITION" "STEP-FORM-CONDITION" "STEP-FINISHED-CONDITION"
index 81a0ce7..a168d1a 100644 (file)
   (:report
    (lambda (condition stream)
      (format stream
-             "The function ~/sb-impl::print-symbol-with-prefix/ is undefined."
+             "The function ~/sb!ext:print-symbol-with-prefix/ is undefined."
              (cell-error-name condition)))))
 
 (define-condition special-form-function (undefined-function) ()
   ((name :initarg :name :reader implicit-generic-function-name))
   (:report
    (lambda (condition stream)
-     (let ((*package* (find-package :keyword)))
-       (format stream "~@<Implicitly creating new generic function ~S.~:@>"
-               (implicit-generic-function-name condition))))))
+     (format stream "~@<Implicitly creating new generic function ~
+                     ~/sb-impl::print-symbol-with-prefix/.~:@>"
+             (implicit-generic-function-name condition)))))
 
 (define-condition extension-failure (reference-condition simple-error)
   ())