I think following code should unbind *print-length*
after exiting from "write" and print 10, but actually
CLISP prints 50.
I have tested it with LispWorks - that implementation
binds/unbinds all *print-* vars to their value if key
argument absent. That logic better, because it
protects vars from changes inside a custom print-
(defclass c () (f))
(defmethod print-object ((x c) s)
(setq *print-length* 50) (print "print-object"))
(setq *print-length* 10)
(write (make-instance 'c) )
Log in to post a comment.