It is possible to create streams which output to or get input from a buffer. This mechanism is quite powerful and permits easy interfacing of Hemlock to Lisp.
&optional
buffered ¶make-hemlock-output-stream
returns a stream that inserts at the permanent
mark mark all output directed to it. Buffered controls whether the
stream is buffered or not, and its valid values are the following keywords:
:none
No buffering is done. This is the default.
:line
The buffer is flushed whenever a newline is written or
when it is explicitly done with force-output
.
:full
The screen is only brought up to date when it is
explicitly done with force-output
hemlock-output-stream-p
returns t
if object is a
hemlock-output-stream
object.
make-hemlock-region-stream
returns a stream from which the text in
region can be read. hemlock-region-stream-p
returns t
if
object is a hemlock-region-stream
object.
While evaluating forms, binds var to a stream which returns input from region.
During the evaluation of the forms, binds var to a stream which
inserts output at the permanent mark. Buffered has the same meaning as
for make-hemlock-output-stream
.
&key
height name) {declaration}* {form}*
¶This macro executes forms in a context with var bound to a stream. Hemlock collects output to this stream and tries to pop up a display of the appropriate height containing all the output. When height is supplied, Hemlock creates the pop-up display immediately, forcing output on line breaks. The system saves the output in a buffer named name, which defaults to Random Typeout. When the window is the incorrect height, the display mechanism will scroll the window with more-style prompting. This is useful for displaying information of temporary interest.
When a buffer with name name already exists and was not previously created
by with-pop-up-display
, Hemlock signals an error.
random-typeout-buffers is an association list mapping random typeout buffers to the streams that operate on the buffers.