Better printing.
Fri Jul 17 10:25:03 PDT 2009 levente.meszaros@gmail.com
* Better printing.
Warning: CRC errors found. These are probably harmless but should be repaired.
See 'darcs gzcrcs --help' for more information.
diff -rN -u old-cl-walker/src/functions.lisp new-cl-walker/src/functions.lisp
--- old-cl-walker/src/functions.lisp 2014-08-01 04:55:31.000000000 -0700
+++ new-cl-walker/src/functions.lisp 2014-08-01 04:55:31.000000000 -0700
@@ -10,6 +10,12 @@
((operator :accessor operator-of :initarg :operator)
(arguments :accessor arguments-of :initarg :arguments)))
+(defmethod print-object ((argument application-form) stream)
+ (print-unreadable-object (argument stream :type t :identity t)
+ (if (slot-boundp argument 'operator)
+ (format stream "~A" (operator-of argument))
+ (write-string "#<unbound operator>" stream))))
+
(defunwalker-handler application-form (operator arguments)
(cons operator (unwalk-forms arguments)))
diff -rN -u old-cl-walker/src/infrastructure.lisp new-cl-walker/src/infrastructure.lisp
--- old-cl-walker/src/infrastructure.lisp 2014-08-01 04:55:31.000000000 -0700
+++ new-cl-walker/src/infrastructure.lisp 2014-08-01 04:55:31.000000000 -0700
@@ -342,11 +342,13 @@
(defmethod print-object ((form walked-form) stream)
(print-unreadable-object (form stream :type t :identity t)
- (when (slot-boundp form 'source)
- (let ((*print-readably* nil)
- (*print-level* 0)
- (*print-length* 4))
- (format stream "~S" (source-of form))))))
+ (if (and (slot-boundp form 'source)
+ (source-of form))
+ (let ((*print-readably* nil)
+ (*print-level* 0)
+ (*print-length* 4))
+ (format stream "~S" (source-of form)))
+ (call-next-method))))
(defmacro make-form-object (type parent &rest initargs)
(with-unique-names (custom-type)
diff -rN -u old-cl-walker/src/progn.lisp new-cl-walker/src/progn.lisp
--- old-cl-walker/src/progn.lisp 2014-08-01 04:55:31.000000000 -0700
+++ new-cl-walker/src/progn.lisp 2014-08-01 04:55:31.000000000 -0700
@@ -9,6 +9,12 @@
(defclass implicit-progn-mixin ()
((body :accessor body-of :initarg :body)))
+(defmethod print-object ((argument implicit-progn-mixin) stream)
+ (print-unreadable-object (argument stream :type t :identity t)
+ (if (slot-boundp argument 'body)
+ (format stream "~A" (body-of argument))
+ (write-string "#<unbound body>" stream))))
+
(defclass implicit-progn-with-declare-mixin (implicit-progn-mixin)
((declares :initform nil :accessor declares-of :initarg :declares)))