[plt-scheme] 299.104

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Apr 30 20:55:58 EDT 2005

The exp-tagged code in CVS for MzScheme and MrEd is now version 299.104.

v299.103 added support for custom write procedures, but it wasn't like
Common LISP. I learned more about CL pretty printing and eventually
decided that it isn't so bad after all.

So, the main change in v299.104 is that `prop:custom-write' attaches a
single procedure to a structure type, and the procedure prints directly
to a given port.

As before, cycles and graph references are handled automatically. To
support pretty printing, a custom-write procedure must explicitly
cooperate with the pretty printer (i.e., the custom-write procedure is
generally responsible for inserting line breaks when appropriate in
pretty-printing mode). See the docs for details.

Other changes:

 * Added line- and column-tracking to output ports, and changed
   `port-count-lines!' and `port-next-location' to work on
   output ports.

 * Changed `make-output-port' to take three new arguments:
   a get-location procedure, a count-lines! procedure,
   and an initial position.

 * Added `relocate-output-port', `transplant-input-port',
   and `transplant-output-port' to MzLib's "port.ss".

 * Removed `pretty-print-display-string-handler' from MzLib's
   "pretty.ss", and adapted the protocol for hook procedures slightly;
   hook procedures usually must write to a given port, instead of
   assuming that the port is the original one.

 * Added `open-output-text-editor' to MrEd.

Matthew



Posted on the users mailing list.