There is an interface library, called xscheme
, distributed with
MIT Scheme and GNU Emacs, which facilitates running Scheme as a
subprocess of Emacs. If you wish to use this interface, please install
the version of `xscheme.el' that comes with MIT Scheme, as it is
guaranteed to be correct for your version of Scheme.
To invoke Scheme from Emacs, use M-x run-scheme, which is defined
when either of the libraries `scheme' or `xscheme' is loaded.
You may give run-scheme
a prefix argument, in which case it will
allow you to edit the command line that is used to invoke Scheme.
Do not remove the -emacs
option!
Scheme will be started up as a subprocess in a buffer called
*scheme*
. This buffer will be in scheme-interaction-mode
and all output from the Scheme process will go there. The mode line for
the *scheme*
buffer will have this form:
--**-*scheme*: 1 [Evaluator] (Scheme Interaction: input)------
The first field, showing `1' in this example, is the level number.
The second field, showing `[Evaluator]' in this example, describes the type of REPL that is running. Other values include:
[Debugger] [Where]
The mode after `Scheme Interaction' is one of:
When xscheme
is loaded, scheme-mode
is extended to include
commands for evaluating expressions (do C-h m in any
scheme-mode
buffer for the most up-to-date information):
xscheme-send-buffer
).
xscheme-send-definition
). This
is also bound to ESC C-x.
xscheme-send-region
).
xscheme-send-previous-expression
). This is also bound to
ESC RET.
*scheme*
buffer and places you at its end
(xscheme-select-process-buffer
).
xscheme-yank-previous-send
). This works only in the
*scheme*
buffer.
The following commands provide interrupt capability:
xscheme-send-control-g-interrupt
).
xscheme-send-control-x-interrupt
).
xscheme-send-control-u-interrupt
).
xscheme-send-breakpoint-interrupt
).
(proceed)
(xscheme-send-proceed
).