Lines Matching refs:REDUCE

3 @settitle GNU Emacs REDUCE Integrated Development Environment
18 * REDUCE IDE: (reduce-ide). REDUCE Integrated Development Environment.
22 This manual is for REDUCE IDE (version @value{VERSION}, updated
24 running REDUCE source code.
56 @title GNU Emacs REDUCE IDE
57 @subtitle An Integrated Development Environment for REDUCE:
58 @subtitle Major modes for editing and running REDUCE source code
76 @top REDUCE Integrated Development Environment
79 This manual is for REDUCE IDE, version @value{VERSION}.
80 GNU Emacs major modes for editing and running REDUCE source code
87 * Introduction:: What is REDUCE IDE?
88 * Installation:: How to install REDUCE IDE
89 * General:: General features of REDUCE edit mode
92 * Comments:: Support for REDUCE comments
95 * Completion:: Completion and expansion of REDUCE keywords
99 * Customization:: User options that control REDUCE IDE
100 * Run:: Running REDUCE in a window
102 * Command Index:: Index of REDUCE IDE commands
103 * Variable Index:: Index of REDUCE IDE configuration variables
104 * Keystroke Index:: Index of REDUCE IDE keystrokes
105 * Concept Index:: Index of general REDUCE IDE concepts
111 @chapter Introduction to REDUCE IDE
112 @cindex Introduction to REDUCE IDE
115 (IDE) for REDUCE, which comprises a primary major mode for
116 syntax-directed editing of REDUCE source code (edit mode) and a
117 subsidiary major mode for running REDUCE as an inferior process with
118 input and output via a buffer (run mode). REDUCE is a system and
124 project. REDUCE is also written in Lisp, as is (most of) Emacs.
125 However, the REDUCE user language is similar to Algol-60 (which looks
128 I began development of REDUCE edit mode tentatively in late 1992 and
130 began development of REDUCE run mode in late 1998. The latest
136 The current version of the REDUCE IDE is intended for use with GNU
142 REDUCE IDE version 1.5 provides two major updates. One is a
143 substantial rewrite of REDUCE run mode to provide explicit support for
144 both CSL and PSL REDUCE, and for easily running multiple REDUCE
147 the REDUCE IDE web page}, which makes installation and updating very
152 (only) PSL REDUCE currently does not run correctly without some
153 additional support. The problem appears to be that PSL REDUCE needs
159 and REDUCE.
161 The purpose of REDUCE edit mode is to provide editing commands that are
162 aware of the syntax of the REDUCE language, and therefore allow
167 potential REDUCE programming errors by showing how the REDUCE parser is
168 likely to interpret the code (@pxref{Indentation,, Indenting REDUCE code
171 The purpose of REDUCE run mode is to provide a friendly interface to a
172 @strong{command-line version} of REDUCE running as an inferior process
173 in an Emacs buffer. REDUCE run mode inherits much of its
174 functionality from REDUCE edit mode and cannot be run alone. The
175 assumption is that normal use will involve editing one or more REDUCE
176 source files and running REDUCE simultaneously, and this is what
177 REDUCE run mode aims to support. REDUCE run mode is described in its
178 own sub-manual: @pxref{Run, Running REDUCE in a buffer}.
182 All REDUCE IDE commands are self-documenting as usual in Emacs,
184 the version of a REDUCE mode that is actually installed in your Emacs,
191 @chapter Installation of REDUCE IDE
192 @cindex Installation of REDUCE IDE
195 the latest complete REDUCE IDE package as described in the
197 installation section of the main REDUCE IDE web page}. None of the
201 REDUCE run mode, are for users who want to install and configure
202 REDUCE IDE ``by hand'', or who want to understand the installation
205 REDUCE edit mode is provided by a file called @file{reduce-mode.el},
223 Before REDUCE mode can be used, the file @file{reduce-mode.elc} must be
228 (explicitly or implicitly) turn on REDUCE mode. The way to do this, on
235 "Major mode for REDUCE code editing" t)
239 you select REDUCE mode. It could therefore quite safely be put in a
243 It is also very convenient to have REDUCE mode turned on automatically
244 when editing a REDUCE source code file. This can be done based on the
245 ``extension'' of the filename. Provided you end all REDUCE source code
259 Installation of REDUCE run mode is documented separately. @xref{Run, ,
260 Running REDUCE in a buffer}.
265 @chapter General features of REDUCE edit mode
270 REDUCE edit mode can be selected by giving the command @kbd{M-x
273 of the REDUCE IDE}).
275 The commands provided by REDUCE mode are aware of REDUCE syntax and
277 the special comment commands (@pxref{Comments,, Support for REDUCE
279 indentation (@pxref{Indentation,, Indenting REDUCE code automatically})
281 mechanisms or by re-binding the standard keys to REDUCE-mode versions of
288 The standard Emacs syntax tables have been modified to reflect REDUCE
289 syntax, so that for example Emacs knows that the REDUCE escape character
291 the REDUCE escape character. @xref{Font-Lock,,Font-lock support for
297 Loading the REDUCE mode library runs any functions on
299 features of REDUCE mode such as its key map. Entry to REDUCE mode runs
301 buffer-local features of REDUCE mode, e.g.@: to turn on font-lock mode.
302 @xref{Installation,, Installation of the REDUCE IDE}.
303 @xref{Customization,, Customization of the REDUCE IDE}.
305 REDUCE mode is intended to support both the algebraic and symbolic modes
306 of REDUCE@. It provides very limited support for Lisp syntax to the
323 facilities of REDUCE mode.
332 The most basic facility provided by REDUCE mode is the ability to move
333 forward and backward by statement through a file of REDUCE source code.
342 square brackets are not normally used in REDUCE). Bracket skipping is
366 Emacs considers REDUCE statements to be terminated by the statement
382 The current philosophy of REDUCE mode is that the statements within
387 REDUCE mode will let a simple statement-oriented command move out of
391 (@pxref{Customization,, Customization of the REDUCE IDE}), which
459 Files of REDUCE source code frequently consist mainly of procedure
461 is true of most of the source code of the REDUCE system itself. REDUCE
463 kinds of REDUCE procedures provided they contain the keyword
527 @xref{Indentation,, Indenting REDUCE code automatically}.
535 function to REDUCE procedures, to which the standard key @kbd{C-M-l} is
548 To restrict all editing to a single REDUCE procedure, the standard Emacs
566 @chapter Support for REDUCE comments
569 There are two comment conventions used in REDUCE@. One is the comment
572 much in modern REDUCE code. The most commonly used form of comment
581 currently no way to use any of the REDUCE syntax-directed commands on
588 Indeed, the comment conventions supported by REDUCE mode are modelled
595 Indenting REDUCE code automatically}.
623 @xref{Indentation,, Indenting REDUCE code automatically}.
642 comment text. Hence, REDUCE mode rebinds the key @kbd{M-q} that
645 REDUCE code (unlike @code{fill-paragraph} etc., which would be a
659 REDUCE mode also provides commands for turning sections of text into
662 intended primarily for temporarily preventing REDUCE from executing
696 @chapter Indenting REDUCE code automatically
709 indentation currently provided by REDUCE mode is very inflexible and
716 REDUCE IDE}), the default value of which is 3. This is the indentation
717 recommended by A. C. Hearn (the principal author of REDUCE) for the
720 REDUCE mode provides fairly intelligent automatic indentation. The
738 it is unavoidable (given the syntax of REDUCE and the indentation style
749 flexibility provided by REDUCE mode. To force a line back to its
774 Indent or re-indent the current line as REDUCE code. Indents to a fixed
793 clause. Therefore, REDUCE mode can automatically re-indent the current
807 of the REDUCE IDE}.
812 Toggle REDUCE Auto Indent mode. With a prefix argument, turn the mode
813 on if and only if the argument is positive. When REDUCE Auto Indent
834 Indent or re-indent the region as REDUCE source code by applying
854 @key{TAB}}. (However, currently this is rebound by REDUCE run mode.
872 Unindent the current line as REDUCE code by deleting
881 @chapter Templates for REDUCE structures
885 Commands are provided to insert and format the major REDUCE language
945 Abbrev Expansion, emacs, The Emacs Editor}). REDUCE mode provides
946 completion of common REDUCE key words and phrases, such as
954 REDUCE mode also provides @emph{abbreviations} that are expanded like
987 Perform completion on the REDUCE symbol preceding point (or preceding
1007 The first version of font-lock support for REDUCE mode was contributed
1010 facilities, or interactively most easily via the REDUCE mode font-lock
1029 symbolic mode of REDUCE then you might prefer the highlighting tailored
1034 REDUCE mode does not make any (user configurable) face definitions of
1049 main REDUCE keywords
1057 currently used only by REDUCE run mode
1065 REDUCE mode font-lock sub-menu. To turn on font-lock mode automatically
1066 with REDUCE mode, put this in your @file{.emacs} file:
1075 @code{font-lock-maximum-decoration}, which REDUCE mode respects.
1085 REDUCE mode passes information to font-lock mode via the value of the
1087 or modified via the REDUCE mode hook, although this is not recommended.
1102 This leads to a problem with a language such as REDUCE, because the
1108 to deal with this problem. The solution currently adopted in REDUCE
1114 the core REDUCE system files).
1125 REDUCE mode can provide information about the procedure that point is
1149 is off the top of the screen. REDUCE mode can show in the mode line the
1152 the REDUCE mode menu; it is off by default. (It is analogous to the
1159 Toggle REDUCE Show Proc mode. With a prefix argument, turn REDUCE Show
1160 Proc mode on if and only if the argument is positive. When REDUCE Show
1175 REDUCE mode supports the standard Emacs @code{Imenu} facilities
1177 easiest way to use them is via the REDUCE menu entry that builds a new
1178 (nested) menu of REDUCE procedure and operator names. Selecting an
1183 name. The REDUCE mode @code{Imenu} menu-bar menu name and the regular
1185 (@pxref{Customization,, Customization of the REDUCE IDE}).
1195 A REDUCE mode submenu provides rapid access to some of the main
1197 commands (and submenu options) facilitate tagging the REDUCE files in
1200 project or package; the latter for tagging all REDUCE packages in a
1206 via the REDUCE mode submenu. @xref{Xref,, Find Identifier References,
1210 which should be available in the Emacs @code{bin} directory. REDUCE
1226 Generate a REDUCE TAGS file for (all @file{.red} files in) the
1232 Generate a REDUCE TAGS file for (all @code{.red} files in) the
1246 REDUCE mode extends some of the standard Emacs handling of parenthesised
1247 ``lists'' to include REDUCE group and block constructs. It provides a
1249 chapter also discusses known and potential problems using REDUCE mode,
1251 in Emacs in general and in REDUCE mode in particular.
1257 * Version:: REDUCE mode version information
1306 REDUCE Show Delim mode is based closely on Show Paren mode
1310 Show Delim mode is turned on automatically when REDUCE mode is
1322 Toggle REDUCE Show Delim mode. With a prefix argument, turn REDUCE
1324 REDUCE Show Delim mode is enabled, any matching delimiter is
1326 time. @xref{Customization,, Customization of the REDUCE IDE}.
1332 them are highlighted. To customize REDUCE Show Delim mode, type
1372 REDUCE mode adds a major-mode menu called ``REDUCE'' to the menu bar,
1379 @section REDUCE mode version information
1380 @cindex REDUCE mode version information
1384 The version of REDUCE mode that is running is available as the value of
1387 menu option from the REDUCE major mode menu or by running the command
1389 @code{*Messages*} buffer). If REDUCE mode is not running then an easy
1391 @kbd{C-x b tmp}) and then switch it to REDUCE mode (by using @kbd{M-x
1402 There is a problem with the way that REDUCE mode handles an exclamation
1412 will be compatible with REDUCE mode, although I am not aware of any
1413 conflicts. Two minor modes that are known to be compatible with REDUCE
1435 in REDUCE mode in particular, which are not directly accessible on all
1465 @chapter Customization of REDUCE IDE
1471 REDUCE IDE supports a small amount of customization. The following
1473 customization facilities. The main REDUCE customization group is called
1474 ``REDUCE'', under which are the two sub-groups ``REDUCE Interface'' and
1475 ``REDUCE Format & Display'' and two hooks.
1477 REDUCE IDE font-lock support can be customized by resetting standard
1481 Customization of REDUCE run mode is documented separately. @xref{Run
1482 Customization, , Customization of REDUCE run mode}.
1487 * Hooks:: REDUCE mode hooks
1491 @section REDUCE mode interface customization
1501 Default value @code{nil}. If non-nil then REDUCE mode automatically
1505 Default value "Procs/Ops". The title to use if REDUCE mode adds a
1513 Association list of REDUCE-mode completions searched by
1524 @section REDUCE mode format & display customization
1533 Default value 3. Depth of successive indentation in REDUCE code.
1565 mode). Face used for a matching REDUCE delimiter.
1569 mode). Face used for a mismatching REDUCE delimiter.
1584 @section REDUCE mode hooks
1588 standard customization facilities. When the REDUCE mode library is
1591 This hook would be appropriate for modifying global properties of REDUCE
1594 When REDUCE mode is activated in a buffer the last step of its
1599 @xref{Installation,, Installation of the REDUCE IDE}, for further
1604 Default value @code{nil}. List of functions to be called when REDUCE
1607 REDUCE mode such as its key map, i.e.@: it is a good place to put
1611 Default value @code{nil}. List of functions to be called when REDUCE
1613 REDUCE mode, e.g.@: use @code{turn-on-font-lock} to turn on font-lock
1620 @chapter Running REDUCE in an Emacs window
1621 @cindex Running REDUCE
1624 REDUCE run mode is a subsidiary of REDUCE edit mode, in the sense that
1625 it requires REDUCE edit mode to be loaded before it is loaded (which
1628 REDUCE interactively in an Emacs window, with input from and output to
1631 In fact, it allows you to run CSL and/or PSL REDUCE simultaneously and
1632 independently in multiple windows. You specify your preferred REDUCE
1634 start CSL or PSL REDUCE specifically. (The default preference is CSL
1635 REDUCE, mainly because it seems to be slightly more robust.)
1637 You can also run a REDUCE source code file or an Emacs buffer
1638 containing REDUCE source code (in REDUCE mode) as a completed REDUCE
1642 REDUCE statements, procedures or general regions of code in a REDUCE
1643 mode buffer can be sent to REDUCE running in another buffer. If
1644 REDUCE is running in multiple buffers then you select which buffer to
1645 use. If you try to send REDUCE code to REDUCE but REDUCE is not
1646 running, then REDUCE run mode will (optionally) start REDUCE
1650 * Run Introduction:: Introduction to REDUCE run mode
1651 * Run Installation:: Installation of REDUCE run mode
1652 * PSL on Windows:: Running PSL REDUCE on Microsoft Windows
1653 * Run Customization:: Customization of REDUCE run mode
1654 * Run REDUCE:: Running, re-running and switching to REDUCE
1655 * Run REDUCE Program:: Running complete REDUCE programs
1656 * Evaluating Code:: Inputting code fragments to REDUCE
1657 * Processing REDUCE Files:: Inputting, compiling and loading REDUCE files
1664 @section Introduction to REDUCE run mode
1665 @cindex Introduction to REDUCE run mode
1667 REDUCE run mode provides the following facilities for running REDUCE:
1677 bracket and delimiter highlighting or matching as in REDUCE edit mode;
1679 easy REDUCE package loading, source file input and module compilation;
1681 seamless integration with source files being edited using REDUCE edit
1683 arbitrary regions or the whole file to REDUCE;
1685 optional automatic starting of REDUCE;
1697 any other REDUCE interface, with the notable exception of typeset
1701 REDUCE run mode is provided as a separate library so that if you
1702 prefers another REDUCE interface you do not need to install it. It is
1703 a subsidiary library to REDUCE edit mode and when loaded it hooks
1704 itself into and cooperates closely with REDUCE edit mode.
1706 REDUCE run mode is based closely on the standard library @file{inf-lisp}
1723 @section Installation of REDUCE run mode
1724 @cindex Installation of REDUCE run mode
1727 the latest complete REDUCE IDE package as described in the
1729 installation section of the main REDUCE IDE web page}. None of the
1734 , Installation of REDUCE IDE}.)
1736 REDUCE run mode requires the library @file{reduce-mode} both when it is
1745 (autoload 'run-reduce "reduce-run" "Run a REDUCE process" t)
1749 REDUCE run mode from REDUCE edit mode then also put the following in
1759 @section Running PSL REDUCE on Microsoft Windows
1761 @cindex Running PSL REDUCE on Windows
1763 It seems that PSL REDUCE on Windows currently needs to be run
1769 @file{reduce-run-redpsl.bat} in the same folder as REDUCE IDE and
1770 REDUCE run mode automatically executes this file in order to run PSL
1771 REDUCE. The file just contains the following two lines (apart from an
1780 @file{redpsl.bat} on your computer. (If you include the REDUCE
1782 automatically by the REDUCE installer---then you can optionally just
1788 @file{reduce-run-redpsl.bat} as the command to start PSL REDUCE. If
1794 @section Customization of REDUCE run mode
1800 REDUCE run mode provides a small amount of customization and the
1802 customization facilities. The main REDUCE customization group is
1803 called ``REDUCE'', under which REDUCE run mode provides a sub-group
1804 ``REDUCE Run'' that allows the following options to be customized.
1807 correctly otherwise REDUCE will not run correctly. The settings of
1820 for each of the main Lisp versions on which REDUCE is distributed,
1822 in which commands that do not specify the REDUCE version try to run
1823 REDUCE versions; see below. Each element is a ``dotted pair'' of
1825 the command to run that version of REDUCE using a command-line
1827 above by the default value for CSL REDUCE.
1835 On Microsoft Windows REDUCE run mode uses full pathnames by default
1836 and moreover it uses a separate batch file to run PSL REDUCE, as
1837 described above (@pxref{PSL on Windows, Running PSL REDUCE on
1843 prompts in REDUCE run mode. The default works well for CSL REDUCE.
1845 REDUCE run buffer.
1850 @c REDUCE processes, i.e.@: input generated by REDUCE run mode rather than
1855 REDUCE process will automatically start a new one if none is already
1861 start REDUCE will always start a new REDUCE process in a new distinct
1862 buffer, even if REDUCE is already running. Otherwise, they will
1863 re-use any appropriate running REDUCE process.
1867 Default value @code{nil}. The main hook for customising REDUCE run
1872 Default value @code{nil}. The hook run when REDUCE run mode is
1878 to save on REDUCE run mode's input history. The value is a regular
1887 contains REDUCE source code. If a file is loaded into a buffer that is
1888 in one of these major modes then it is considered to be a REDUCE source
1894 Absolute pathname of the directory containing REDUCE packages, or nil.
1895 This variable should be set automatically when REDUCE run mode loads.
1897 command used to run REDUCE. If the directory cannot be found then
1904 @node Run REDUCE
1905 @section Running, re-running and switching to REDUCE
1910 The main commands for starting REDUCE are @command{run-reduce},
1913 REDUCE process every time they are executed; successive REDUCE process
1915 e.g.@: @code{*CSL REDUCE*}, @code{*CSL REDUCE 1*}, @code{*CSL REDUCE
1916 2*}, @enddots{} Otherwise they only start a new REDUCE process if
1917 necessary---if an appropriate REDUCE process is already running then
1922 By default, this command starts the default REDUCE version. More
1923 precisely, it attempts to start the REDUCE version that appears first
1925 start the REDUCE version that appears second in
1926 @var{reduce-run-commands}. It names the REDUCE process buffer with
1927 the REDUCE version that it runs, e.g.@: @code{*CSL REDUCE*} or
1928 @code{*PSL REDUCE*}.
1931 command to run REDUCE from the minibuffer and runs that command. In
1932 this case, it names the REDUCE process buffer without any REDUCE
1933 version, e.g.@: @code{*REDUCE*}.
1937 This command starts CSL REDUCE and names the REDUCE process buffers
1938 that it creates @code{*CSL REDUCE*}, @code{*CSL REDUCE 1*}, etc.
1942 This command starts PSL REDUCE and names the REDUCE process buffers
1943 that it creates @code{*PSL REDUCE*}, @code{*PSL REDUCE 1*}, etc.
1946 A couple of convenience commands allow a running REDUCE process to be
1948 running REDUCE process buffer.
1951 This command is only allowed in a REDUCE process buffer. If REDUCE is
1953 reruns the version of REDUCE shown in the buffer name. (This will not
1954 work if you entered the command to run REDUCE interactively.)
1959 but it can be run interactively to switch to a running REDUCE process
1960 buffer. If the current buffer is an active REDUCE process buffer then
1961 the command does nothing; if there is only one active REDUCE process
1963 the name of an active REDUCE process buffer from the minibuffer with
1965 list of active REDUCE process buffers from which to select one. It
1967 it easy to switch repeatedly to the same REDUCE process buffer. This
1968 function is used by all commands described below that send REDUCE code
1969 fragments to a running REDUCE process.
1971 If REDUCE is not running then this command will start REDUCE
1978 @node Run REDUCE Program
1979 @section Running complete REDUCE programs
1982 run REDUCE code as an independent REDUCE program by starting the
1983 default version of REDUCE in a new process buffer named uniquely by
1984 the file or buffer containing the REDUCE code. This allows several
1985 REDUCE programs to be conveniently run simultaneously and
1989 This command reads a file name from the minibuffer, starts REDUCE in a
1991 exists) and inputs the file into REDUCE.
1995 This command starts REDUCE in a new process buffer named uniquely by
1997 buffer into REDUCE.
2003 @section Inputting code fragments to REDUCE
2007 When developing REDUCE code, it may be convenient to be able to test
2008 fragments by inputting them into REDUCE. The following commands are
2009 intended to be used in a REDUCE edit mode buffer to send code to a
2010 REDUCE process buffer. They all use @command{switch-to-reduce} to
2012 also explicitly switch to the REDUCE process window.
2016 before point and point to REDUCE. The assumption is that point is at
2017 the end of a REDUCE statement, but this is not checked so it is
2022 This command sends the code in the selected region to REDUCE.
2027 to REDUCE.
2032 @node Processing REDUCE Files
2033 @section Inputting, compiling and loading REDUCE files
2037 The following commands deal with complete REDUCE files that do not
2041 Read a file name from the minibuffer and input the file into a REDUCE
2053 Read a REDUCE package name from the minibuffer and load it into a
2054 REDUCE process. The read process uses completion based on the files
2055 in the REDUCE package directory specified by the variable
2057 correctly when REDUCE run mode loads. Pressing the @kbd{tab} key
2070 by default) then all commands that require a REDUCE process
2072 Customization of REDUCE run mode}. Where appropriate, input commands
2073 have their own history lists, and if run in REDUCE edit mode then any
2076 The following key bindings are provided in both REDUCE edit and run
2085 Input a REDUCE source file into the REDUCE process. Echo it if
2087 default meaning in REDUCE mode.)
2093 Load a REDUCE package into the REDUCE process.
2099 Compile a REDUCE source file to a FASL image in the REDUCE process.
2103 The following key bindings are added to REDUCE edit mode:
2110 Send the previous statement to the REDUCE process, and switch to its
2119 Send the current procedure definition to the REDUCE process, and switch
2126 Send the current region to the REDUCE process, and switch to its buffer.
2132 Switch to the REDUCE process buffer. With an argument, position the
2137 that omit the ``-and-go'' prefix, which do not switch to the REDUCE
2142 comint mode, are provided in REDUCE run mode:
2150 @c Send the previous statement to the REDUCE process.
2151 @c Prefix argument means switch to the REDUCE buffer afterwards.
2157 Perform completion on the REDUCE symbol preceding point (or preceding
2162 argument (in raw form). (This key binding is exactly as in REDUCE mode.
2167 The REDUCE run library provides a REDUCE run major mode menu and also
2168 adds a slightly modified version of this menu to the menu bar in REDUCE
2170 commands, and to echoing and highlighting control for REDUCE run mode.
2188 REDUCE edit (and if relevant run) mode that you are using. (This
2190 do this is to send me the Emacs and REDUCE IDE version strings. You
2192 latter from the REDUCE major mode menus, in all cases by selecting the