Revert to binding *package* in bootstrappy code
authorPaul Khuong <pvk@pvk.ca>
Sat, 29 Jun 2013 23:54:25 +0000 (19:54 -0400)
committerPaul Khuong <pvk@pvk.ca>
Sat, 29 Jun 2013 23:57:25 +0000 (19:57 -0400)
 I see no sane way to use sb!ext:print-symbol-with-prefix or
 sb-ext:... in ~//. Bind *package* to :keyword instead, for
 undefined function conditions.

 Reported by adeth on #lisp.

src/code/condition.lisp
tests/condition.pure.lisp

index a168d1a..0c4d22d 100644 (file)
 (define-condition undefined-function (cell-error) ()
   (:report
    (lambda (condition stream)
-     (format stream
-             "The function ~/sb!ext:print-symbol-with-prefix/ is undefined."
-             (cell-error-name condition)))))
+     (let ((*package* (find-package :keyword)))
+       (format stream
+               "The function ~S is undefined."
+               (cell-error-name condition))))))
 
 (define-condition special-form-function (undefined-function) ()
   (:report
index 5dca9a4..181b201 100644 (file)
 
 (with-test (:name (:printing-unintitialized-condition :bug-1184586))
   (prin1-to-string (make-condition 'simple-type-error)))
+
+(with-test (:name (:print-undefined-function-condition))
+  (handler-case (funcall '#:foo)
+    (undefined-function (c) (princ c))))