Next: , Previous: , Up: Running REDUCE in an Emacs window   [Contents][Index]


14.8 Run mode key bindings and menu

Pressing RET at the end of a line of input sends it to REDUCE, as with the standard REDUCE interfaces. However, if there is no terminator at the end of the line then a ; is automatically appended, unless there is a ? in the input line (implying that the input is the response to a user query, which must not be followed by a terminator). You can avoid this automatic behaviour completely by holding down the SHIFT key, i.e. by pressing SHIFT-RET.

RET
reduce-run-send-input

Send the preceding input to REDUCE after appending a ; if appropriate; holding down the SHIFT key avoid this.

If the option reduce-run-autostart is non-nil (which it is by default) then all commands that require a REDUCE process automatically start one if necessary. See Customization of REDUCE Run mode. Where appropriate, input commands have their own history lists, and if run in REDUCE mode then any input file defaults to the file being edited.

The following key bindings are provided in both REDUCE edit and run modes:

C-c C-i
reduce-input-file

Input a REDUCE source file into the REDUCE process. Echo it if reduce-run-echo is non-nil. (This key binding redefines its default meaning in REDUCE mode.)

C-c C-l
reduce-load-package

Load a REDUCE package into the REDUCE process.

C-c C-f
reduce-fasl-file

Compile a REDUCE source file to a FASL image in the REDUCE process. Echo the file if reduce-run-echo is non-nil.

The following key bindings are added to REDUCE mode:

C-x C-e
reduce-eval-last-statement-and-go

Send the previous statement to the REDUCE process, and switch to its buffer. (This key binding follows Emacs convention.)

M-C-x
C-c C-e
reduce-eval-proc-and-go

Send the current procedure definition to the REDUCE process, and switch to its buffer. (The M-C-x key binding follows Emacs convention.)

C-c C-r
reduce-eval-region-and-go

Send the current region to the REDUCE process, and switch to its buffer.

C-c C-z
switch-to-reduce

Switch to the REDUCE process buffer. With an argument, position the cursor at the end of the buffer.

Versions of the above “and-go” commands are also defined with names that omit the “-and-go” prefix, which do not switch to the REDUCE process buffer. These seem to be less useful and so are not currently bound to any keys.

The following key bindings, in addition to the defaults provided by comint mode, are provided in REDUCE Run mode:

M-TAB
reduce-complete-symbol

Perform completion on the REDUCE symbol preceding point (or preceding the region if it is active). Compare that symbol against the elements of reduce-completion-alist. If a perfect match (only) has a cdr then delete the match and insert the cdr if it is a string or call it if it is a (nullary) function, passing on any prefix argument (in raw form). (This key binding is exactly as in REDUCE mode. It is included explicitly here because it is one of the REDUCE mode key bindings that is also particularly useful in REDUCE Run mode.)

The REDUCE run library provides a REDUCE run major mode menu and also adds a slightly modified version of this menu to the menu bar in REDUCE mode. These two menus provide appropriate access to all the above commands, and to echoing and highlighting control for REDUCE Run mode.


Next: Customization of REDUCE Run mode, Previous: Inputting, compiling and loading REDUCE files, Up: Running REDUCE in an Emacs window   [Contents][Index]