Page 155 Table of Contents Index Page 157
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 16. OUTPUT RECORDING

designated by stream. While body is being evaluated, the current output record for stream will
be bound to the new output record.

If record is supplied, it is the name of a variable that will be lexically bound to the new output
record inside of body. init-args are CLOS initialization arguments that are passed to make-
instance
when the new output record is created.

with-new-output-record returns the output record it creates.

The stream argument is not evaluated, and must be a symbol that is bound to an output recording
stream. If stream is t, *standard-output* is used. body may have zero or more declarations as
its first forms.

with-new-output-record must be implemented by expanding into a call to invoke-with-new-
output-record
supplying a function that executes body as the continuation argument to invoke-
with-new-output-record
. The exact behavior of this macro is described under invoke-with-
new-output-record
.

=> invoke-with-new-output-record stream continuation record-type &rest init-args &key [Generic Function]
Creates a new output record of type record-type. The function continuation is then called, and
any output it does to the output recording stream stream is captured in the new output record.
The new record is then inserted into the current "open" output record associated with stream
(or the top-level output record if there is no currently "open" one). While continuation is being
executed, the current output record for stream will be bound to the new output record.

continuation is a function of two arguments, the stream and the output record; it has dynamic
extent. init-args are CLOS initialization arguments that are passed to make-instance when the
new output record is created.

invoke-with-new-output-record returns the output record it creates.

All output recording streams must implement a method for invoke-with-new-output-record.

=> with-output-to-output-record (stream &optional record-type record &rest init-args)) &body
body [Macro]
This is identical to with-new-output-record except that the new output record is not inserted
into the output record hierarchy, and the text cursor position of stream is initially bound to
(0;0).

record-type is the type of output record to create, which defaults to standard-sequence-output-
record
. init-args are CLOS initialization arguments that are passed to make-instance when
the new output record is created.

If record is supplied, it is a variable that will be bound to the new output record while body is
evaluated.

with-output-to-output-record returns the output record it creates.


Page 155 Table of Contents Index Page 157
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E