home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / wp_dtp / jed207.lha / doc / jed.doc next >
Text File  |  1993-01-16  |  83KB  |  3,023 lines

  1.  
  2.                JEd V2.07 16-Jan-93
  3.              Yet another programmer's editor
  4.              Copyright (c) 1992-3 John Harper
  5.  
  6.  
  7. Contents:
  8.     Introduction
  9.     Disclaimer
  10.     Distribution
  11.     Installation
  12.     Startup
  13.     Command Language
  14.     Keyboard Mappings
  15.     ARexx
  16.     Title Bar
  17.     Miscellaneous Notes
  18.  
  19.     Command Index
  20.     Command Groups
  21.     Provided Macros
  22.     MakeRefs
  23.  
  24.     History
  25.     Known Bugs
  26.  
  27.     Contact Address
  28.  
  29.  
  30. Introduction.
  31. *************
  32.  
  33. JEd is a text editor best suited to programming, it has no text formatting
  34. capabilities (except for a dumb wordwrap). I wrote it because I found that
  35. no available editor suited me perfectly - this one does (maybe). You may
  36. have seen my previous attempt at this goal, JEd 1.something, version 2 is
  37. similar in some respects but completely different in others.
  38.  
  39. If you are looking for a straightforward, user-friendly editor -- look
  40. somewhere else :) but, if you want a non-restrictive editor which can be
  41. made to do almost anything you want then read on...
  42.  
  43. a quick feature list:
  44.     * totally customizable, all keys may be made to do anything,
  45.     user-definable menu bar, etc...
  46.     * powerful programming language
  47.     * multi-file/multi-view editing
  48.     * number of windows is only limited by memory
  49.     * clipboard support (cut/paste on any unit)
  50.     * any window can have any (non-proportional) font
  51.     * maximum number of lines in a file is 2147483648, each line can have up
  52.     to 32768 characters in it.
  53.     * fast enough, even when working with large files on a 68000 cpu
  54.     * line-undo feature
  55.     * windows can open on any public screen (usually the Workbench)
  56.     * full Un*x-style regular expression support (searches & substitutions)
  57.  
  58.  JEd needs system 2.0 or later.
  59.  
  60.  
  61. Disclaimer.
  62. ***********
  63.  
  64. THIS PROGRAM IS PROVIDED ON AN `AS IS' BASIS, NO WARRANTIES ARE MADE, EITHER
  65. EXPRESSED OR IMPLIED. IN NO EVENT WILL I, JOHN HARPER, BE LIABLE FOR ANY
  66. DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING FROM ANY USE
  67. OR MISUSE OF THESE PROGRAMS. THE ENTIRE RISK AS TO THE RESULTS AND
  68. PERFORMANCE OF THIS PROGRAM IS ASSUMED BY YOU.
  69.  
  70.  
  71. Distribution.
  72. *************
  73.  
  74. Distribute these files as much as you want, from now on and until further
  75. notice they are classed as freeware and may not be sold for more than a
  76. nominal fee to cover disks, etc.
  77.  
  78. You should be able to get the latest version by anonymous ftp from
  79. amiga.physik.unizh.ch or any of its mirrors, probably in the aminet
  80. directory util/edit.
  81.  
  82. I certainly won't refuse any donations sent to me but there is no
  83. obligation.
  84.  
  85. If you want the latest version send me a disk and return postage and you'll
  86. get it. If you just send a disk you probably won't see it again (I'm only a
  87. poor student you know :-)
  88.  
  89.  
  90. Installation.
  91. *************
  92.  
  93. Copy the executables, jed, makerefs and pubman, to somewhere in your path.
  94. Create a directory s:jed and copy the contents of the macros directory into
  95. it.
  96.  
  97. These system libraries are needed in libs:
  98.     asl.library
  99.     diskfont.library
  100.     iffparse.library
  101.  
  102. The clipboard.device is usually needed in devs:
  103. If you want to use the ARexx interface ARexx should be running.
  104.  
  105. Note:
  106.     If you want to increase the editor's scrolling speed make sure that the
  107.     commodities.library hasn't installed it's input handler. As long as no
  108.     program has the library open it should be OK, ie, don't have any
  109.     commodities installed, use DMouse or something similar instead. If you
  110.     don't believe me try scrolling through a file with no cx, then 'run
  111.     exchange' and try it again. I think that you only need to do this if you
  112.     have a 68000 cpu, it certainly works on my Amiga.
  113.  
  114.  
  115. Startup.
  116. ********
  117.  
  118. JEd can be run from the CLI or the Workbench, no files or options can be
  119. specified when running from Workbench but CLI command line has this format,
  120.  
  121.     FILES/M,PUBSCREEN/K,DTAB/N/K,CD/K
  122.  
  123. the individual keywords represent,
  124.  
  125.     FILES    files to load/create
  126.     PUBSCREEN    public screen to open on
  127.     DTAB    size of tabs in files
  128.     CD        editor's current directory (see cd)
  129.  
  130. The first window's preferences are loaded from the file s:jed.config, this
  131. file is created whenever the last editor window is closed. As well as
  132. containing all options set by the 'setpref' command it stores the dimensions
  133. of the last window as well.
  134.  
  135. After loading any files specified by the command line the script file
  136. jed-startup is executed, this can contain any normal JEd command strings, it
  137. is looked for first in the current directory and then (only if not already
  138. found) in the s:jed/ directory and then the s: directory. This file is
  139. normally used to create keybindings, macros, maybe load a menu if you want,
  140. etc...
  141.  
  142. If you don't supply a startup file the editor will be totally unusable (but
  143. you can quit :-) since initially all keys (except the cursor keys) just
  144. insert the characters that they are mapped to by the system keymap.
  145.  
  146.  
  147. Command Language.
  148. *****************
  149.  
  150. Although it is possible to use JEd without understanding its script language
  151. *much* more power can be got with a full understanding. That is what this
  152. chapter tries to give.
  153.  
  154. There are only two data types to deal with, these are strings and numbers.
  155. The language heavily enforces data typing in that it is (almost) impossible
  156. to pass a number when a string is needed, if you do manage to do this (maybe
  157. when formatting a string) you could well pay a visit to the guru's
  158. replacement.
  159.  
  160. Variables, on the other hand, have less typing, they assume the type of
  161. whatever is assigned to them.
  162.  
  163. Programs are stored in command strings, which are built up from clauses.
  164.  
  165. See also,
  166.     Value, String, Number, Command String, Clause.
  167.  
  168.  
  169. Value.
  170. ======
  171.  
  172. A "value" is an item of data, either a number or a string.
  173.  
  174. See also,
  175.     Number, String
  176.  
  177.  
  178. String.
  179. =======
  180.  
  181. A "string" is an array of characters.
  182.  
  183.  
  184. Number.
  185. =======
  186.  
  187. A "number" is a signed 32-bit integer, ie, any whole number from -2147483648
  188. through zero to +2147483647.
  189.  
  190.  
  191. Command String.
  192. ===============
  193.  
  194. A command string is a collection of clauses, one after the other. The value
  195. of the command string is the value of the last clause in the string.
  196.  
  197. Some examples of valid command strings are,
  198.  
  199.     (settitle `foo')
  200.     (global `date' (info `date'))(settitle (date))
  201.  
  202. Note that comments may be inserted between any clauses in a command string.
  203.  
  204. Also note that just because I have called command strings _command_ strings
  205. they don't have to contain symbol (or command) clauses. It is totally
  206. acceptable to have a string of string clauses or any other clause type. This
  207. is often very useful, for example by putting string or number clauses into
  208. the command strings of the if command you can simulate the C languages
  209. ternary operator, ie,
  210.  
  211. (settitle (if (getpref `scrollhack') ``s'hack is on'' ``s'hack is off''))
  212.  
  213. this sets the title bar to a string representing the status of the
  214. 'scrollhack' preference option.
  215.  
  216. See also,
  217.     Clause, Value, Comments
  218.  
  219.  
  220. Comments.
  221. =========
  222.  
  223. Comments may be inserted between any clauses in a command string (the same
  224. is also true about whitespace characters).
  225.  
  226. Comments are introduced by the ';' character, when a ';' is encountered the
  227. rest of the current line is disreguarded. ie,
  228.  
  229.     (move `l' 20)   ; this is a comment,
  230.     (settitle        ; and so is this.
  231.     `foobar')
  232.  
  233. Actually there is a problem with comments, if they are inside a string, eg,
  234. in a command string which is to be a macro the comments will not be stripped
  235. until the command string is executed. If the comment contains un-escaped
  236. quotes or braces the string will be prematurely terminated and things will
  237. go wrong. eg,
  238.  
  239.     (macro `amacro'
  240.     {
  241.     (settitle `hello')  ; this is ok until I put in a ' or a ` or {}
  242.     })
  243.  
  244. to fix this you can put in escape characters like,
  245.  
  246.     (macro `amacro'
  247.     {
  248.     (settitle `hello')  ; this is ok until I put in a \' or a \` or \{\}
  249.     })
  250.  
  251. alternatively just don't put these characters in comments inside strings.
  252.  
  253.  
  254. Clauses.
  255. ========
  256.  
  257. Clauses are the most elementary part of a command string, every clause has a
  258. clearly defined value (even if that value is defined as being void, ie, no
  259. value).
  260.  
  261. There are several different types of clauses, each with their own syntax
  262. structure, these are,
  263.  
  264.     Symbol Clause
  265.     String Clause
  266.     Number Clause
  267.     Character Clause
  268.     Null Clause
  269.  
  270. See also,
  271.     Command String, Value
  272.  
  273.  
  274. Symbol Clause.
  275. --------------
  276.  
  277. Two possible types of symbols, variables and commands, so two similar clause
  278. syntaxes,
  279.  
  280. variable clauses:
  281.  
  282.     (symbol_name)
  283. or
  284.     symbol_name
  285.  
  286.     eg, If you have set up a variable, foo, to access it's contents you
  287.     would use the clause,
  288.     (foo)
  289.     or,
  290.     foo
  291.  
  292.     Note that if no symbol of "symbol_name" is found internal to JEd, the
  293.     editor will look to see if a standard DOS variable (local or ENV:) of
  294.     that name exists. If so, the value of the clause will be whatever that
  295.     variable contains and will have type string.
  296.  
  297. command clauses:
  298.  
  299.     (symbol_name optional_argument_clauses)
  300. or,
  301.     symbol_name
  302.  
  303.     eg, To use the command global to create a variable called foo (as
  304.     accessed above) you would need the clause,
  305.     (global `foo' @)
  306.     The '@' (null clause) is used so that the contents of the variable are
  307.     void.
  308.  
  309.     Note that if no symbol of name "symbol_name" is found internal to JEd,
  310.     the REXX: directory will be checked for a file called "symbol_name.jed".
  311.     If this file is found it is assumed to be an ARexx macro for JEd and it
  312.     will be executed accordingly. The value of the clause will be non-zero
  313.     if the macro was invoked successfully.
  314.  
  315.     Note that command clauses don't have to have any arguments, so they can
  316.     be similar to variable clauses.
  317.  
  318.     The value of a symbol clause is the value of either the referenced
  319.     variable or the value returned by the executed command.
  320.  
  321. See also,
  322.     Clause, Symbol
  323.  
  324.  
  325. String Clause.
  326. --------------
  327.  
  328. A string clause is defined syntactically as,
  329.     `string-value'
  330. or
  331.     {string-value}
  332.  
  333. The value of this clause is "string-value" (of type string).
  334.  
  335. The quotes or braces nest so if you gave a clause of
  336.     `an example of `nested \tstrings'!'
  337. you would get a value of,
  338.     an example of `nested \tstrings'!
  339.  
  340. At present quotes and braces are considered equivalent so you can't surround
  341. one by the other (This may change soon).
  342. The braces are provided for two reasons,
  343.     1) So that the quotes don't get screwed up by ARexx.
  344.     2) If you use braces to enclose command strings everything is much easier
  345.        to read in complex statements (macros, loops, etc)
  346.  
  347. IMPORTANT:
  348. Unlike similar languages (LISP, the Wack script language, etc) all clauses
  349. are evaluated -- this means that when you give a command string as an
  350. argument to a command (eg, macro, while, etc) it must be enclosed in quotes
  351. (or braces) to stop it being executed too early.
  352. eg,
  353.     (macro `name'
  354.     {
  355.     (somecommand)
  356.     })
  357.  
  358. NOT,
  359.     (macro `name'
  360.     (somecommand)
  361.     )
  362. this would assign the value of (somecommand) to the macro "name" not the
  363. actual command string itself.
  364.  
  365. The text enclosed by the quotes, or braces, may enclude any of the standard
  366. escape sequences supported by JEd.
  367.  
  368. See also,
  369.     Escape Sequences, Strings
  370.  
  371.  
  372. Number Clause.
  373. --------------
  374.  
  375. Number clauses always produce a value of type number.
  376.  
  377. The syntax is,
  378.  
  379.     0xhex_number
  380.     0octal_number
  381.     decimal_number
  382.  
  383. Each variation may optionally have a minus sign '-' preceding it.
  384.  
  385.  
  386. Character Clause.
  387. -----------------
  388.  
  389. Value is of type number.
  390.  
  391. Syntax is,
  392.  
  393.     ~c
  394.  
  395. Value produced is ascii value of character 'c', ie, ~a would produce a value
  396. of 97. Escape sequences may be used instead of a character.
  397.  
  398.     ^c
  399.  
  400. Value is control-'c'
  401.  
  402.  
  403. Null Clause.
  404. ------------
  405.  
  406. The null clause has no value, it is mainly used to create variables without
  407. giving them a value.
  408.  
  409. Syntax is
  410.     @
  411.  
  412.  
  413. Symbols.
  414. ========
  415.  
  416. JEd maintains one large symbol table which contains all global symbols, this
  417. includes,
  418.     commands
  419.     variables
  420.     macros
  421.  
  422. Each command string interpreted is also given a symbol table (actually a
  423. list :) which contains symbols local to that string. Local symbols can
  424. contain the same thing as global symbols.
  425.  
  426. The idea is that you can reference any local symbol which is either on the
  427. same depth of recursion as where it is being referenced from or on a
  428. previous level of recursion.
  429.  
  430. When a local variable goes out of scope (when the command string it was
  431. declared in has been left) it will be automatically removed.
  432.  
  433. All symbols are case sensitive.
  434.  
  435. See also,
  436.     Symbol Clause, addsym, remsym, global, local, macro, symboldump
  437.  
  438.  
  439. Escape Sequences.
  440. =================
  441.  
  442. An escape sequence is introduced by the backslash '\' character, the
  443. supported sequences are,
  444.  
  445.     \n         insert a newline character
  446.     \t         insert a tab character
  447.     \f         insert a form feed character
  448.     \0xFF   insert a hex byte
  449.     \0377   insert an octal byte
  450.     \255    insert a decimal byte
  451.  
  452. Any other character after the backslash is just copied into the text (or
  453. whatever). So to have a literal '\' character in a string you would need the
  454. sequence '\\'. This feature can also be used to suppress clause-inducing
  455. characters such as, quotes, parentheses, braces, @, ^, etc...
  456.  
  457.  
  458. Keyboard Mappings.
  459. ******************
  460.  
  461. This is what the startup script in macros/ binds to each key.
  462.  
  463.     esc            prompt for command string and execute it
  464.     help        sleep/unsleep window
  465.     ctrl         close window
  466.  
  467.     up            up one line
  468.     down        down one line
  469.     left        left one column
  470.     right        right one column
  471.     shift up        up one page
  472.     shift down        down one page
  473.     shift left        to sol
  474.     shift right        to eol
  475.     ctrl up        first line
  476.     ctrl down        last line
  477.     ctrl left        previous word
  478.     ctrl right        next word
  479.  
  480.     tab            next tab stop
  481.     shift tab        previous tab stop
  482.     ctrl tab        insert a tab
  483.     return        split line
  484.     backspace        delete char behind cursor
  485.     delete        delete char under cursor
  486.     shift backspace    delete to sol
  487.     shift delete    delete to eol
  488.     ctrl delete        delete line
  489.     ctrl backspace    delete word
  490.  
  491.     ctrl b        toggle block marks
  492.     alt b        set start of block
  493.     alt B        set end of block
  494.     ctrl alt b        clear block
  495.     ctrl i        insert block
  496.     ctrl z        delete block
  497.     ctrl x        cut block to clipboard unit 0
  498.     ctrl c        copy block to unit 0
  499.     ctrl v        insert clipboard unit 0
  500.     ctrl q        delete to end of line
  501.     ctrl y        delete all of line
  502.     ctrl u        undelete line (from ctrl q/y)
  503.  
  504.     ctrl l        undo line (only if cursor is on correct line)
  505.     ctrl L        always undo line
  506.  
  507.     ctrl o        open file from string prompt
  508.     ctrl alt o        open file from file req.
  509.     ctrl I        insert file from prompt
  510.     ctrl alt I        insert file from file req.
  511.     ctrl O        open file in new window from prompt
  512.     ctrl alt O        open file in new window from file req.
  513.     ctrl n        open new view of this file
  514.     ctrl w        save file to where it was loaded from
  515.     ctrl W        save file as result of string prompt
  516.     ctrl alt W        save file as result of file req.
  517.     ctrl N        rename this file
  518.     ctrl d        change current directory
  519.     ctrl k        clear file
  520.  
  521.     ctrl F        set find string, and find next occurrence
  522.     ctrl f        find next occurrence
  523.     ctrl alt f        find previous occurrence
  524.     ctrl R        set replace string
  525.     ctrl r        replace and find next
  526.     ctrl g        find reference for word under cursor
  527.     ctrl G        find reference for specified word
  528.     ctrl h        find matching bracket
  529.     ctrl j        jump to a line
  530.  
  531.     ctrl ,        activate next window
  532.     ctrl .        activate previous window
  533.  
  534.     ctrl s        execute script file
  535.     ctrl alt s        execute the current line
  536.     ctrl S        execute the marked block
  537.     ctrl alt S        execute the whole of the current file
  538.  
  539.     f1            move to bookmark 1
  540.     f2            move to bookmark 2
  541.     f3            move to bookmark 3
  542.     f4            move to auto-mark
  543.     shift f1        set bookmark 1
  544.     shift f2        set bookmark 2
  545.     shift f3        set bookmark 3
  546.  
  547.     alt d        insert current date
  548.     ctrl e        prompt for AmigaDOS commandstring and execute it
  549.  
  550.  
  551. ARexx.
  552. ******
  553.  
  554. All copies of JEd run will try to create an ARexx message port, the first
  555. will be called 'JED.1', subsequent ports will be 'JED.2', 'JED.3'...
  556.  
  557. Command strings can be sent to JEd, they will probably need to be enclosed
  558. in quotes so ARexx doesn't try to interpret them.
  559.  
  560. The way that results are returned to ARexx is slightly different to most
  561. ARexx supporting applications, successful commands return 1 not zero in the
  562. RC variable. If the result of a command is a string RC will be zero and the
  563. RESULT variable will contain the string.
  564.  
  565. ARexx macros can be implicitly invoked simply by specifying their name in a
  566. symbol clause, any arguments given to the clause will be resolved into
  567. strings and passed to the macro as its arguments.
  568. So, if you had a REXX macro called "foo" and it wanted an argument of "bar"
  569. you could execute it with the command string,
  570.  
  571.     (foo `bar')
  572.  
  573. If you want to start a macro in this way it _MUST_ reside in the REXX:
  574. assignment.
  575. Also, the value of the clause which implicitly calls a REXX macro will only
  576. represent whether or not it was possible to _start_ the macro running, see
  577. the next paragraph...
  578.  
  579. Currently there's no way to receive a result from an ARexx macro. This fact
  580. probably won't change since they have to be run asynchronously with the
  581. editor.
  582.  
  583. See also,
  584.     rexx
  585.  
  586.  
  587. Title Bar.
  588. **********
  589.  
  590. The title bar of a window is used to display some useful information about
  591. the file being edited in this window. It will be something like,
  592.  
  593.                 Word-wrap____     __Block is fully marked
  594.                      \   /
  595. filename+ (col,line) total_lines line(s) AWNBbx     <-- `savetabs' setting
  596.     |                  __/  |  \__
  597. when present denotes       Auto-indent       |     Block is partially marked
  598. that file contains               Window position won't
  599. unsaved changes.               be saved on exit
  600.  
  601. eg,
  602. jed.doc+ (11,1318) 1383 line(s) AN2
  603.  
  604. The title bar is also used to display messages (use the settitle command to
  605. do this).
  606.  
  607.  
  608. Miscellaneous Notes.
  609. ********************
  610.  
  611. The maximum length of any line is 32768 characters, there are no problems
  612. loading lines this long either (anymore). The maximum number of lines you
  613. can have is 2147483648. I think that these limits won't be too restrictive.
  614. Currently no checking is done to make sure that these limits aren't broken,
  615. this means that you can crash the system if you do. (Actually if these are
  616. too restrictive it would be relatively easy to double them.)
  617.  
  618. Sometimes error messages will be shown (on the titlebar) which may seem to
  619. be a bit strange. These will normally be of the type "syntax error: argument
  620. n should have been a xxx" and they are normally encountered when you cancel
  621. a requester or prompt (or when some command types fail). These just show
  622. that the command that wanted the input you didn't give is complaining at
  623. being given nothing (huh?).
  624.  
  625. JEd appears to be mungwall-clean and to not permanently steal any resources,
  626. I haven't been able to run it under Enforcer (no mmu!), if any hits are
  627. found please send me the output together with information as to the version
  628. of jed you're using and how to recreate the hit.
  629.  
  630. The prompt mechanism used by the commands cli, getstr and getnum responds to
  631. these keypresses,
  632.     return  --    accepts the string
  633.     esc        --    cancel the prompt
  634.     bs        --    delete the character behind the cursor
  635.     up/down --    recall the string entered in the last prompt
  636.     (any other keys are just inserted into the string)
  637.  
  638. Any of the executable files may be made resident (they are pure).
  639.  
  640. If you find that the editor just exits back to the CLI, with no error
  641. messages when executed, it means that the required disk-based libraries
  642. aren't available or that there is insufficient memory.
  643.  
  644. It is now possible to mark blocks with the mouse, every time the left mouse
  645. button is double-clicked the command,
  646.     (block `t')
  647. is executed.
  648.  
  649.  
  650. MakeRefs.
  651. *********
  652.  
  653. usage:
  654.     makerefs [-new] [-full] <reffile> {<files>}
  655.  
  656.     -new    create <reffile>, don't append to it
  657.     -full    write fully qualified filenames to the <reffile>, not
  658.         relative to the current directory.
  659.     <reffile>    the file to write the index in
  660.     {<files>}    files to scan for references, standard AmigaDOS
  661.         wildcards are acceptable.
  662.  
  663. This program calculates the reference indexes for use with JEd 2.x. The type
  664. of reference scanned for depends on the suffix of each file, there are three
  665. methods,
  666.  
  667.     1) Files which end in .h This is very poor, all structure definitions
  668.     which have "struct " in the first column of the file will be referenced.
  669.     The reference created will load the whole header file and put the cursor
  670.     on the first line of the structure definition. Hopefully this will
  671.     enable you to reference all system structures (actually the only
  672.     structure it can't handle is ExtendedNode in graphics/gfxnodes.h,
  673.     spurious references are generated since it's formatted strangely). You
  674.     shouldn't attempt to reference the *_protos.h files. So to reference all
  675.     include files cd to the directory holding them and type,
  676.  
  677.     1> makerefs .jrefs ~(clib)/#?.h
  678.  
  679.     then put your include file directory in the path jed searches with the
  680.     addpath command.
  681.  
  682.  
  683.     2) Files which end in .c These are assumed to be C source code files,
  684.     all function definitions are referenced if they are in this format,
  685.  
  686.     rtn-type
  687.     funcname(args...)
  688.     {
  689.     ...code
  690.  
  691.     3) Any other files These are scanned for autodoc style sections of text,
  692.     ie, things like,
  693.  
  694.     a.library/AFunction                     a.library/AFunction
  695.  
  696.     This will produce a reference for AFunction.
  697.  
  698. See also,
  699.     addpath, getref, rempath.
  700.  
  701.  
  702. Command Index.
  703. **************
  704.  
  705.     +                   addition
  706.     -                   subtraction
  707.     *                   multiplication
  708.     /                   division
  709.     %                   modulus
  710.     <<                  left shift
  711.     >>                  right shift
  712.     ~                   bitwise NOT
  713.     !                   logical NOT
  714.     |                   bitwise OR
  715.     ||                  logical OR
  716.     &                   bitwise AND
  717.     &&                  logical AND
  718.     ^                   bitwise EOR
  719.     ^^                  logical EOR
  720.     =                   set value of a variable
  721.     ==                  test for equality
  722.     !=                  test for inequality
  723.     >                   greater than
  724.     <                   less than
  725.     >=                  greater than or equal to
  726.     >=                  less than or equal to
  727.     activatefile        activate a named file
  728.     addpath             add a directory to the path searched for references
  729.     addsym              make a new global symbol
  730.     arg                 get argument to macro
  731.     atol                convert ascii string to number
  732.     bind                bind a command string to a keypress
  733.     block               control block marks
  734.     break               break out of command strings
  735.     car                 extract first item in list
  736.     cd                  change current directory
  737.     cdr                 extract all but first item in a list
  738.     changecase          toggle case of some characters in the file
  739.     changes             set change counter
  740.     clear               reset file
  741.     cli                 prompt for command string, then execute it
  742.     close               close window
  743.     copy                copy some of file to clipboard
  744.     cut                 cut some of file to clipboard
  745.     delete              delete some of file
  746.     dlock               forbid/permit window refreshing
  747.     dowhile             control structure
  748.     export              increase the scope of local symbols
  749.     extract             get some text from the file
  750.     find                find a string
  751.     format              'printf' style string formatting
  752.     freq                file requester
  753.     getnum              request number
  754.     getpref             get value of a preference option
  755.     getref              load reference description
  756.     getstr              prompt for a string
  757.     global              create a new global variable
  758.     if                  control structure
  759.     ilock               input lock
  760.     info                get information about stuff
  761.     insert              insert some text
  762.     isalpha             test for an alphabetic character
  763.     isalnum             test for alphnumerical character
  764.     isdigit             test for a numerical character
  765.     isspace             test for whitespace character
  766.     join                join two lines
  767.     local               create a variable local to this macro
  768.     macro               define a macro (subroutine)
  769.     match               wildcard string comparer
  770.     menu                menu on/off
  771.     move                move cursor
  772.     nargs               number of arguments passed to macro
  773.     newfile             open a new file in a new window
  774.     newview             open a new view of this file
  775.     nextwind            activate next window
  776.     nop                 nothing
  777.     openfile            open a new file in this window
  778.     poke                put character into cursor position
  779.     position            change window dimensions/position
  780.     prevwind            activate previous window
  781.     remsym              remove global symbol
  782.     rempath             remove reference path
  783.     rename              rename file
  784.     renamesym           rename global symbol
  785.     replace             replace string found by 'find'
  786.     req                 requester
  787.     return              return value from macro/command string
  788.     rexx                send command to ARexx
  789.     savefile            save file to where it was loaded from
  790.     savefileas          save file to specified file
  791.     saveprefs           set whether preferences will be saved on exit
  792.     savesection         save part of file
  793.     script              execute script file
  794.     select              control structure
  795.     setmenu             create menubar
  796.     setpref             set a preference option
  797.     settitle            set title-bar
  798.     sleep               iconify window
  799.     split               split line at cursor
  800.     substr              extract string from another string
  801.     symboldump          dump contents of symbol tables
  802.     system              execute AmigaDOS command
  803.     tolower             make some text lower case
  804.     toupper             make some text upper case
  805.     type                find the type of a value
  806.     unbind              remove command string from keypress
  807.     undo                undo changes to current line
  808.     unsleep             un-iconify window
  809.     while               control structure
  810.  
  811. See also,
  812.     Syntax Definitions Explained, Section Type Definitions, Command Groups.
  813.  
  814.  
  815. Command Groups.
  816. ***************
  817.  
  818. Window commands,
  819.     activatefile, close, menu, newfile, newview, nextwind, position,
  820.     prevwind, settitle, sleep, unsleep, setmenu.
  821.  
  822. File commands,
  823.     activatefile, cd, changes, clear, newfile, openfile, savefile,
  824.     savefileas, savesection.
  825.  
  826. Text manipulation,
  827.     block, changecase, copy, cut, delete, extract, find, insert, join, move,
  828.     poke, replace, split, tolower, toupper, undo.
  829.  
  830. Configuration,
  831.     bind, getpref, macro, menu, saveprefs, setmenu, setpref, unbind.
  832.  
  833. Programming,
  834.     +, -, *, /, %, <<, >>, ~, !, |, ||, &, &&, ^, ^^, =, ==, !=, >, <, >=,
  835.     <=, addsym, arg, atol, break, car, cdr, cli, dowhile, dlock, export,
  836.     format, freq, getstr, getnum, global, if, ilock, info, isalpha, isalnum,
  837.     isdigit, isspace, local, macro, match, nargs, nop, req, remsym,
  838.     renamesym, rexx, return, select, settitle, script, substr, symboldump,
  839.     system, type, while.
  840.  
  841. Referencing,
  842.     addpath, getref, rempath,
  843.  
  844. See also,
  845.     Syntax Definitions Explained, Section Type Definitions, Command Index
  846.  
  847.  
  848. Syntax Definitions Explained.
  849. =============================
  850.  
  851. explanation of syntax definitions in command reference pages:
  852.  
  853.     (command arg1  arg2 ...)
  854. rtn         arg1  arg2
  855. type         type  type
  856.  
  857. The rtn type and the arg type show the kind of values the command returns
  858. and expects to be given, they can be one of the following,
  859.  
  860.     ()        --    anything (can be void)
  861.     (S)        --    string value
  862.     (N)        --    numeric value
  863.     (S|N)   --    string or numeric value
  864.  
  865. Arguments surrounded by <...> are compulsory and must be provided for the
  866. command to work, arguments surrounded by [...] are optional and arguments
  867. surrounded by {...} mean one or more arguments can be given.
  868.  
  869. If I have shown that a command returns a number but have not documented what
  870. it will be, then this scheme will apply, a zero means that the command
  871. failed. If the return is non-zero (usually 1) the command was successful.
  872.  
  873. Another convention which I have used is that if a command is passed an
  874. incorrect type of value (ie, a number instead of a string, or nothing at
  875. all) the command will not return _any_ value. This will in turn make any
  876. command using the value of this command as an argument fail, and so on...
  877.  
  878.  
  879. Section Type Definitions.
  880. =========================
  881.  
  882. Many commands which deal with parts of the text file expect what I have
  883. referred to as a section type, often this is the argument <section>, this
  884. should be one of the following strings,
  885.  
  886.     c        --    character under the cursor
  887.     p        --    the character behind the cursor (previous)
  888.     n        --    the character after the cursor
  889.     w        --    the word under the cursor (alpha-numeric only)
  890.     b        --    the currently marked block (the block will then be unmarked)
  891.     l        --    the whole line that the cursor is on
  892.     f        --    the whole file
  893.     sf        --    from the cursor to the start of the file
  894.     sl        --    from the cursor to the start of the line
  895.     ef        --    from the cursor to the end of the file
  896.     el        --    from the cursor to the end of the line
  897.     mX        --    from the cursor to bookmark number X (ie, `m1')
  898.  
  899. eg, to copy a marked block,
  900.     (copy `b' 0)
  901.  
  902.  
  903.    (+ <value1> <value2>)
  904. (N)    (N)    (N)
  905.  
  906. Returns <value1> + <value2>.
  907.  
  908.  
  909.  
  910.     (- <value1> [value2])
  911. (N)    (N)    (N)
  912.  
  913. Returns <value1> - [value2]. If no [value2] is provided then <value1> is
  914. negated and returned.
  915.  
  916.  
  917.     (* <value1> <value2>)
  918. (N)    (N)    (N)
  919.  
  920. Returns <value1> * <value2>.
  921.  
  922.  
  923.     (/ <value1> <value2>)
  924. (N)    (N)    (N)
  925.  
  926. Returns the quotient from <value1> / <value2>.
  927.  
  928.  
  929.     (% <value1> <value2>)
  930. (N)    (N)    (N)
  931.  
  932. Returns the remainder from <value1> / <value2>.
  933.  
  934.  
  935.     (<< <value> <count>)
  936. (N)    (N)    (N)
  937.  
  938. Returns the <value> left-shifted <count> bits.
  939.  
  940.  
  941.     (>> <value> <count>
  942. (N)    (N)    (N)
  943.  
  944. Returns the <value> right-shifted <count> bits.
  945.  
  946.  
  947.     (~ <value>)
  948. (N)    (N)
  949.  
  950. Returns the bitwise NOT of <value>.
  951.  
  952.  
  953.     (! <value>)
  954. (N)    (N)
  955.  
  956. Returns the logical NOT of <value>. ie, not_zero <=> zero.
  957.  
  958.  
  959.     (| <value1> <value2>)
  960. (N)    (N)    (N)
  961.  
  962. Returns the bitwise OR of <value1> and <value2>.
  963.  
  964.  
  965.     (! <value>)
  966. (N)    (N)
  967.  
  968. Returns the logical NOT of <value>. ie, not_zero <=> zero.
  969.  
  970.  
  971.     (& <value1> <value2>)
  972. (N)    (N)    (N)
  973.  
  974. Returns the bitwise AND of <value1> and <value2>.
  975.  
  976.  
  977.     (&& <value1> <value2>)
  978. (N)    (N)     (N)
  979.  
  980. Returns the logical AND of <value1> and <value2>.
  981.  
  982.  
  983.     (^ <value1> <value2>)
  984. (N)    (N)    (N)
  985.  
  986. Returns the bitwise EOR of <value1> and <value2>.
  987.  
  988.  
  989.     (^^ <value1> <value2>)
  990. (N)    (N)     (N)
  991.  
  992. Returns the logical EOR of <value1> and <value2>.
  993.  
  994.  
  995.     (= <name> <value>)
  996. (N)    (S)    (S|N)
  997.  
  998. Sets the contents of the variable <name> to <value>. Both global and local
  999. variables may be set, but the variable must already have been created.
  1000.  
  1001. See also,
  1002.     addsym, global, local
  1003.  
  1004.  
  1005.     (== <value1> <value2>)
  1006. (N)    (S|N)     (S|N)
  1007.  
  1008. Returns 1 if <value1> is equivalent to <value2>. Strings are compared case
  1009. insignificantly.
  1010.  
  1011.  
  1012.     (!= <value1> <value2>)
  1013. (N)    (S|N)     (S|N)
  1014.  
  1015. Returns 1 if <value1> is not equivalent to <value2>. Strings are compared
  1016. case insignificantly.
  1017.  
  1018.  
  1019.     (> <value1> <value2>)
  1020. (N)    (N)    (N)
  1021.  
  1022. Returns 1 if <value1> is greater than <value2>.
  1023.  
  1024.  
  1025.     (< <value1> <value2>)
  1026. (N)    (N)    (N)
  1027.  
  1028. Returns 1 if <value1> is less than <value2>.
  1029.  
  1030.  
  1031.     (>= <value1> <value2>)
  1032. (N)    (N)     (N)
  1033.  
  1034. Returns 1 if <value1> is greater than or equal to <value2>.
  1035.  
  1036.  
  1037.     (<= <value1> <value2>)
  1038. (N)    (N)     (N)
  1039.  
  1040. Returns 1 if <value1> is less than or equal to <value2>.
  1041.  
  1042.  
  1043.     (activatefile <file>)
  1044. (N)          (S)
  1045.  
  1046. Attempts to make a window holding <file> the active window, if <file> is not
  1047. already in memory an attempt will be made to load it into a new window.
  1048.  
  1049. See also,
  1050.     openfile
  1051.  
  1052.  
  1053.     (addsym {<name> <value> <sym-type>})
  1054. (N)         (S)    ()        (N)
  1055.  
  1056. Creates a new symbol called <name> with a value of <value>.
  1057.  
  1058. The <sym-type> argument determines whether the symbol is global or local,
  1059. and whether it is treated as a command or as a variable. <sym-type> can be,
  1060.  
  1061.     1/STF_GCOM     global command
  1062.     2/STF_GVAR     global variable
  1063.     3/STF_LCOM     local command
  1064.     4/STF_LVAR     local variable
  1065.  
  1066. The variable types always return their _literal_ value when accessed,
  1067. command types return their interpreted value, for example,
  1068.  
  1069.     (addsym
  1070.     `foo'   `foo'   STF_LVAR
  1071.     `bar'   {`bar'} STF_LCOM
  1072.     )
  1073.     (settitle (format `foo = %s, bar = %s' foo bar))
  1074.  
  1075. This creates two local symbols, foo and bar, foo is a variable string and
  1076. bar is a command string (ie, it will be interpreted), then displays their
  1077. values in the title bar of the window. This is a pathetic example.
  1078.  
  1079. See also,
  1080.     Symbol, global, local, remsym, renamesym, =, export
  1081.  
  1082.  
  1083.     (addpath {<dir>})
  1084. (N)
  1085.  
  1086. Adds a directory to the list of directoried scanned for reference indexes by
  1087. the getref command.
  1088.  
  1089. See also,
  1090.     MakeRefs, rempath, getref
  1091.  
  1092.  
  1093.     (arg <index> <type> <prompt>)
  1094. (S|N)     (N)     (S)    (S)
  1095.  
  1096. MACRO-ONLY.
  1097.  
  1098. Returns the <index>'th argument passed to the macro on invocation. If no
  1099. argument was supplied it is prompted for with the string <prompt>. If the
  1100. argument is not of the type specified by <type> (s = string, n = number, e =
  1101. either) the macro will be automatically aborted.
  1102.  
  1103. See also,
  1104.     nargs, macro
  1105.  
  1106.  
  1107.     (atol <string>)
  1108. (N)      (S)
  1109.  
  1110. Returns the number represented by the ascii <string>. Decimal, hex and octal
  1111. bases are supported.
  1112.  
  1113.  
  1114.     (bind {<key> <command>})
  1115. (N)       (S)     (S)
  1116.  
  1117. Binds the <command> string to <key>. Remember that the command string must
  1118. be enclosed by quotes or braces.
  1119.  
  1120. <key> should be a string containing any number of qualifiers then one key.
  1121. The recognized words are,
  1122.  
  1123.     qualifiers
  1124.     SHIFT
  1125.     ALT
  1126.     CONTROL/CTRL
  1127.     COMMAND/AMIGA
  1128.     NUMERICPAD
  1129.     LMB            -- left mouse button
  1130.     MMB            -- middle mouse button
  1131.     RMB            -- right mb (currently unuseable)
  1132.  
  1133.     keys
  1134.     SPACE
  1135.     BACKSPACE
  1136.     TAB
  1137.     ENTER
  1138.     RETURN
  1139.     ESC/ESCAPE
  1140.     DEL/DELETE
  1141.     HELP
  1142.     UP
  1143.     DOWN
  1144.     RIGHT
  1145.     LEFT
  1146.     F1 ... F10
  1147.     and usual ascii characters (a,b,...)
  1148.  
  1149. some example commands
  1150.  
  1151.     (bind `shift tab' {(move `lt' 1)})
  1152.  
  1153.     (bind
  1154.     `j'                 {(req `hello' `world')}
  1155.     `lmb numericpad *'  {(settitle `foo')}
  1156.     )
  1157.  
  1158. If you bind onto a key which already has a binding the old command string
  1159. will not be lost, if you subsequently unbind the key the old binding will
  1160. come back into effect.
  1161.  
  1162. See also,
  1163.     Command Strings, unbind
  1164.  
  1165.  
  1166.     (block <type>)
  1167. (N)       (S)
  1168.  
  1169. Set the block markings according to <type>, this is a standard section type
  1170. or,
  1171.     s    --  mark start of block
  1172.     e    --  mark end of block
  1173.     k    --  kill both block marks
  1174.  
  1175.     t    --  cycle through the above options
  1176.  
  1177. See also,
  1178.     Section Type, copy, cut, insert
  1179.  
  1180.  
  1181.     (break <depth>)
  1182. ()       (N)
  1183.  
  1184. Stops the execution of <depth> number of strings, execution will continue
  1185. with the next clause in the <depth> - 1 previous string.
  1186.  
  1187. In the following example the (break) will cause a branch to the req command
  1188. displaying the <depth> broken.
  1189.  
  1190.     (if 1
  1191.     {
  1192.     (if 1
  1193.     {
  1194.         (if 1
  1195.         {
  1196.         (break 2)
  1197.         (req `0' `zero')
  1198.         })
  1199.         (req `1' `one')
  1200.     })
  1201.     (req `2' `two')
  1202.     })
  1203.     (req `3' `three')
  1204.  
  1205. eg, if you change the '(break 2)' to '(break 1)' only the '(req `0'...)'
  1206. will be skipped. Test it out.
  1207.  
  1208. See also,
  1209.     dowhile, if, seclect, while,
  1210.  
  1211.  
  1212.     (car <list> <sep-char>)
  1213. (S)     (S)    (N)
  1214.  
  1215. This command is used (in conjunction with cdr) to manipulate lists of words
  1216. separated by a single character, <sep-char>.
  1217.  
  1218. It returns the first item in <list>, ie, if you executed the command,
  1219.  
  1220.     (car `one,two,three' ~,)
  1221.  
  1222. you would get a value of,
  1223.  
  1224.     one
  1225.  
  1226. If <sep-char> does not occur in the list the whole <list> is returned.
  1227.  
  1228. See also,
  1229.     cdr
  1230.  
  1231.  
  1232.     (cd <dir>)
  1233. (N)    (S)
  1234.  
  1235. Makes <dir> the current directory for the editor.
  1236.  
  1237.  
  1238.     (cdr <list> <sep-char>)
  1239. (S)     (S)    (N)
  1240.  
  1241. This command is used (in conjunction with car) to manipulate lists of words
  1242. separated by a single character, <sep-char>.
  1243.  
  1244. It removes the first item in the list and returns the remainder (without the
  1245. leading <sep-char>).
  1246.  
  1247. For example if you executed,
  1248.  
  1249.     (cdr `one,two,three' ~,)
  1250.  
  1251. you would get a value of,
  1252.  
  1253.     two,three
  1254.  
  1255. If <sep-char> does not occur in the <list> a null string ("") is returned.
  1256.  
  1257. See also,
  1258.     car
  1259.  
  1260.  
  1261.     (changes <number>)
  1262. (N)         (N)
  1263.  
  1264. Sets the counter of changes to the current file to <number>.
  1265.  
  1266.  
  1267.     (cli)
  1268. ()
  1269.  
  1270. Prompts for a command string and then executes it. Note that as with all
  1271. commands who use the prompt mechanism a sleeping window will be woken up.
  1272.  
  1273. Returns the value of the executed command.
  1274.  
  1275. This command is equivalent to
  1276.     (script `s' (getstr `cmd> '))
  1277.  
  1278. See also,
  1279.     Command String, getstr, script
  1280.  
  1281.  
  1282.     (close)
  1283. (N)
  1284.  
  1285. Closes the current window, if it is the only view of the file the file will
  1286. be unloaded. If it is the last window that the editor has open the present
  1287. command string will be terminated and everything will exit.
  1288.  
  1289. If using this from a script do NOT assume which window will be activated
  1290. when this one closes. It is left up to Intuition to decide which window to
  1291. activate. Until it does this (it may not even activate one of my windows, or
  1292. if it does I won't hear about it until after processing the script) the
  1293. window which the editor reguards as 'active' is guaranteed to be a view of
  1294. the file which closed (if there are any other views).
  1295.  
  1296. Be warned, this command is weird.
  1297.  
  1298. See also,
  1299.     newfile, newview,
  1300.  
  1301.  
  1302.     (copy <section> <unit>)
  1303. (N)      (S)        (N)
  1304.  
  1305. Copies a section of text to the clipboard device. <unit> is the clipboard
  1306. unit to copy to (usually 0). A <unit> of -1 means copy the text to my
  1307. internal clipboard unit, this can be useful for copying between windows of
  1308. the editor.
  1309.  
  1310. See also,
  1311.     Section Types, cut, insert
  1312.  
  1313.  
  1314.     (cut <section> <unit>)
  1315. (N)     (S)       (N)
  1316.  
  1317. The same as copy except that the section of text copied is then deleted from
  1318. the file.
  1319.  
  1320. See also,
  1321.     Section Types, copy, delete, insert
  1322.  
  1323.  
  1324.     (clear)
  1325. (N)
  1326.  
  1327. Clears everything to do with the current file, resetting its name to
  1328. "Untitled" as well.
  1329.  
  1330.  
  1331.     (changecase <section>)
  1332. (N)        (S)
  1333.  
  1334. Toggles the case of all alphabetic characters in <section>.
  1335.  
  1336. See also,
  1337.     Section Types, tolower, toupper
  1338.  
  1339.  
  1340.     (delete <section>
  1341. (N)        (S)
  1342.  
  1343. Deletes <section> from the file.
  1344.  
  1345. See also,
  1346.     Section Types, cut
  1347.  
  1348.  
  1349.     (dowhile <body> <condition>)
  1350. (N)         (S)    (S)
  1351.  
  1352. First executes the command string <body>, then executes command string
  1353. <condition>, if the result of <cond> is non-zero the loop is repeated. This
  1354. command has the same safeguards against infinite loops as while has.
  1355.  
  1356. Note that the <body> and <condition> are in the opposite order than in the
  1357. while command.
  1358.  
  1359. See also,
  1360.     Command Strings, while
  1361.  
  1362.  
  1363.     (dlock <status>)
  1364. (N)       (N)
  1365.  
  1366. Sets the <status> of the display lock. When it is non-zero no rendering is
  1367. done in the current window (except for on the title bar) The intelligent use
  1368. of this command can significantly speed up macros.
  1369.  
  1370. There could be problems if a macro who has turned on the display lock is
  1371. aborted, by not being given the correct arguments perhaps, leaving the
  1372. display locked. If this happens get into the (cli) command and unlock the
  1373. display.
  1374.  
  1375. This command does NOT nest (yet). Each window has its own, independant,
  1376. lock.
  1377.  
  1378. When it is unlocked any queued refreshes are done.
  1379.  
  1380. See also,
  1381.     ilock
  1382.  
  1383.  
  1384.     (export {<symbol> <how-far>})
  1385. (N)        (S)         (N)
  1386.  
  1387. This command increases the scope of <symbol> so that <how-far> more command
  1388. strings can access it than before, the best way to explain this is with an
  1389. example, (the 'local' macro),
  1390.  
  1391.     ; create a macro called 'local'
  1392.     ;
  1393.     (macro `local' {
  1394.  
  1395.     ; local symbol to count the number of arguments we've done
  1396.     ;
  1397.     (addsym `__i' 0 STF_LVAR)
  1398.  
  1399.     ; while we've got more arguments to do...
  1400.     ;
  1401.     (while {(>= (- nargs __i) 2)} {
  1402.  
  1403.         ; create a new local symbol...
  1404.         ;
  1405.         (addsym (arg (+ __i 1) `s') (arg (+ __i 2) `e') STF_LVAR)
  1406.  
  1407.         ; and export it to the command string the macro was called from,
  1408.         ; 2 strings "behind" (one for the body of this while loop and
  1409.         ; one for the base level of the macro definition)
  1410.         ;
  1411.         (export (arg (+ __i 1) `s') 2)
  1412.  
  1413.         ; increment argument counter
  1414.         ;
  1415.         (= `__i' (+ __i 2))
  1416.     })
  1417.     })
  1418.  
  1419. See also,
  1420.     Symbols, addsym, local, remsym
  1421.  
  1422.  
  1423.     (extract <section>)
  1424. (S)         (S)
  1425.  
  1426. Returns the text from <section>.
  1427.  
  1428. See also,
  1429.     Section Types
  1430.  
  1431.  
  1432.     (find `s' <string>)
  1433. (N)
  1434.  
  1435. Sets the string which find will search for.
  1436.  
  1437.  
  1438.     (find `n')
  1439. (N)
  1440.  
  1441. Search for the next occurrence of the string set by (find `s'). This command
  1442. returns 1 if the string was found.
  1443.  
  1444.  
  1445.     (find `p')
  1446. (N)
  1447.  
  1448. Same as (find `n') but searches backwards.
  1449.  
  1450.  
  1451.     (find <switch> <status>)
  1452. (N)       (S)      (N)
  1453.  
  1454. Defines the behaviour of the find command, these <switch>'es are available,
  1455.  
  1456.     c -- case dependant search when <status> is non-zero
  1457.  
  1458.     w -- when <status> is non-zero the string set by (find `s') is parsed as
  1459.     a standard AmigaDOS 2.0 wildcard. Note that the search only extends to
  1460.     the end of each line in turn, and that '#?' will probably have to be
  1461.     added onto the end of the string to account for characters after the
  1462.     pattern that you are searching for.
  1463.  
  1464.     r -- enable regular expressions, when this <switch> is on the above two
  1465.     switches have no effect. The nearly-public-domain regexp library by
  1466.     Henry Spencer is used so refer to that for more details, basically these
  1467.     are the meta-characters recognized, (they can be un-recognized by
  1468.     backslash-escaping them),
  1469.  
  1470.     .       matches any single character
  1471.     
  1472.     [abc]   match a, b, or c
  1473.     [a-z]   match any character in range from a to z
  1474.     [^e]    match any char except e
  1475.             the above types of character classes can be combined, so,
  1476.                 [a-zA-Z_]
  1477.             matches any alphabetical chacter or the underscore
  1478.     
  1479.     ^       matches the beginning of the line of text being compared
  1480.     $       matches the end of the line of text
  1481.     
  1482.     a|b     matches either expression a or expression b
  1483.     
  1484.     ()      the actual text that is matched by the RE between the
  1485.             parentheses is remembered. It can be recalled when substituting
  1486.             for an RE with the replace command.
  1487.     
  1488.     *       matches the preceding expression 0 or more times
  1489.     +       matches the preceding expression 1 or more times
  1490.     ?       matches the preceding expression 0 or 1 times
  1491.     
  1492.     Some examples of regular expressions could be,
  1493.  
  1494.     <[a-z]*/([a-z_]*).h>
  1495.     this would match "<clib/exec_protos.h>" saving "exec_protos" for recall
  1496.     as "\1" by replace, but would not match "<stdio.h>",
  1497.     "<Clib/Exec_protos.h>", etc.
  1498.  
  1499.     ^[a-zA-Z_]*\(
  1500.     note the escaped parenthese so that it takes its literal value, this
  1501.     could match "function(", "Func_tion(" or "(", all beginning at the start
  1502.     of a line, but not, "function", etc...
  1503.  
  1504.     There is a slightly confusing feature when searching _backwards_ for
  1505.     regular expressions, that is that instead of searching from right to
  1506.     left in a line it searches left to right (it still goes bottom to top
  1507.     though :), I don't believe that this is too much of a problem, just bear
  1508.     it in mind.
  1509.  
  1510.  See also,
  1511.     replace
  1512.  
  1513.  
  1514.     (freq <type> <title> <startpos>)
  1515. (S)      (S)     (S)     (S)
  1516.  
  1517. Opens a file requester and asks for a filename. <type> can be `r' or `w',
  1518. these stand for read and write. <title> is the title of the requester window
  1519. and <startpos> is the file (and dir.) to start the requester from.
  1520.  
  1521. If the requester is cancelled no result is returned, this will probably
  1522. abort any commands who want it as an argument.
  1523.  
  1524. See also,
  1525.     getstr
  1526.  
  1527.  
  1528.     (format <fmtstring> {[values]})
  1529. (S)        (S)        (S|N)
  1530.  
  1531. Returns a formatted string made from the format specification <fmtstring>
  1532. and the [values]. (Almost) standard C language formatting is done, these
  1533. substitutions can be performed,
  1534.  
  1535.     %s        insert string
  1536.     %ld        insert decimal value
  1537.     %lx        insert hex value
  1538.     %lc        insert char value
  1539.  
  1540. eg,
  1541.     (format `%s %ld' `string' 1000)
  1542.  
  1543.  
  1544.     (getref [refname])
  1545. (N)
  1546.  
  1547. This command searches all directories in the reference path (set with
  1548. (addpath)) for files called ".jrefs", these files should contain indexes to
  1549. all available references. If a reference matching refname (or the word under
  1550. the cursor if refname isn't given) is found a new window is opened and the
  1551. text for that reference is displayed. For example if you make a reference
  1552. file for all autodoc files you can, when programming, place the cursor on a
  1553. function name and then bring up the explanation of that function.
  1554.  
  1555. Each line in a .jrefs file which begins with a @ character is taken as a
  1556. valid reference, there are three types of line format,
  1557.     @refname@reffile@searchstring@
  1558.     reffile is loaded and searchstring is looked for in the start of each
  1559.     line. If found the cursor is set to the start of that line.
  1560.  
  1561.     @refname@reffile@#startpos@
  1562.     reffile is loaded and the cursor is moved to startpos (a decimal number)
  1563.     many bytes into the file.
  1564.  
  1565.     @refname@reffile@#startpos/#endpos@
  1566.     the section of text between startpos and endpos (both decimal offsets)
  1567.     is loaded into the window.
  1568.  
  1569.     @refname@reffile@^startline@
  1570.     cursor is positioned at startline (a decimal number).
  1571.  
  1572. In each case refname is the name of the reference, this is matched
  1573. case-significantly with what is being searched for. reffile is loaded
  1574. relative to the directory that the .jrefs file containing it is found in.
  1575.  
  1576. The program makerefs is provided for making references for autodocs, C
  1577. header files and C source files, see the file doc/makerefs.doc
  1578.  
  1579. See also,
  1580.     MakeRefs, addpath, rempath
  1581.  
  1582.  
  1583.     (getstr <prompt>)
  1584. (S)        (S)
  1585.  
  1586. Prompts the user for a string, if the prompt is cancelled (<esc>) no value
  1587. will be returned.
  1588.  
  1589. See also,
  1590.     getnum
  1591.  
  1592.  
  1593.     (getnum <prompt>)
  1594. (N)        (S)
  1595.  
  1596. Prompts the user for a numeric value, if the prompt is cancelled no value is
  1597. returned.
  1598.  
  1599. See also,
  1600.     getstr
  1601.  
  1602.  
  1603.     (getpref <pref>)
  1604. (N|S)         (S)
  1605.  
  1606. Returns the current setting of preference option <pref>. Currently you can't
  1607. get the font settings.
  1608.  
  1609. See also,
  1610.     setpref
  1611.  
  1612.  
  1613.     (global {<name> <value>})
  1614. (N)         (S)    ()
  1615.  
  1616. Creates a new global variable <name>, its value will be set to <value>.
  1617.  
  1618. This command is actually implemented as a macro, in the startup file.
  1619.  
  1620. See also,
  1621.     addsym, local, remsym, =
  1622.  
  1623.  
  1624.     (if <condition> [true-cmd] [false-cmd])
  1625. ()    (N)        (S)           (S)
  1626.  
  1627. If <condition> is non-zero the command string [true-cmd] is executed, else,
  1628. [false-cmd] is executed. The result of this command is the result of the
  1629. string executed, or no value if the string which should have been executed
  1630. wasn't provided.
  1631.  
  1632. See also,
  1633.     dowhile, select, while
  1634.  
  1635.  
  1636.     (ilock <status>)
  1637. (N)       (N)
  1638.  
  1639. Sets the status of the input lock. This is intended for use by ARexx macros
  1640. to lock out user input. Only commands from ARexx are received. Input through
  1641. the window just queues up until the <status> is set back to zero. (actually
  1642. the getstr and getnum commands are allowed to break the lock). The returned
  1643. value is the OLD status of the lock.
  1644.  
  1645. It is polite behaviour to reset the lock to whatever it was before you set
  1646. it, ie, from ARexx,
  1647.  
  1648.     '(ilock 1)'
  1649.     oldilock = rc
  1650.     ...your code...
  1651.     '(ilock 'oldilock')'
  1652.  
  1653. Unlike the dlock command this lock is global ie, it affects everywhere, you
  1654. can't just lock the input from one window.
  1655.  
  1656. See also,
  1657.     ARexx, rexx, dlock
  1658.  
  1659.  
  1660.     (insert <section>)
  1661. (N)        (S)
  1662.  
  1663. Inserts section into the file at the current cursor position, since you
  1664. can't insert into the text to be inserted it is probable that only blocks
  1665. can be inserted with this command.
  1666.  
  1667.  
  1668.     (insert `f' <file>)
  1669. (N)        (S)
  1670.  
  1671. Inserts the file <file>.
  1672.  
  1673.  
  1674.     (insert `s' <string>)
  1675. (N)        (S)
  1676.  
  1677. Inserts the string <string>.
  1678.  
  1679.  
  1680.     (insert `a' <value>)
  1681. (N)        (N)
  1682.  
  1683. Inserts the ascii code <value> into the file.
  1684.  
  1685. See also,
  1686.     Section Types, copy, cut
  1687.  
  1688.  
  1689.     (info <type>)
  1690. (S|N)      (S)
  1691.  
  1692. Returns some information about the editor and its current environment.
  1693. <type> can be,
  1694.  
  1695.     col        column number (N)
  1696.     cols    number of columns in this line (N)
  1697.     line    line number (N)
  1698.     lines    number of lines in this file
  1699.     char    ascii value of character under cursor (N)
  1700.     views    number of views open of this file (N)
  1701.     files    number of separate files open (N)
  1702.     windows    total number of open windows (N)
  1703.     time    current time "HH:MM:SS:" (S)
  1704.     date    todays date "DD-MMM-YY" (S)
  1705.     cd        current directory (S)
  1706.     fullname    fullname of current file (includes path) (S)
  1707.     filename    basename of current file (S)
  1708.     dirname    path of current file's directory (S)
  1709.     screenx    width of screen (N)
  1710.     screeny    height of screen (N)
  1711.     leftedge    x position of window (N)
  1712.     topedge    y position of window (N)
  1713.     width    width of window (pixels) (N)
  1714.     height    height of window (N)
  1715.     size    number of characters in file (no tab optimization) (N)
  1716.     offset    distance from start of file (1st char = 1) (N)
  1717.     asleep    1 if window is sleeping (N)
  1718.     port    name of ARexx port (S)
  1719.     rev        release number (N)
  1720.     barheight    height of title bar (N)
  1721.  
  1722.  
  1723.     (isalpha <char>)
  1724. (N)         (N)
  1725.  
  1726. Returns non-zero if <char> is a member of the alphabet.
  1727.  
  1728. See also,
  1729.     isalnum isdigit
  1730.  
  1731.  
  1732.     (isalnum <char>)
  1733. (N)         (N)
  1734.  
  1735. Non-zero if <char> is alphabetic or numeric.
  1736.  
  1737. See also,
  1738.     isalpha, isdigit
  1739.  
  1740.  
  1741.     (isdigit <char>)
  1742. (N)         (N)
  1743.  
  1744. Non-zero if <char> is a digit.
  1745.  
  1746. See also,
  1747.     isalpha, isalnum
  1748.  
  1749.  
  1750.     (isspace <char>)
  1751. (N)         (N)
  1752.  
  1753. Non-zero if <char> is a white space character.
  1754.  
  1755. See also,
  1756.     isalpha, isalnum
  1757.  
  1758.  
  1759.     (join)
  1760. (N)
  1761.  
  1762. Joins this line to the following one, if there is no line below this one it
  1763. has no effect.
  1764.  
  1765. See also,
  1766.     split
  1767.  
  1768.  
  1769.     (local {<name> <value>})
  1770. (N)        (S)        ()
  1771.  
  1772. Creates a variable local to this command string and any command strings
  1773. entered from this one, when this command string is exited all local symbols
  1774. associated with it are discarded.
  1775.  
  1776. The variable will contain <value>.
  1777.  
  1778. Local variables always take precedence over global variables of the same
  1779. name.
  1780.  
  1781. Note: This command is actually a macro in the startup file.
  1782.  
  1783. See also,
  1784.     addsym, macro, =, export
  1785.  
  1786.  
  1787.     (macro <name> <commands>)
  1788. (N)       (S)      (S)
  1789.  
  1790. Creates a macro symbol of <name> with an associated command string of
  1791. <commands>.
  1792.  
  1793. Macros are treated by jed (almost) exactly the same as normal (primitive)
  1794. commands, they are also kept in the same hash table so you could redefine a
  1795. primitive command as a macro :-). Macros are invoked in the same way as
  1796. commands and can have arguments given to them (through the arg command) and
  1797. return a value (return command).
  1798.  
  1799. An example macro could be,
  1800.  
  1801.     ; Word count macro.
  1802.     (macro `wc'
  1803.     {
  1804.     (dlock 1)                ; lock display update
  1805.     (local `words' 0)                   ; word counter
  1806.     (move `sm' 0)                       ; save our position
  1807.     (move `sf')                         ; go to top of file
  1808.     (while {(move `nw' 1)}              ; loop till we get to last word
  1809.     {
  1810.         (= `words' (+ words 1))         ; increment counter
  1811.     })
  1812.     (req `There are %ld word(s) in this file.' `wow!' words)
  1813.     (move `bm' 0)                       ; back to old position
  1814.     (dlock 0)                ; unlock display
  1815.     (return words)                ; return the number of words
  1816.     })
  1817.     ; To invoke this macro type (wc) at the command line
  1818.     ; prompt (normally <ESC>)
  1819.  
  1820.  
  1821. Note: This command is actually a macro definition in the startup file, yes
  1822. thats correct, the macro command is a macro ;)
  1823.  
  1824. See also,
  1825.     Command Strings, Symbols, addsym arg, local, nargs, return, renamesym
  1826.  
  1827.  
  1828.     (move <type> <number>)
  1829. (N)      (S)     (N)
  1830.  
  1831. Moves the cursor according to <type>, which can be,
  1832.  
  1833.     d    --  move down <number> lines
  1834.     dp    --  move down <number> pages
  1835.     u    --  move up <number> lines
  1836.     up    --  move up <number> pages
  1837.     ln    --  move to line <number>
  1838.     cn    --  move to column <number>
  1839.     nc    --  move <number> characters ahead
  1840.     nw    --  move <number> of words ahead
  1841.     pc    --  move <number> of characters back
  1842.     pw    --  move <number> of words back
  1843.     r    --  move <number> columns right
  1844.     rt    --  move <number> of tabs right
  1845.     l    --  move <number> columns left
  1846.     lt    --  move <number> of tabs left
  1847.     of    --  move <number> characters from sof
  1848.  
  1849.     bm    --  move to bookmark <number>
  1850.     sm    --  set bookmark <number>, there are 65535 bookmarks from -32767
  1851.         through 0 to +32767. Bookmarks track any changes to the file
  1852.         and are cleared when a new file is started. Bookmarks are shared
  1853.         between all views of a file.
  1854.  
  1855. The difference between `nc' and `r' is that nc will move onto the start of
  1856. the next line at the eol whereas r will just keep moving right (to a maximum
  1857. of 32768 columns!).
  1858.  
  1859.  
  1860.     (move <type>)
  1861. (N)      (S)
  1862.  
  1863. There also these move commands which don't take a <number> argument,
  1864.  
  1865.     ef    --  move to the last line
  1866.     el    --  move to the last column
  1867.     sf    --  move to the first line
  1868.     sl    --  move to the first column
  1869.     bs    --  move to block start
  1870.     be    --  move to block end
  1871.     am    --  move to the auto bookmark, this is set after a large(ish) move
  1872.         command, or after the find command.
  1873.     mb    --  move to the next bracket which is at the same level of nesting
  1874.         as the one under the cursor, this is what matches what,
  1875.         (   )
  1876.         {   }
  1877.         [   ]
  1878.         <   >
  1879.         `   '
  1880.  
  1881. If the specified position can't be moved to the command will return 0,
  1882. otherwise 1.
  1883.  
  1884.  
  1885.     (match <pattern> <string>)
  1886. (N)       (S)         (S)
  1887.  
  1888. Matches the AmigaDOS wildcard string <pattern> case-insignificantly with
  1889. <string> returning 1 if they are equivalent, 0 if they aren't.
  1890.  
  1891. See also,
  1892.     ==
  1893.  
  1894.  
  1895.     (menu <status>)
  1896. (N)      (N)
  1897.  
  1898. Sets whether or not a menu is displayed in this window. If <status> is
  1899. non-zero the menu is on.
  1900.  
  1901. Currently this (probably) has a bug, in that when a window is slept the menu
  1902. status is not remembered for when it is un-slept.
  1903.  
  1904. Note that setmenu must have been successfully called for a menu to be
  1905. displayed.
  1906.  
  1907. See also,
  1908.     setmenu
  1909.  
  1910.  
  1911.     (nargs)
  1912. (N)
  1913.  
  1914. MACRO-ONLY.
  1915.  
  1916. Returns the number of arguments passed to a macro when it was invoked.
  1917.  
  1918. See also,
  1919.     macro, arg
  1920.  
  1921.  
  1922.     (newfile <file>)
  1923. (N)         (S)
  1924.  
  1925. Opens a new window for <file>, if <file> exists it will be loaded into the
  1926. window.
  1927.  
  1928. See also,
  1929.     activatefile, close, newview, openfile
  1930.  
  1931.  
  1932.     (newview)
  1933. (N)
  1934.  
  1935. Opens an additional window for editing the current file in. The windows
  1936. share the same text buffer and bookmarks but are otherwise independant.
  1937.  
  1938. See also,
  1939.     close, newfile
  1940.  
  1941.  
  1942.     (nextwind <type>)
  1943. (N)          (S)
  1944.  
  1945. Activates the next window in the list.
  1946. <type> can be,
  1947.     f    --  activate the next _separate_ file
  1948.     v    --  activate the next view of this file
  1949.     a    --  step through all windows
  1950.  
  1951. See also,
  1952.     prevwind
  1953.  
  1954.  
  1955.     (nop)
  1956. (N)
  1957.  
  1958. This command does absolutely nothing, it always returns 0.
  1959.  
  1960.  
  1961.     (openfile <file>)
  1962. (N)          (S)
  1963.  
  1964. Tries to load <file> into the current window (and all other windows of the
  1965. same file), if it can't be loaded the window is cleared.
  1966.  
  1967. Sequential access files (ie, pipes and serial ports) can also be read (by
  1968. newfile as well). You'll probably need to rename the editor's copy after
  1969. reading it in, though.
  1970.  
  1971. See also,
  1972.     newfile
  1973.  
  1974.  
  1975.     (prevwind <type>)
  1976. (N)          (S)
  1977.  
  1978. Activates the previous window in the list,
  1979. <type> can be,
  1980.     f    --  previous _separate_file
  1981.     v    --  previous view of this file
  1982.     a    --  step through all windows
  1983.  
  1984. See also,
  1985.     nextwind
  1986.  
  1987.  
  1988.     (poke <char>)
  1989. (N)      (N:8)
  1990.  
  1991. Sets the current character to <char>, only the lower 8 bits of <char> are
  1992. used.
  1993.  
  1994.  
  1995.     (position <x> <y> <w> <h>)
  1996. (N)          (N) (N) (N) (N)
  1997.  
  1998. Sets the position of the current window,
  1999.     <x> --  x position
  2000.     <y> --  y position
  2001.     <w> --  width
  2002.     <h> --  height
  2003.  
  2004. All values are in pixels.
  2005.  
  2006. If the window is currently sleeping the new position will not be used until
  2007. it's woken up.
  2008.  
  2009. See also,
  2010.     sleep, unsleep
  2011.  
  2012.  
  2013.     (replace `s' <string>)
  2014. (N)              (S)
  2015.  
  2016. Sets the replace string to <string>.
  2017.  
  2018.  
  2019.     (replace `r')
  2020. (N)
  2021.  
  2022. If the string under the cursor matches the string set by (find `s') it is
  2023. replaced with the string set by (replace `s') and the cursor is advanced to
  2024. the end of the replaced string.
  2025.  
  2026. Note that it probably isn't a good idea to replace text found with
  2027. wildcards.
  2028.  
  2029. When regular expression searching has been enabled (see find) the actual
  2030. piece of text which matched the expression is replaced, the replace string
  2031. can also include these meta-characters,
  2032.  
  2033.     &   --  insert the whole of the string which was matched
  2034.     \n  --  insert the n'th parenthesized string from the RE (n is a digit
  2035.             from 1 to 9).
  2036.  
  2037.  See also,
  2038.     find
  2039.  
  2040.  
  2041.     (remsym {<name>})
  2042. (N)         (S)
  2043.  
  2044. Removes the symbol <name>, can be *any* type of symbol whatsoever.
  2045.  
  2046. See also,
  2047.     Symbols, addsym, global, macro
  2048.  
  2049.  
  2050.     (rempath {<dir>})
  2051. (N)          (S)
  2052.  
  2053. Removes directories from the reference path list which were added by
  2054. addpath.
  2055.  
  2056. <dir>'s must be exactly the same string as what was given to addpath, it is
  2057. _not_ enough that the two <dir>'s point to the same place (ie, if the path
  2058. sys:man is addpath'ed and you try to rempath dh0:man it won't work, even
  2059. though sys: may well be dh0: ).
  2060.  
  2061. See also,
  2062.     addpath, getref
  2063.  
  2064.  
  2065.     (rename <name>)
  2066. (N)        (S)
  2067.  
  2068. Change the name of the current file to <name>, this is where the file will
  2069. be saved to next savefile command.
  2070.  
  2071. See also,
  2072.     newfile, savefile, savefileas,
  2073.  
  2074.  
  2075.     (renamesym {<old-name> <new-name>})
  2076. (N)        (S)       (S)
  2077.  
  2078. This command changes the name of the global symbol <old-name> to <new-name>.
  2079.  
  2080. The main reason I added this command was to make it very easy to add new
  2081. features to existing primitive (built-in) commands, for example, if you
  2082. always want the openfile command to use a file-requester if it is not given
  2083. a filename you could use this script,
  2084.  
  2085.     ; rename openfile command to _openfile
  2086.     (if (renamesym `openfile' `_openfile')
  2087.     {
  2088.     ; create a macro of name openfile
  2089.     (macro `openfile'
  2090.     {
  2091.         ; were we given a filename
  2092.         (if (== nargs 0)
  2093.         {
  2094.         ; no, so request one and open it
  2095.         (_openfile (freq `r' `file...' (info `fullname')))
  2096.         }
  2097.         {
  2098.         ; yes, so just open it
  2099.         (_openfile (arg 1 `s' `'))
  2100.         })
  2101.     })
  2102.     })
  2103.  
  2104. See also,
  2105.     Symbols, addsym, remsym, macro
  2106.  
  2107.  
  2108.     (req <body> <gads> {[values]})
  2109. (N)     (S)    (S)    (S|N)
  2110.  
  2111. Displays a requester containing <body> as its main text and <gads> as its
  2112. gadgets. The <gads> specification can define multiple gadgets by separating
  2113. each one by a vertical bar ('|') character.
  2114.  
  2115. Both <body> and <gads> can contain format characters (%s, %ld, etc), <body>
  2116. takes formatting arguments from [values] first. The value returned is the
  2117. number of gadget that was selected (starting at 1 for the leftmost gadget)
  2118. or zero if the rightmost gadget was selected.
  2119.  
  2120. See also,
  2121.     format
  2122.  
  2123.  
  2124.     (rexx <type> <string>)
  2125. (N)      (S)     (S)
  2126.  
  2127. Send a command to ARexx, <type> can be,
  2128.  
  2129.     m    --  <string> is the name of a macro-file to be executed by ARexx, it
  2130.         should have a filename extension of ".jed".
  2131.         If you want you can specify any arguments to the macro after
  2132.         the macro name, ie,
  2133.         (rexx `m' `amacro arg1 arg2')
  2134.  
  2135.     s    --  <string> is a string of ARexx commands to be executed by REXX.
  2136.  
  2137. See also,
  2138. ARexx
  2139.  
  2140.  
  2141.     (return [result])
  2142. ()        (S|N)
  2143.  
  2144. MACRO-ONLY.
  2145.  
  2146. Returns control from a macro to whatever invoked it, the value of the macro
  2147. is [result], this can be any type of value.
  2148.  
  2149. This command never returns (for obvious reasons).
  2150.  
  2151. See also,
  2152.     macro
  2153.  
  2154.  
  2155.     (savefile)
  2156. (N)
  2157.  
  2158. Saves the current file as the file it was loaded from (or as what it has
  2159. been renamed to).
  2160.  
  2161. See also,
  2162.     openfile, rename, savefileas,
  2163.  
  2164.  
  2165.     (savefileas <name>)
  2166. (N)        (S)
  2167.  
  2168. Saves the current file as file <name>.
  2169.  
  2170. From now on the current file will be called <name> by JEd.
  2171.  
  2172. See also,
  2173.     openfile, rename, savefile
  2174.  
  2175.  
  2176.     (savesection <section> <file>)
  2177. (N)         (S)       (S)
  2178.  
  2179. Saves the specified section of text as file <file>.
  2180.  
  2181. If you're writing a macro or ARexx script for something like integrated
  2182. compilation this command makes more sense than savefileas since it doesn't
  2183. change the state of the 'changes' counter or the name of the file. ie, use
  2184.  
  2185.     (savesection `f' `t:???')
  2186.  
  2187. See also,
  2188.     savefile, savefileas, changes
  2189.  
  2190.  
  2191.     (saveprefs <boolean>)
  2192. (N)           (N)
  2193.  
  2194. Allows you to set whether or not options set by the setpref command will be
  2195. saved into the file "s:jed.config" file when the editor is exited. By
  2196. default this command is always set to true (ie, non-zero), therefore saving
  2197. preference files.
  2198.  
  2199. Note that contrary to what the name suggests this command doesn't actually
  2200. save anything, this is only done by the cleanup code.
  2201.  
  2202. See also,
  2203.     Startup, setpref
  2204.  
  2205.  
  2206.     (select {<condition> <command>} [default-cmd])
  2207. ()         (N)     (S)        (S)
  2208.  
  2209. If <condition> is non-zero its corresponding <command> is executed, the
  2210. result of the executed <command> is returned. If none of the supplied
  2211. <conditions>'s are non-zero the [default] command string is executed (if it
  2212. is supplied).
  2213.  
  2214. An example,
  2215.  
  2216.     (select
  2217.     (== (info `char') ~a)
  2218.     {
  2219.         (settitle `a')
  2220.     }
  2221.     (== (info `char') ~b)
  2222.     {
  2223.         (settitle `b')
  2224.     }
  2225.     {
  2226.         (settitle `neither')
  2227.     }
  2228.     )
  2229.  
  2230. See also,
  2231.     Command Strings, if, dowhile, while
  2232.  
  2233.  
  2234.     (setmenu <file>)
  2235. (N)         (S)
  2236.  
  2237. Reads <file> and makes a set of menus from it, each line represents one part
  2238. of the menu, the format of the different types of lines are,
  2239.  
  2240. MENU "name"                     Creates a new menu block
  2241.  
  2242. ITEM "name" "key" "commands"    Creates a menu item, key is the command-key
  2243.                 shortcut, commands is the command string
  2244.                 which gets executed when the item is selected.
  2245.  
  2246. SUB "name" "key" "commands"     Creates a sub item on the last menu item.
  2247.  
  2248. BAR                Creates a separator bar in the menu block.
  2249.  
  2250. SBAR                Creates a separator bar in the sub item
  2251.                 block.
  2252.  
  2253. END                Terminates the menu definition.
  2254.  
  2255. The "key" shortcut may be upper or lower case. Menu shortcuts are only
  2256. considered to be case-significant when two shortcuts of the same letter (but
  2257. different case) are defined.
  2258.  
  2259. See also,
  2260.     Command Strings, menu
  2261.  
  2262.  
  2263.     (setpref <pref> [arg1] [arg2])
  2264. (N)         (S)
  2265.  
  2266. Sets one of the preference settings,
  2267.  
  2268.     pref            arg1        arg2
  2269.     ----------------------- --------------- ----------------
  2270.     tabsize            size (N)
  2271.     leftmargin            col (N)
  2272.     rightmargin            col (N)
  2273.     autoindent            bool (N)
  2274.     wordwrap            bool (N)
  2275.     font            name (S)        size (N)
  2276.     disktab            size (N)
  2277.     savetabs            code (N)
  2278.     scrollhack            bool (N)
  2279.     bakdir            name (S)
  2280.     baknum            number (N)
  2281.     saveprefs            bool (N)
  2282.     nosnapshot            code (N)
  2283.     pubscreen            name (S)
  2284.  
  2285. Explanations:
  2286.  
  2287.     tabsize
  2288.     The size of tabs on the screen.
  2289.  
  2290.     disktab
  2291.     The size of tabs read from and written to disk.
  2292.  
  2293.     savetabs
  2294.     Controls whether or not TAB (0x09) bytes are saved in files, code
  2295.     can be,
  2296.         0    --  no TABs are saved
  2297.         1    --  leading spaces in each line are optimized to TABs
  2298.         2    --  all spaces which can be are optimized into TABs are and
  2299.             trailing whitespace is discarded (except after quotes)
  2300.  
  2301.     leftmargin
  2302.     Where the cursor is put horizontally after the split command, unless
  2303.     autoindent is on.
  2304.  
  2305.     rightmargin
  2306.     Where long lines are chopped when wordwrapping.
  2307.  
  2308.     font
  2309.     The font to use for this window. The <name> must have a ".font"
  2310.     suffix.
  2311.  
  2312.     bakdir
  2313.     The directory which backup files are saved to.
  2314.  
  2315.     baknum
  2316.     The maximum number of backup copies to keep of each file. Whenever a
  2317.     file is saved the previous copy (if it exists) is put into the
  2318.     backup directory.
  2319.         eg, if bakdir is set to t: and baknum is set to three you would
  2320.         get backups like,
  2321.         t:afile.bak1  - newest after actual file
  2322.         t:afile.bak2
  2323.         t:afile.bak3  - oldest
  2324.  
  2325.     nosnapshot
  2326.     Determines when (or if) the window's dimensions are stored for
  2327.     saving to the configuration file. The possible code's are,
  2328.         0    --  when the window is closed
  2329.         1    --  never
  2330.         2    --  now (but never again)
  2331.  
  2332.     pubscreen
  2333.     Sets the name of the public screen which all new windows are to be
  2334.     opened on. The Workbench screen is "Workbench", to use the default
  2335.     public screen use a name of "" (a null string).
  2336.  
  2337. All the above preferences are local to each window, when a new window is
  2338. created it inherits its preferences from its parent. The following
  2339. preference settings are global to the whole editor.
  2340.  
  2341.     scrollhack
  2342.     When on (non-zero) scrolling speed is doubled (ish) when no blocks
  2343.     are being displayed. To do this Intuition is fooled into only
  2344.     scrolling one bitplane. This option is on by default but you may
  2345.     need to turn it off for newer os releases, (those supporting
  2346.     AGA???). Thanks to Adriaan van den Brand for this idea.
  2347.  
  2348.     saveprefs
  2349.     When on (non-zero) the preferences of each file saved will be stored
  2350.     in that file's filenote. This option is intelligent enough not to
  2351.     overwrite any existing comments which aren't preference
  2352.     specifications.
  2353.  
  2354. Each file that is loaded will have it's filenote checked to see if it
  2355. contains a string that defines some preferences (this is what the saveprefs
  2356. preference option does), the string should be formatted like this,
  2357.  
  2358.     @@ww<+|->\ai<+|->\ts<n>\dt<n>\st<n>\lm<n>\rm<n>
  2359.  
  2360.     ie,
  2361.     @@ww-\ai+\ts4\dt8\st2\lm1\rm77
  2362.  
  2363. the individual switches are,
  2364.     ww    --  wordwrap
  2365.     ai    --  autoindent
  2366.     ts    --  tabsize
  2367.     dt    --  disk tabsize
  2368.     st    --  save tabs
  2369.     lm    --  left margin
  2370.     rm    --  right margin
  2371.  
  2372. They can be specified in any order, not all of them have to be given. ie, to
  2373. make sure that a particular file _never_ has any tab characters saved in it
  2374. you can use the following CLI command,
  2375.  
  2376.     1> filenote filename "@@st0"
  2377.  
  2378. where filename is whatever the file is called.
  2379.  
  2380. See also,
  2381. Startup,
  2382. getpref,
  2383. saveprefs
  2384.  
  2385.  
  2386.     (settitle <title>)
  2387. (N)          (S)
  2388.  
  2389. Sets the current window's title string to <string>, this string will remain
  2390. in view until the next IDCMP event.
  2391.  
  2392. See also,
  2393.     Title Bar
  2394.  
  2395.  
  2396.     (script <section>)
  2397. ()        (S)
  2398.  
  2399. Executes the text in the specified section of the current window.
  2400.  
  2401.  
  2402.     (script `x' <file>)
  2403. ()        (S)
  2404.  
  2405. Executes the script file <file>. (`x' stands for eXternal). If <file> can
  2406. not be found relative to the current directory "s:jed/" will be prepended to
  2407. <file> and it will be looked for again.
  2408.  
  2409.  
  2410.     (script `s' <string>)
  2411. ()        (S)
  2412.  
  2413. Execute command string <string>.
  2414.  
  2415. All the script variants return the result of whatever was interpreted, the
  2416. text that is scripted doesn't have to be a command clause, any clause-type
  2417. is acceptable.
  2418.  
  2419. An interesting use of this is to process escape sequences in a string (from
  2420. a prompt), ie, this will prompt for a 'find' string and interpret it to use
  2421. any escape sequences,
  2422.  
  2423.     (find `s'
  2424.     (script `s'
  2425.         (format ``%s''
  2426.         (getstr `find> ')
  2427.         )
  2428.     )
  2429.     )
  2430.  
  2431. the format command is necessary to make the string into the correct format
  2432. for a string clause (ie, in quotes).
  2433.  
  2434. See also,
  2435.     Command Strings, Clauses, cli
  2436.  
  2437.  
  2438.     (sleep)
  2439. (N)
  2440.  
  2441. Make the current window go to 'sleep', it will become a small window on the
  2442. screen title bar. It can be set back to normal by the (unsleep) command or
  2443. clicking the right mouse button when the window is active.
  2444.  
  2445. All commands (except for those which use the prompt, these will enlarge the
  2446. window) can be executed while the window is sleeping. Anything you type
  2447. while a window is asleep will be inserted!
  2448.  
  2449. See also,
  2450.     getstr, unsleep
  2451.  
  2452.  
  2453.     (split)
  2454. (N)
  2455.  
  2456. Break the line into two at the cursor.
  2457.  
  2458. See also,
  2459.     join
  2460.  
  2461.  
  2462.     (substr <string> <index> <len>)
  2463. (S)        (S)         (N)     (N)
  2464.  
  2465. Returns a string extracted from <string>, first character is <index>
  2466. characters from start of <string>, <len> characters are extracted.
  2467.  
  2468.  
  2469.     (symboldump <file> <type>)
  2470. (N)        (S)    (S)
  2471.  
  2472. Writes the symbol table's contents to <file>, <type> can be,
  2473.  
  2474.     globals --    all global symbols
  2475.     locals  --    all local symbols
  2476.     all        --    all symbols
  2477.  
  2478. See also,
  2479.     Symbols, addsym
  2480.  
  2481.  
  2482.     (system <command>)
  2483. (N)        (S)
  2484.  
  2485. Executes an AmigaDOS command string. The value of this command is the return
  2486. code of the executed command or -1 if the command couldn't be executed.
  2487.  
  2488.  
  2489.     (toupper <section>)
  2490. (N)         (S)
  2491.  
  2492. Make all characters in <section> upper case.
  2493.  
  2494. See also,
  2495.     Section Types, changecase, tolower
  2496.  
  2497.  
  2498.     (tolower <section>)
  2499. (N)         (S)
  2500.  
  2501. Make all characters in <section> lower case.
  2502.  
  2503. See also,
  2504.     Section Types, changecase, toupper
  2505.  
  2506.  
  2507.     (type <value>)
  2508. (N)
  2509.  
  2510. Returns the data-type of its single argument, return values can be,
  2511.  
  2512.     1/VTF_STRING    --    string type
  2513.     2/VTF_NUMBER    --    number type
  2514.  
  2515.  
  2516.     (unbind {<key>})
  2517. (N)         (S)
  2518.  
  2519. Remove any command string bound to <key>.
  2520.  
  2521. See also,
  2522.     Command Strings, bind
  2523.  
  2524.  
  2525.     (undo <type>)
  2526. (N)      (S)
  2527.  
  2528. This commands undoes changes, currently the only type of undo supported is
  2529. to reset the state of the last-edited line to what it was before being
  2530. edited, <type> can be,
  2531.  
  2532.     l    --  only undo line if cursor is on the line that the text in the
  2533.         undo buffer was copied from.
  2534.     L    --  always undo line, don't worry if cursor isn't on line to be
  2535.         undone.
  2536.  
  2537. When the undo-buffer is used the contents of the line it's used on is copied
  2538. into the buffer, what I mean is that undoing something twice gets you back
  2539. where you started.
  2540.  
  2541. This command has a limitation, sometimes after undo'ing a line any bookmarks
  2542. (or any other remembered coordinates) on that line may be slightly out, this
  2543. is _not_ a bug just a [mis]feature.
  2544.  
  2545.  
  2546.     (unsleep)
  2547. (N)
  2548.  
  2549. Wake up a sleeping window.
  2550.  
  2551. See also,
  2552.     sleep
  2553.  
  2554.  
  2555.     (while <condition> <body>)
  2556. (N)       (S)           (S)
  2557.  
  2558. First, <condition> is executed, if it returns a non-zero value <body> is
  2559. executed and the above steps are repeated, else abort the loop and return
  2560. the number of times that <body> was executed.
  2561.  
  2562. There are a couple of in-built protections against infinite loops, firstly,
  2563. if the number of iterations reaches a million the loop is aborted. Secondly
  2564. (and more usefully), the loop can be aborted by sending a ^c break signal to
  2565. the editor. This signal can be sent by the break command or, if you have the
  2566. software toolkit disks, the breaktask command.
  2567.  
  2568. example,
  2569.     (while {(move `dn' 1)}
  2570.     {
  2571.     ...do something...
  2572.     })
  2573.  
  2574. See also,
  2575.     Command Strings, dowhile, if, select
  2576.  
  2577.  
  2578. Provided Macros.
  2579. ****************
  2580.  
  2581. Some scripts of macros are included in the distribution (in the macros/
  2582. directory, you should copy them to s:jed/). These are mainly intended to
  2583. serve as examples of how you can program JEd to meet your own needs.
  2584.  
  2585. Macro files,
  2586.  
  2587.     blockstack
  2588.     stackwins
  2589.     make
  2590.     indent
  2591.  
  2592. To install any of the sets of macros you have to execute its file as a JEd
  2593. script, use the command,
  2594.  
  2595.     (script `x' <filename>)
  2596.  
  2597.  
  2598. blockstack
  2599. ==========
  2600.  
  2601. This file provides commands for a stacking cut/copy & insert, the commands
  2602. are,
  2603.  
  2604.     (stkcopy <section>)
  2605. (N)         (S)
  2606.  
  2607. Copy the text in <section> onto the stack.
  2608.  
  2609.  
  2610.     (stkcut <section>)
  2611. (N)        (S)
  2612.  
  2613. Same as stkcut except the copied text is then deleted.
  2614.  
  2615.  
  2616.     (stkins)
  2617. (N)
  2618.  
  2619. Insert the text from the top of the stack.
  2620.  
  2621. See also,
  2622.     Section Types, copy, cut, insert
  2623.  
  2624.  
  2625. stackwins
  2626. =========
  2627.  
  2628. This is a command to arrange a specified set of windows into either a
  2629. vertical or horizontal stack (ie, adjacent to each other).
  2630.  
  2631.     (stackwins <direction> <type>)
  2632. ()           (S)       (S)
  2633.  
  2634. <direction> is either "x" or "y", this specifies which direction to stack
  2635. them in. <type> can be,
  2636.  
  2637.     a    --  do all windows
  2638.     v    --  do all views of this file
  2639.     f    --  do one view of each file
  2640.  
  2641.  
  2642. make
  2643. ====
  2644.  
  2645. This is a macro to asynchronously run make (or dmake) in a separate window.
  2646.  
  2647.     (make <args>)
  2648. ()      (S)
  2649.  
  2650. <args> are passed straight to the make utility, by default this macro uses
  2651. dmake, though it's very easy to change it.
  2652.  
  2653.  
  2654. indent
  2655. ======
  2656.  
  2657. This file installs some keybindings to automate the indentation of C code,
  2658. it is also suitable for writing JEd scripts with.
  2659.  
  2660. If you type the following line (<..> is one keypress, spaces aroud <..> are
  2661. just for readability),
  2662.  
  2663.     if(expr) <alt {> break; <alt }>
  2664.  
  2665. you would get,
  2666.  
  2667.     if(expr)
  2668.     {
  2669.     break;
  2670.     }*
  2671.  
  2672. The cursor would be left where the asterisk is.
  2673.  
  2674. So, you type "alt {" to begin a new block and "alt }" to skip to the end of
  2675. the current block.
  2676.  
  2677.  
  2678. History.
  2679. ********
  2680.  
  2681. Revisions:
  2682.     2.07
  2683.     2.06b
  2684.     2.06
  2685.     2.05
  2686.     2.04
  2687.     2.03
  2688.     2.02
  2689.     2.01
  2690.     2.0
  2691.  
  2692. warning:
  2693.     Revision history is updated in realtime -- as soon as a change is
  2694.     working I note it in here. This may lead to some disjointed, incorrect
  2695.     or just totally weird text.
  2696.  
  2697.  
  2698. 2.07 (16-Jan-93)
  2699. ================
  2700.  
  2701. * uses ReadArgs() interface to allow for standard AmigaDOS style command
  2702. line parsing. Some more options can be specified from the command line
  2703. (pubscreen, tabsize).
  2704.  
  2705. * added clause type ^x to allow easy use of control codes.
  2706.  
  2707. * added (info `barheight') command
  2708.  
  2709. * new command (saveprefs) to enable preferences to not be saved on exit.
  2710.  
  2711. * fixed bug with >= and <= commands being swapped.
  2712.  
  2713. * made main document into AmigaGuide format
  2714.  
  2715. * added renamesym command. Now you can easily add features to primitive
  2716. commands.
  2717.  
  2718. * fixed a killer bug. before, any attempt to assign a string to a variable
  2719. with the = command didn't bother to make a copy of the string, just used the
  2720. pointer it was given, deadly stuff, how come I only just found it :-(
  2721.  
  2722. * fixed bug in `ef' section type, it included one line to many.
  2723.  
  2724. * fixed problem of activated view not being refreshed when another view of
  2725. the same file closes.
  2726.  
  2727. * added car and cdr commands.
  2728.  
  2729. * rewrote a lot of command interpreter. now local variables are much more
  2730. useful (they can be used anywhere, not just in macros :). Also symbol
  2731. clauses which don't have any arguments don't have to be parenthesized, ie,
  2732. all variable referencing.
  2733.  
  2734. * addsym command has been RADICALLY altered, now any type of symbol, local
  2735. or global, with any type of value (excluding functions) can be created. This
  2736. means you can have such things as local macros :)
  2737.  
  2738. * removed global, local and macro primitives, they're now implemented as
  2739. macros in the startup file.
  2740.  
  2741. * new command, export, for fiddling with the scope of local symbols
  2742.  
  2743. * oops, call to AslRequestTags() in cmd_freq() didn't mark the end of its
  2744. taglist, until the changes detailed above were added the stack must have
  2745. been protecting me ;^)
  2746.  
  2747. * cleaned up a lot of the return values (now they all conform to what I set
  2748. out in the documentation!)
  2749.  
  2750. * the commands which can take more than one set of arguments now abort if
  2751. any argument is of the wrong type, not just go on to the next set like they
  2752. used to.
  2753.  
  2754. * new command, type, for examining the type of a symbol.
  2755.  
  2756. * fixed problem of not being allowed to insert sections when you should be
  2757. able to (mainly when trying to insert part of a line onto the same line).
  2758.  
  2759. * fixed bug in `mX' section type
  2760.  
  2761. * added undo command, only does single-line undo at the moment.
  2762.  
  2763. * added isspace command
  2764.  
  2765. * new option on command line "CD/K"
  2766.  
  2767. * added Un*x style regular expression search & substition, uses the
  2768. regexp(3) package (with a couple of modifications).
  2769.  
  2770.  
  2771. 2.06b (10-Dec-92)
  2772. =================
  2773.  
  2774. * fixed the failure to open initial windows on the screen named by (setpref
  2775. `p')
  2776.  
  2777.  
  2778. 2.06 (04-Dec-92)
  2779. ================
  2780.  
  2781. * added some more stuff to title bar display
  2782.  
  2783. * added block-marking from the mouse, double-click to toggle block marks.
  2784.  
  2785. * added preference option to allow you to specify when (if at all) to
  2786. snapshot the window's position.
  2787.  
  2788. * changed ARexx message port naming convention
  2789.  
  2790. * added substr command
  2791.  
  2792. * fixed wordwrap crash when you type further than the right margin
  2793.  
  2794. * position command no longer unsleeps sleeping windows, just sets it so that
  2795. when they wake up they get the new dimensions.
  2796.  
  2797. * added support for opening on named public screens
  2798.  
  2799.  
  2800. 2.05 (22-Nov-92)
  2801. ================
  2802.  
  2803. * fixed below-mentioned reference problem, new reference type to specify the
  2804. _line_ to move to. makerefs now uses this when referencing .h files.
  2805.  
  2806. * removed 'oldprefs' preference setting, it's intended use has been built
  2807. into the main editor code :-) Preference settings embedded in filenotes now
  2808. work much more smoothly, the previous preference settings (last only) are
  2809. put into the next window opened or the next file loaded or into the
  2810. configuration file.
  2811.  
  2812. * added new 'm' section type (from cursor to a specified bookmark).
  2813.  
  2814. * insert command now sets the automark before moving the cursor.
  2815.  
  2816. * added DOS variable support, local and env: variables are looked for if an
  2817. internal symbol can't be found (they are checked for just before looking for
  2818. an ARexx macro).
  2819.  
  2820.  
  2821. 2.04 (03-Nov-92)
  2822. ================
  2823.  
  2824. * new section type `n'
  2825.  
  2826. * oh dear, getref command has problems when a single seek offset is given
  2827. and the referenced file contains tabs. Since jed expands all tabs into
  2828. spaces when it loads the file the seek offset (which isn't used until the
  2829. file has been loaded) is incorrect.
  2830.  
  2831. * disktab preference setting is now local to each window
  2832.  
  2833. * clear command now resets titles of sleeping views like it should
  2834.  
  2835. * put in some new preference options, mainly to allow individual files to
  2836. keep their preferences in their filenotes (I know filenotes are supposed to
  2837. be for the use of users only but I've done it in a nice, user friendly,
  2838. manner ;-)
  2839.  
  2840. * opening new windows from a sleeping window no longer crashes spectacularly
  2841. (or at all :-)
  2842.  
  2843. * when (savetabs == 2) single spaces are no longer `optimized' into tabs
  2844.  
  2845. * revised pubman's command syntax
  2846.  
  2847.  
  2848. 2.03 (13-Oct-92)
  2849. ================
  2850.  
  2851. * fixed slight cosmetic bug in replace command.
  2852.  
  2853. * added isalpha, etc, commands
  2854.  
  2855. * fixed makerefs (again) and now it references function definitions which
  2856. don't have the /*ref*/ heading that was previously required.
  2857.  
  2858. * added code to try and call REXX macros for unknown symbols, means that you
  2859. can refer to REXX scripts in the same way as JEd macros and commands (except
  2860. you can't return results from REXX)
  2861.  
  2862. * made all invocations of JEd have their own ARexx port.
  2863.  
  2864. * added (info `port') command
  2865.  
  2866.  
  2867. 2.02 (03-Oct-92)
  2868. ================
  2869.  
  2870. * oops, the setmenu command didn't actually look for the END keyword, it
  2871. gave an error and aborted if it was given.
  2872.  
  2873. * added mousebutton qualifier support.
  2874.  
  2875. * fixed some of arg command
  2876.  
  2877. * sigh... the OpenWindowTags() call in windows.c didn't mark the end of its
  2878. tag list with a TAG_END, now it does.
  2879.  
  2880. * all windows are now opened on the default public screen.
  2881.  
  2882. * included the pubman utility to make it easy to give JEd it's own screen
  2883.  
  2884. * new commands, ^, ^^, >>, <<
  2885.  
  2886. * savesection now saves tabs if savetabs is on.
  2887.  
  2888. * savetabs preference improved.
  2889.  
  2890. * now configuration data is automatically saved by DICE. As a result of this
  2891. the saveprefs command has been discarded.
  2892.  
  2893. * setmenu didn't recognize SBAR, it looked for SUBBAR... now it's fixed, I
  2894. suppose I shouldn't have written the documentation from memory :-(
  2895.  
  2896. * when the name of a sleeping window changes (openfile, rename, etc...) it's
  2897. title is now corrected.
  2898.  
  2899. * more of the move commands set the auto-mark now.
  2900.  
  2901. * added (move `of') command.
  2902.  
  2903. * IMPORTANT: before, reference seek positions started at 1, now they start
  2904. at 0. This means all .jrefs files containing seek offsets have to be remade.
  2905. This is to provide consistency with the (info `offset') command and (move
  2906. `of').
  2907.  
  2908.  
  2909. 2.01 (20-Sep-92)
  2910. ================
  2911.  
  2912. * removed (undocumented) 8 argument limit on commands - now commands can get
  2913. as many arguments as memory allows. (not quite, format and req are limited
  2914. to 20 formatting values).
  2915.  
  2916. * fixed bug in (saveprefs) command, didn't show up until version bump.
  2917.  
  2918. * position unsleep's a sleeping window before changing its position.
  2919.  
  2920. * fixed activatefile's refresh problems.
  2921.  
  2922. * makerefs failure to expand a a pathname when no -full is given has been
  2923. fixed. also, structure searching has been rewritten, it won't give 100%
  2924. success but will work on the system include files (or at least most of
  2925. them). typedef'ed structures are referenced by their typedef not any given
  2926. structure tag. makerefs can now be interrupted by ^c
  2927.  
  2928. * new commands, break, select, dowhile, symboldump, move `bs', move `be',
  2929. info `size', info `offset', script `s', ilock, info `asleep', setpref
  2930. `scrollhack', changes
  2931.  
  2932. * made poke and replace `r') increment change count
  2933.  
  2934. * extract can now get any amount of text (the whole file if you want!)
  2935.  
  2936. * the libraries; commodities, iffparse and asl are only kept opened when
  2937. needed. For commodities and iff this is only when they're being used. asl is
  2938. kept open after the first use of the file req. Under V37 iprefs keeps
  2939. iffparse open all the time anyway so this doesn't help much.
  2940.  
  2941. * wow, now commodities is kept closed, scrolling is faster. (as long as no
  2942. one else has cx open.) (i expect that this is only noticeable if you're
  2943. running a 68000 and v37 or less).
  2944.  
  2945. * oops, opening and closing the commodities.library so much sometimes
  2946. crashed the input.device. Wrote my own description -> key/qual bytes
  2947. function. See the (bind) description for more info. commodities isn't used
  2948. at all anymore.
  2949.  
  2950. * added 'global' as synonym for 'addsym', fits better with local.
  2951.  
  2952. * some commands now take more than one set of arguments at once (bind,
  2953. addsym, addpath, etc...)
  2954.  
  2955. * fixed bug in (move `nw') and (move `pw')
  2956.  
  2957. * scrolling speed doubled (when no block is on screen) due to a cunning tip
  2958. from Adriaan van den Brand.
  2959.  
  2960. * fixed bug when deleting from column 0 to column n (NOT 0). Line isn't
  2961. joined anymore.
  2962.  
  2963. * can now be started via the Workbench.
  2964.  
  2965. * fixed bug of \t characters being the size of disktab not tabsize when
  2966. inserting strings or characters.
  2967.  
  2968. * fixed some commands who didn't bother to check their arguments before
  2969. using them.
  2970.  
  2971. * fixed a bug in the menu creation function and added some new menus to the
  2972. jed-menus script.
  2973.  
  2974. * added code to create backups for each saved file, a configurable number of
  2975. backups can be stored in a configurable directory.
  2976.  
  2977. * oops, the command template checker didn't detect errors when a command was
  2978. passed an incorrect _number_ of arguments. Now it does.
  2979.  
  2980. * added null clause (@)
  2981.  
  2982. * fixed up readtx() (function to load text), removed possible array over-
  2983. stepping and made it so that lines up to the maximum of 32768 chars can be
  2984. read properly.
  2985.  
  2986. * added one-line history buffer to prompt stuff.
  2987.  
  2988.  
  2989. 2.0 (08-Sep-92)
  2990. ===============
  2991.  
  2992. * total rewrite from version 1, switched from assembler to C.
  2993.  
  2994.  
  2995. Known Bugs.
  2996. ***********
  2997.  
  2998. System requesters (Please insert volume, etc...) only open on the correct
  2999. screen while the default public screen is the same as what we're open on.
  3000.  
  3001. The makerefs program is pretty inadequate (but slowly getting better :-)
  3002.  
  3003. Won't work satisfactorily on a single bitplane screen.
  3004.  
  3005.  
  3006. Contact Address.
  3007. ****************
  3008.  
  3009. e-mail:
  3010.     jsh@ukc.ac.uk
  3011.     (hopefully valid until July '95)
  3012.  
  3013. paper-mail:
  3014.     John Harper,
  3015.     91 Springdale Road,
  3016.     Broadstone,
  3017.     Dorset BH18 9BW,
  3018.     ENGLAND.
  3019.  
  3020. If you can, please use email, if you don't get any reply it's because its a
  3021. University holiday and I'm at home, so try the snail-mail address.
  3022.  
  3023.