When Jade appears to be doing nothing it is probably sitting in the event loop waiting for input to arrive. When an input event arrives from the window system it is processed according to its type.
If the input event is a keyboard or mouse button event it is converted
into a Lisp input event (see section Input Events) and the current keymap
environment is searched for a binding of that event (see section Key Lookup).
If a binding of the event is found it defines a command (see section Commands)
to be invoked, the call-command function (see section Calling Commands)
is used to do this.
When no binding of a key or mouse button event exists the hook,
unbound-key-hook, is evaluated; if this returns nil and the
event is a keyboard event and no prefix keys (see section Prefix Keys) preceded
it the key is inserted into the current buffer before the cursor.
If the event was not a keyboard or mouse button event the event loop will deal with it itself; these events are generally things which should be transparent to Lisp programs (i.e. window exposure notification, etc...).
One exception is the event sent when a window should be closed (i.e. hitting
the close-window gadget in Intuition, or sending a window the delete-window
atom in X), the hook window-closed-hook is called. By default this
hook is setup to invoke the close-window command (as bound to
Ctrl-x 0).
Another function of the event loop is to wait for input from any of the subprocesses currently executing (see section Processes); whenever input is pending in a subprocess's standard output channel it is copied to the process objects's output stream.
After processing an event or piece of subprocess output the event loop will redisplay any part of any window which needs to be updated; this may be necessary if a window is now displaying a different part of a buffer, or if the part of the buffer it is displaying has been modified. See section Rendering.
Normally Jade will `sleep' while it's waiting for input, however after every second it spends asleep the event loop will wake up and try to do a sequence of operations; for more details see section Idle Actions.
Go to the first, previous, next, last section, table of contents.