From: Sam Steingold <sds@gn...> - 2005-12-18 20:12:42
> * Lennart Staflin <yrafg@...> [2005-12-18 17:12:55 +0100]:
> CLISP 2.36 - MacOS 10.3.9
> Default values for printer control variables (*print-level*,
> *print-depth* = nil, *print-pretty* = t)
> (in-package :cl-user)
> (defclass foo-class ()
> ((bar :initarg :bar)))
> (defmethod print-object ((obj foo-class) stream)
> (let ((fields (list 'bar (slot-value obj 'bar))))
> (pprint-logical-block (stream fields
> :prefix "<" :suffix ">")
> (write (car fields) :stream stream)
> (write-string " = " stream)
> (write (cadr fields) :stream stream))))
> (defparameter *foo* (make-instance 'foo-class :bar 1))
> ; => <BAR = 1>
> (list *foo*)
> ; => (>)
> It seems that pprint-logical-block only prints the suffix when
> embedded in a list.
alas, this is just one of the many clisp PP bugs.
you can find more by looking at the CLISP bug tracker
(please feel free to file more - they will be addressed, eventually),
clisp/src/TODO and `grep -i risky clisp/tests/*`.
would you like to work on this?
Sam Steingold (http://www.podval.org/~sds) running w2k
Two wrongs don't make a right, but three rights make a left.