[movitz-cvs] CVS update: movitz/losp/muerte/los-closette.lisp
Frode Vatvedt Fjeld
ffjeld at common-lisp.net
Wed May 4 08:00:43 UTC 2005
Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv23533
Modified Files:
los-closette.lisp
Log Message:
Cleaned up print-unreadable-object and its usage a bit.
Date: Wed May 4 10:00:42 2005
Author: ffjeld
Index: movitz/losp/muerte/los-closette.lisp
diff -u movitz/losp/muerte/los-closette.lisp:1.30 movitz/losp/muerte/los-closette.lisp:1.31
--- movitz/losp/muerte/los-closette.lisp:1.30 Wed May 4 00:15:09 2005
+++ movitz/losp/muerte/los-closette.lisp Wed May 4 10:00:42 2005
@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef at acm.org>
;;;; Created at: Tue Jul 23 14:29:10 2002
;;;;
-;;;; $Id: los-closette.lisp,v 1.30 2005/05/03 22:15:09 ffjeld Exp $
+;;;; $Id: los-closette.lisp,v 1.31 2005/05/04 08:00:42 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -1667,18 +1667,16 @@
(write object :stream stream)))
(defmethod print-object ((object class) stream)
- (print-unreadable-object (object stream :identity nil)
- (format stream "~W ~W" (class-name (class-of object)) (class-name object)))
+ (print-unreadable-object (object stream :identity nil :type t)
+ (write (class-name object) :stream stream))
object)
(defmethod print-object ((object standard-object) stream)
- (print-unreadable-object (object stream :identity t)
- (write (class-name (class-of object))
- :stream stream))
+ (print-unreadable-object (object stream :identity t :type t))
object)
(defmethod print-object ((object structure-object) stream)
- (let* ((class (class-of object)))
+ (let ((class (class-of object)))
(format stream "#S(~S" (class-name class))
(dolist (slot (class-slots class))
(format stream " :~A ~S"
@@ -1704,8 +1702,9 @@
object)
(defmethod print-object ((x illegal-object) stream)
- (error "Won't print illegal-object ~Z." x)
- ;; (print-unreadable-object (x stream :type t :identity t))
+ (if *print-safely*
+ (print-unreadable-object (x stream :type t :identity t))
+ (error "Won't print illegal-object ~Z." x))
x)
;;;
More information about the Movitz-cvs
mailing list