From fd210120f575183fbb5493a7ebc6b32aab107466 Mon Sep 17 00:00:00 2001 From: Paul Khuong Date: Sat, 29 Jun 2013 19:54:25 -0400 Subject: [PATCH] Revert to binding *package* in bootstrappy code 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 | 7 ++++--- tests/condition.pure.lisp | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/code/condition.lisp b/src/code/condition.lisp index a168d1a..0c4d22d 100644 --- a/src/code/condition.lisp +++ b/src/code/condition.lisp @@ -696,9 +696,10 @@ (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 diff --git a/tests/condition.pure.lisp b/tests/condition.pure.lisp index 5dca9a4..181b201 100644 --- a/tests/condition.pure.lisp +++ b/tests/condition.pure.lisp @@ -192,3 +192,7 @@ (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)))) -- 1.7.10.4