14.3 Hemlock Streams

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. [annotate]

make-hemlock-output-stream  mark &optional buffered [Function]
hemlock-output-stream-p  object [Function]
          

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: [annotate]

:none
No buffering is done. This is the default. [annotate]
:line
The buffer is flushed whenever a newline is written or when it is explicitly done with force-output. [annotate]
:full
The screen is only brought up to date when it is explicitly done with force-output [annotate]

hemlock-output-stream-p returns t if object is a hemlock-output-stream object. [annotate]

[annotate]

make-hemlock-region-stream  region [Function]
hemlock-region-stream-p  object [Function]
          

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. [annotate]

[annotate]

with-input-from-region  (var region) declaration form [Macro]
          

While evaluating forms, binds var to a stream which returns input from region. [annotate]

[annotate]

with-output-to-mark  (var mark buffered) declaration form [Macro]
          

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. [annotate]

[annotate]

with-pop-up-display  (var &key height name) declaration form [Macro]
random-typeout-buffers   [Variable]
          

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. [annotate]

When a buffer with name name already exists and was not previously created by with-pop-up-display, Hemlock signals an error. [annotate]

random-typeout-buffers is an association list mapping random typeout buffers to the streams that operate on the buffers. [annotate]

[annotate]