In all cases except for the top-level, forms are read from *debug-io*, evaluated, and the results printed on *debug-io*. For the top-level, forms are read from *standard-input* and the results printed on *standard-output*. The form to be evaluated is prompted for using the function which is the value of *prompt-hook*.
When a new read-eval-print loop is entered, the condition which caused
entry to the loop is printed on *error-output*, with *print-escape*
bound to NIL. If the condition is a subtype of
error, warn or break, the corresponding condition
class name is also printed in a stylized, readable way
(eg. simple-type-error => Type Error:).
The read-eval-print loop notes any available restarts that correspond
(as though by (compute-restarts condition)) to
the condition which caused entry to the loop. If any such restarts
are available, they are printed to the output stream
(i.e. *standard-output* or *debug-io*,) after the
condition notice.
When a restart is used to abort one read-eval-print loop to return to an earlier one, the error notice and restarts for the earlier read-eval-print loop are reprinted.
Most forms entered at the read-eval-print loop prompt are evaluated in a null lexical environment, as though by eval. There are two exceptions:
If a command is given to invoke a restart interactively through the debugger, and the restart returns zero or more values rather than transferring control, the values are printed and treated like those returned by any form evaluated in the loop.
The form and value variables such as +, *, and / are special variables and are not rebound by different read-eval-print levels.