X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fprint-object.lisp;h=50153b2af4bbe7ac1345ee0d4323aafeb8005724;hb=dfbfbd3f2499852904129738e13a70c9780f37a7;hp=df187c37d32f3c659ee87b15e2c3b79e6ae2e1b2;hpb=90c2b0563695904419451b6172efcf9c7008ad8b;p=sbcl.git diff --git a/src/pcl/print-object.lisp b/src/pcl/print-object.lisp index df187c3..50153b2 100644 --- a/src/pcl/print-object.lisp +++ b/src/pcl/print-object.lisp @@ -102,15 +102,11 @@ (defun named-object-print-function (instance stream &optional (extra nil extra-p)) - (print-unreadable-object (instance stream :type t) - (if extra-p - (format stream - "~S ~:S" - (slot-value-or-default instance 'name) - extra) - (format stream - "~S" - (slot-value-or-default instance 'name))))) + (let ((name (slot-value-or-default instance 'name))) + (print-unreadable-object (instance stream :type t :identity (not name)) + (if extra-p + (format stream "~S ~:S" name extra) + (format stream "~S" name))))) (defmethod print-object ((class class) stream) (named-object-print-function class stream))