X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fcode%2Fcondition.lisp;h=08f2f99a562d58dad4649d6f5125c76cffe42b11;hb=0395c15ff8394bfaaed03050c1a7a131f197a732;hp=bbeac70866a4507a74279d680fe1bb43b65df1e6;hpb=f1f283e6bee12b7d70bcec52aa226d0532a490fb;p=sbcl.git diff --git a/src/code/condition.lisp b/src/code/condition.lisp index bbeac70..08f2f99 100644 --- a/src/code/condition.lisp +++ b/src/code/condition.lisp @@ -588,7 +588,8 @@ ;; is a lambda referring to condition slot accessors: ;; they're not proclaimed as functions before it has run if ;; we're under EVAL or loaded as source. - (%set-condition-report ',name ,report)))))) + (%set-condition-report ',name ,report) + ',name))))) ;;;; various CONDITIONs specified by ANSI @@ -1004,8 +1005,9 @@ ((name :initarg :name :reader implicit-generic-function-name)) (:report (lambda (condition stream) - (format stream "~@" - (implicit-generic-function-name condition))))) + (let ((*package* (find-package :keyword))) + (format stream "~@" + (implicit-generic-function-name condition)))))) (define-condition extension-failure (reference-condition simple-error) ()) @@ -1614,7 +1616,7 @@ the usual naming convention (names like *FOO*) for special variables" (define-condition deprecation-condition () ((name :initarg :name :reader deprecated-name) - (replacement :initarg :replacement :reader deprecated-name-replacement) + (replacements :initarg :replacements :reader deprecated-name-replacements) (since :initarg :since :reader deprecated-since) (runtime-error :initarg :runtime-error :reader deprecated-name-runtime-error))) @@ -1622,14 +1624,21 @@ the usual naming convention (names like *FOO*) for special variables" (let ((*package* (find-package :keyword))) (if *print-escape* (print-unreadable-object (condition stream :type t) - (format stream "~S is deprecated~@[, use ~S~]" + (apply #'format + stream "~S is deprecated.~ + ~#[~; Use ~S instead.~; ~ + Use ~S or ~S instead.~:; ~ + Use~@{~#[~; or~] ~S~^,~} instead.~]" (deprecated-name condition) - (deprecated-name-replacement condition))) - (format stream "~@<~S has been deprecated as of SBCL ~A~ - ~@[, use ~S instead~].~:@>" + (deprecated-name-replacements condition))) + (apply #'format + stream "~@<~S has been deprecated as of SBCL ~A.~ + ~#[~; Use ~S instead.~; ~ + Use ~S or ~S instead.~:; ~ + Use~@{~#[~; or~] ~S~^,~:_~} instead.~]~:@>" (deprecated-name condition) (deprecated-since condition) - (deprecated-name-replacement condition))))) + (deprecated-name-replacements condition))))) (define-condition early-deprecation-warning (style-warning deprecation-condition) ())