All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

editor-pane-evaluate-region-in-listener Function

Summary

Evaluates a region of the text in an editor-pane in a Listener.

Package

capi

Signature

editor-pane-evaluate-region-in-listener editor-pane region-spec &optional listener

Arguments
editor-pane
region-spec
:buffer, :region or a list of two editor:points.
listener
nil or a listener-pane.
Description

The function editor-pane-evaluate-region-in-listener evaluates the region that is specified by region-spec inside the buffer of editor-pane (the result of editor-pane-buffer).

editor-pane-evaluate-region-in-listener first looks for a Listener:

It then chooses the region, based on region-spec.

editor-pane-evaluate-region-in-listener then repeatedly reads forms from the region and evaluates them in the Listener, until it reaches the end of the region.

The reading is done in the appropriate context of the buffer, most importantly in the correct package. The evaluation is done in the context of the Listener. Most importantly it means that any output of the evaluation (and results) appear in the Listener, but also all the dynamic enviroment of the Listener, including error handling, is applicable.

See also

editor-pane
listener-pane


CAPI User Guide and Reference Manual (Unix version) - 18 Feb 2025 15:34:22