Function
Groups printing into a logical block.
pprint-logical-block stream #key prefix per-line-prefix body
suffix column => ()
<stream>.
#f or an instance of <byte-string>.
#f or an instance of <byte-string>.
<function>.
#f or an instance of <byte-string>.
<fixed-integer>, minimum 0.
io
pprint
Groups printing into a logical block. The logical block provides boundaries for new levels of indentation, affects #"linear" newlines, and so on. Prefix is a string to print at the beginning of the logical block. The blocks indentation is automatically set to be one character position greater than the column in which prefix ends. Alternatively, per-line-prefix is a string to print on every line of the logical block. This function signals an error if it is called with both prefix and per-line-prefix supplied as non-#f. Suffix is a string to print at the end of the logical block. Column advises the pretty printer as to the current column of the output stream (the default is zero). The column argument may be ignored entirely by some methods, and it may be ignored in some cases by methods that can better determine the stream's current output column.
The body keyword must be a function that can take one argument, and this argument is a stream. The body function should use the stream argument passed to it; the body function should not close over the stream argument to pprint-logical-block. Pprint-logical-block wraps stream with a pretty printing stream when stream is any other kind of stream. If stream is already a pretty printing stream, then the body function is called on stream.
All print-object methods that are written to do pretty printing must call the other pretty printing functions within the dynamic scope of a call to pprint-logical-block; otherwise, the pretty printing functions are no-ops.