The command interpreter is a function which reads key-events (see section key-events-intro) from the keyboard and dispatches to different commands on the basis of what the user types. When the command interpreter executes a command, we say it invokes the command. The command interpreter also provides facilities for communication between commands contiguously running commands, such as a last command type register. It also takes care of resetting communication mechanisms, clearing the echo area, displaying partial keys typed slowly by the user, etc.
This variable contains a function the command interpreter calls when it wants
to invoke a command. The function receives the command and the prefix argument
as arguments. The initial value is a function which simply funcalls the
command-function
of the command with the supplied prefix argument. This is
useful for implementing keyboard macros and similar things.
The command interpreter invokes the function in this variable whenever someone
aborts a command (for example, if someone called editor-error
).
When Hemlock initially starts the command interpreter is in control, but commands may read from the keyboard themselves and assign whatever interpretation they will to the key-events read. Commands may call the command interpreter recursively using the function recursive-edit.