6 Nov 2009 21:14
WITH-STANDARD-IO-SYNTAX must bind *PRINT-PPRINT-DISPATCH*
Tobias C. Rittweiler <tcr <at> freebits.de>
2009-11-06 20:14:23 GMT
2009-11-06 20:14:23 GMT
Seems obvious, but SBCL doesn't do that (and hence ABCL, too, as its
pprinter stems from SBCL's code base.)
Test case:
(let ((*print-pprint-dispatch* (copy-pprint-dispatch nil)))
(set-pprint-dispatch 'symbol #'(lambda (stream obj)
(declare (ignore obj))
(write-string "FOO" stream)))
(with-standard-io-syntax
(let ((*print-pretty* t))
(assert (string= (princ-to-string 'bar) "BAR")))))
Would be cool if someone could add that to the suite as I'm scarce of
time right now.
-T.
RSS Feed