Editor-peek-no-hang timeout. Inferior event hooks.
Moved the busy-wait loop in keyboard-read-1 into each editor-peek-no-
hang method. The gtk-screen method can then provide a version that
blocks for the specified timeout.
Added hooks to be called when inferior threads and processes are ready
with input events.
* src/edwin/bufwin.scm: Moved generalization of buffer-window/redraw!
into %clear-window-incremental-redisplay-state! -- the only part not
useful to a gtk-screen. Genericized it by doing nothing for gtk
screens.
* src/edwin/editor.scm (hook/signal-inferior-thread-output!): Added
this hook so that gtk-screen can get inferior threads to signal the
editor thread with an event other than #f. The tty screens' innermost
editor mainloops test the inferior-thread-changes? flag and return an
input event; they just need a wake-up. The gtk-screen substitutes a
procedure that directly queues the input event and thus wakes the
editor thread.
* src/edwin/image.scm (group-line-image!, substring-line-image!): New,
for parsing and imaging lines in one step.
* src/edwin/: edwin.pkg, input.scm (keyboard-peek-busy-no-hang): New.
The common, busy-waiting implementation of peek-no-hang, used in the
various tty screens.
(keyboard-peek-no-hang): The editor-peek-no-hang method now requires a
timeout argument.
(keyboard-read-1): Eliminate the wait loop. Rely on the editor-peek-
no-hang methods.
* src/edwin/: os2term.scm, tterm.scm, win32.scm, xterm.scm: Use
keyboard-peek-busy-no-hang to implement a timeout argument for the
original editor-peek-no-hang method.
* src/edwin/process.scm (register-process-input): Call the new
hook/inferior-process-output whenever an inferior process goes on the
process-input-queue. Gtk-screen uses this to queue an input event for
the editor thread, so that it will accept the (all!) inferior process
output.