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.
(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
(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))))