All Manuals > LispWorks Editor User Guide > 6 Advanced Features > 6.3 Programming the editor

NextPrevUpTopContentsIndex

6.3.1 Calling editor functions

All editor commands and some other editor functions expect to be called within a dynamic context that includes settings for the current buffer and current window. This happens automatically when using the editor interactively.

You can set up the context in a CAPI application by using the function capi:call-editor (see the CAPI Reference Manual ).

You can also use the following function to call editor commands and functions.

editor:process-character

Function

editor:process-character char window

Processes char in a dynamic context where the current window is window and the current buffer is the buffer currently displayed in window .

The char can be one of the following:

A string, naming an editor command to invoke.

A list of the form ( function . args ) , which causes function to be called with args . The items in args are not evaluated.

A function or symbol, which is called with nil as its argument (like a command function would be if there is no prefix argument).

A character or system:gesture-spec object, which is treated as if it has been typed on the keyboard.

There is no return value. The processing may happen in another thread, so may not have competed before this function returns.


LispWorks Editor User Guide (Unix version) - 3 May 2011

NextPrevUpTopContentsIndex