Previous: , Up: Commands   [Contents][Index]


7.5 Recursive Edits

Macro: use-buffer buffer {form}*

The effect of this is similar to setting the current-buffer to buffer during the evaluation of forms. There are restrictions placed on what the code can expect about its environment. In particular, the value of any global binding of a Hemlock variable which is also a mode local variable of some mode is ill-defined; if the variable has a global binding it will be bound, but the value may not be the global value. It is also impossible to nest use-buffer’s in different buffers. The reason for using use-buffer is that it may be significantly faster than changing current-buffer to buffer and back.

Hemlock Variable: Enter Recursive Edit Hook
Function: recursive-edit &optional handle-abort

recursive-edit invokes the command interpreter. The command interpreter will read from the keyboard and invoke commands until it is terminated with either exit-recursive-edit or abort-recursive-edit.

Normally, an editor-error or C-g aborts the command in progress and returns control to the top-level command loop. If recursive-edit is used with handle-abort true, then editor-error or C-g will only abort back to the recursive command loop.

Before the command interpreter is entered the hook Enter Recursive Edit Hook is invoked.

Function: in-recursive-edit

This returns whether the calling point is dynamically within a recursive edit context.

Hemlock Variable: Exit Recursive Edit Hook
Function: exit-recursive-edit &optional values-list

exit-recursive-edit exits a recursive edit returning as multiple values each element of values-list, which defaults to nil. This invokes Exit Recursive Edit Hook after exiting the command interpreter. If no recursive edit is in progress, then this signals an error.

Hemlock Variable: Abort Recursive Edit Hook
Function: abort-recursive-edit &rest args

abort-recursive-edit terminates a recursive edit by applying editor-error to args after exiting the command interpreter. This invokes Abort Recursive Edit Hook with args before aborting the recursive edit . If no recursive edit is in progress, then this signals an error.


Previous: Command Arguments, Up: Commands   [Contents][Index]