% -*-LaTeX-*-
% <BEEBE.EPSILON>TECOMINI.LTX.11, 28-May-86 16:33:45, Edit by BEEBE
% This is part of TECO.LTX

\ETECO{} is accessible from inside \EMACS{} in a small buffer
called the {\em minibuffer}, which is displayed when the
function \EC{\CARET{}R Minibuffer}, normally bound to the key
M-Altmode, is invoked.  It appears as a small four-line window
at the top of the screen, and its contents are saved on the
command ring, which itself is stored in Q-vector \TX{.N}.  The
minibuffer can be edited as normal text, except that \A{ESC} is
made a self-inserting character, rather than bound to its usual
\EC{\CARET{}R Prefix Meta} function.  Two features of the
\EMACS{} minibuffer 
are annoying---its initial size is set at four lines, which is
often too small, and it does not have a default file attached to
it like a normal edit buffer, so saving its contents requires
a few more keystrokes than would otherwise be necessary.

In this implementation of \TECO{} on top  of \EPSILON{}, the
minibuffer is a normal buffer named \T{*MINIBUFFER*}, and it
can have a filename attached to it if the code is to be saved.

The minibuffer can be selected by any of the standard buffer
switching commands, but as in \EMACS{}, the command
\EC{minibuffer} is bound to M-Altmode (Alt-\A{ESC} in \EPSILON{}
terminology, since the \IBMPC{} keyboard has a meta-key labeled
{\em ALT}\/).\index{ALT key} Instead of doing a buffer switch,
this enters a recursive editing mode, with the minibuffer
replacing the current window.  When \EC{exit-level}, bound to
\T{C-X C-Z}, is run, the recursive editing level is exited, and
the original buffer reappears in the window.

For debugging convenience, if the last two characters in the
minibuffer are \A{ESC}'s, when \EC{minibuffer} exits, it runs
\EC{step-minibuffer} which uses the \TECO{} debugger described
in the next section to examine the program execution.

\TECO{} editing mode is automatically selected when the
minibuffer is the current buffer, or whenever a file with
extension \T{.TEC} is visited.  The only key binding change it
makes is that \A{ESC} is bound to \EC{normal-character} instead
of \EC{alt-prefix}.  Since the {\em ALT} key is still bound to
the latter, no inconvenience is incurred.

Once a \TECO{} program in the minibuffer is ready for execution,
you select the buffer which is to be the \TECO{} edit buffer,
then execute the program with \EC{execute-minibuffer}, normally
bound to \T{C-X} \A{ESC}.

The \TECO{} interpreter checks for a user abort before executing
each command, so a run-away program can always be stopped by
the \EC{abort} command bound to \T{C-G}.
