Next: , Previous: , Up: Run   [Contents][Index]


14.5 Running, re-running and switching to REDUCE

The main commands for starting REDUCE are run-reduce, run-csl-reduce and run-psl-reduce. If the user option reduce-run-multiple is non-nil then they all start a new REDUCE process every time they are executed; successive REDUCE process buffers have successively higher numbers at the end of their names, e.g. *CSL REDUCE*, *CSL REDUCE 1*, *CSL REDUCE 2*, ... Otherwise they only start a new REDUCE process if necessary—if an appropriate REDUCE process is already running then they simply switch to it. Finally, these commands run the hooks from reduce-run-mode-hook (after the comint-mode-hook is run).

Command: run-reduce

By default, this command starts the default REDUCE version. More precisely, it attempts to start the REDUCE version that appears first in reduce-run-commands, and if that fails then it attempts to start the REDUCE version that appears second in reduce-run-commands. It names the REDUCE process buffer with the REDUCE version that it runs, e.g. *CSL REDUCE* or *PSL REDUCE*.

If this command is executed with a prefix argument then it reads a command to run REDUCE from the minibuffer and runs that command. In this case, it names the REDUCE process buffer without any REDUCE version, e.g. *REDUCE*.

Command: run-csl-reduce

This command starts CSL REDUCE and names the REDUCE process buffers that it creates *CSL REDUCE*, *CSL REDUCE 1*, etc.

Command: run-psl-reduce

This command starts PSL REDUCE and names the REDUCE process buffers that it creates *PSL REDUCE*, *PSL REDUCE 1*, etc.

A couple of convenience commands allow a running REDUCE process to be re-started in the same buffer and switching from any buffer to a running REDUCE process buffer.

Command: re-run-reduce

This command is only allowed in a REDUCE process buffer. If REDUCE is running in the current buffer then it is terminated. The command then reruns the version of REDUCE shown in the buffer name. (This will not work if you entered the command to run REDUCE interactively.)

Command: switch-to-reduce

This command is primarily intended for internal use by other commands but it can be run interactively to switch to a running REDUCE process buffer. If the current buffer is an active REDUCE process buffer then the command does nothing; if there is only one active REDUCE process buffer then the command switches to it; otherwise, the command reads the name of an active REDUCE process buffer from the minibuffer with completion. This means that pressing the tab key will give a list of active REDUCE process buffers from which to select one. It remembers the last buffer used and offers that as the default, making it easy to switch repeatedly to the same REDUCE process buffer. This function is used by all commands described below that send REDUCE code fragments to a running REDUCE process.

If REDUCE is not running then this command will start REDUCE automatically by calling run-reduce if the user option reduce-run-autostart is non-nil (which by default it is).


Next: , Previous: , Up: Run   [Contents][Index]