home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d7xx / d768 / uedit.lha / Uedit / Documentation / ManualInProgress.lha / new.manual123
Text File  |  1992-03-27  |  506KB  |  10,699 lines

  1.  
  2. MANUAL UPDATE:  The normal-Esc command (set PM terminator) was modified as
  3. follows:  If atCursor==locB, it lets you set the PM terminator character as
  4. always.  If atCursor!=locB, it moves the cursor to locB.  locB is the location
  5. marking the last scratch delete(s); moving the cursor to locB is handy
  6. because you can move the cursor somewhere else and long as you don't do a
  7. scratch delete there you can return quickly to your former position.
  8.  
  9. NOTE:  get config defaults and fix DEFAULTS in manual
  10. NOTE:  update the Color Commands in part1 and any discussion of local/global
  11. screens and colors
  12.  
  13. MANUAL UPDATE:  Fold (R-\)  can now optionally put in line numbers.  And a new
  14. command, Goto Source (A-\), was added to Config!z and to the folds menu which
  15. works as follows:  The cursor is in a (numbered) line in the fold-file; the
  16. command takes you to that line's source line in the original file.
  17.  
  18. MANUAL UPDATE:  Startup compiling now lets you switch to tiny window.  It
  19. pops back to the Uedit screen when an error is found or the compiling is
  20. finished.
  21.  
  22. MANUAL UPDATE:  added new Ctl-f9 Last Search key & menu item.  It lets you
  23. select from up to 10 previously used search strings.  If the search buffer
  24. isn't being stacked, it lets you turn on stacking for it.
  25.  
  26. MANUAL UPDATE:  A new apropos R-5 command was provided (written originally by
  27. Tony Sumrall).  It allows you to do an instant search that lists and
  28. describes all commands that pertain to "scroll", for instance, or "cursor",
  29. "undo", or "copy".  The apropos command uses a Help-Key file which is created
  30. from the Key-Help file by the MakeHelpKey program that is provided.  The
  31. source MakeHelpKey.c is also provided.
  32.  
  33.  
  34.  
  35. MANUAL UPDATE:  A new match-braces R-4 command was provided (written
  36. originally by Tom Zartler).  It matches parens or curly braces, inverting the
  37. bracketed region in the display.
  38.  
  39.  
  40.  
  41. MANUAL UPDATE:  A new in-use command R-1 was provided (originally written by
  42. Kurt Wessels).  It makes a table showing which key combinations are in use
  43. (have got a cmd assigned to them) and which are available.  This is extremely
  44. useful in deciding to which keys you would like to assign new commands in
  45. your config.
  46.  
  47.  
  48.  
  49. MANUAL UPDATE:  A new R-6 command swaps current file with next file.
  50.  
  51.  
  52.  
  53. MANUAL UPDATE:  A fake (real) scroll gadget mouse command was created which
  54. uses the middle mouse button.  It draws and uses a scroll gadget in the msg
  55. line.
  56.  
  57.  
  58.  
  59. MANUAL UPDATE:  SC-f1 Restore Current File cmd was improved.  After reloading
  60. curFile from disk, it restores the page, cursor, hilite, and invert locations.
  61.  
  62.  
  63.  
  64. MANUAL UPDATE:  MOUSE-BUTTON COMMANDS:
  65.  
  66.     These have been modified as follows:
  67.         1)  scroll-hiliting, if you double-click the mouse button & move mouse.
  68.             (This cmd was originally written by Ken Perano.)
  69.         2)  auto-padding of lines with spaces if you click the mouse button
  70.             beyond end-of-line when the COLUMNAR FLAG is ON.
  71.  
  72.     normal-buttonDown:  This still deposits the cursor at the mouse as
  73.         always, and it scrolls the display up/down if you move the mouse
  74.         while holding down the button.  But if instead you double-click the
  75.         mouse-button while holding the mouse stationary and THEN move the
  76.         mouse while holding down the button, it marks a hilite region.  It
  77.         scrolls the display up/down, if you move the mouse to the bottom or
  78.         top of the window.
  79.  
  80.     shftAltCtl-buttonDown:  This command deposits the cursor at the mouse
  81.         arrow, but if you clicked beyond end-of-line it extends the line by
  82.         padding with spaces up to the mouse arrow.  This is useful when you
  83.         want to type text some distance to the right beyond the current end
  84.         of line.
  85.  
  86.     The following commands still set start/end of hilite or invert region as
  87.     before.  But in addition if the COLUMNAR flag is ON, they now pad with
  88.     spaces beyond end of line:
  89.  
  90.     shft-buttonDown:  Set start of hilite region at the mouse.  If COLUMNAR
  91.         flag is ON, pad beyond end of line with spaces, if mouse was clicked
  92.         to right of end of line.
  93.  
  94.     alt-buttonDown:  Set end of hilite region at the mouse.  If COLUMNAR flag
  95.         is ON, pad beyond end of line with spaces, if mouse was clicked to
  96.         right of end of line.
  97.  
  98.     shftCtl-buttonDown:  Set start of invert region at the mouse.  If
  99.         COLUMNAR flag is ON, pad beyond end of line with spaces, if mouse was
  100.         clicked to right of end of line.
  101.  
  102.     altCtl-buttonDown:  Set end of invert region at the mouse.  If COLUMNAR
  103.         flag is ON, pad beyond end of line with spaces, if mouse was clicked
  104.         to right of end of line.
  105.  
  106.  
  107.  
  108. MANUAL UPDATE:  New R-8 Save Key and R-9 Restore Key commands were created
  109. and added to the Keys menu.  When you want to create a command on a key (such
  110. as ESC) which already has a command on it, you can save the key temporarily
  111. and restore it when you are through using the temporary command.
  112.  
  113.  
  114.  
  115. MANUAL UPDATE:  A new R-0 Date-Time-Stamp command inserts a date-time stamp
  116. at the cursor.
  117.  
  118.  
  119. MANUAL UPDATE:  A new ctl-gadget2 List Files cmd (submitted by Bob Jenkins)
  120. lists all files in Uedit and lets you click the file you want to see.
  121.  
  122.  
  123. MANUAL UPDATE:  Two stack oriented commands were created, which allow you to
  124. keep and use up to 10 Search strings, Replace strings, Undo buffers, copied
  125. Columnar regions, or copied Hilite and Invert regions.  R-2 shows you how
  126. many buffers are on the stacks, how many bytes of memory are used, and lets
  127. you turn on/off stacking for each kind of buffer.  R-3 let you see the
  128. contents of buffers on the stacks, make them the current buffer (such as the
  129. current search or replace string), delete individual buffers, or delete the
  130. whole stack.
  131.  
  132.  
  133. MANUAL UPDATE:  A new alt-ESC Tune RGB command was written which uses the
  134. arrow keys to tune the colors.  The new alt-esc cmd is friendlier than the
  135. old one was.  You can restore the original colors before quitting, if you
  136. wish.  Also new L-esc, R-esc, and virtual-esc cmds were created, and an RGB
  137. Colors submenu was created.  The new cmds let you select from 3 sets of RGB
  138. colors.  Note that these keys can only be activated from the menu.
  139.  
  140.  
  141. MANUAL UPDATE:  The alt-help command to toggle curFile's colors has been
  142. rewritten.  A new version allows you to set the color usage in a more
  143. friendly and thorough manner.
  144.  
  145.  
  146. MANUAL UPDATE:  A new Screen Size lAmiga-f2 was added to the Display menu.
  147. It asks for the new width & height dimensions and reopens the screen using
  148. the new dimensions.  NOTE:  The CL sWidth and sHeight variables don't change
  149. when you go to/from interlace; in interlace, the actual screen height is
  150. 2*sHeight.
  151.  
  152.  
  153.  
  154.  
  155. MANUAL UPDATE:  A new shft-f5 Local Modes command (in the menu) displays the
  156. description of the title bar local flags.
  157.  
  158. MANUAL UPDATE:  The LOCAL & GLOBAL flags were taken out of Show Vals.  All
  159. local and global flags commands and were eliminated and removed from the
  160. menus.
  161.  
  162. MANUAL UPDATE:  A new friendly ctl-g Global Modes command was created and put
  163. into the menu.  It lets you set all of the global flag variables as well as
  164. the local ones which are inherited by new buffers.  Local flags already
  165. attached to buffers are not affected.  (Local buffer flags can be changed by
  166. clicking the appropriate letter in the title bar.  The new shft-f5 command
  167. presents help, if you need it.)
  168.  
  169.  
  170.  
  171. MANUAL UPDATE:  A new lAmiga-q command and Files menu entry switches to the
  172. next file marked "Favorite".
  173.  
  174.  
  175.  
  176. MANUAL UPDATE:  A new shftAltCtl-z command loads files based on a filename-
  177. wildcard (*?) mask.  SAC-z is called in the startup cmd when Uedit first
  178. starts.
  179.  
  180. So if you run in CLI by typing "Run UE util*.?", the SAC-z command causes all
  181. files matching the mask "util*.?" to be auto-loaded.  During an edit session,
  182. you can press SAC-z to auto-load files using a wildcard mask also.
  183.  
  184.  
  185.  
  186.  
  187. MANUAL UPDATE:  Section 1.30.3 in the manual which discusses leftMargin and
  188. autoIndent needs correction.  A table needs to be provided to cover the
  189. cases.  Note that when autoIndent is off and leftMargin>0, normal typing does
  190. not use leftMargin.  But if you reformat the paragraph, it is indented to the
  191. column specified by leftMargin.  So leftMargin is used in paragraph
  192. reformatting if it is >0 even though during normal typing it is not used when
  193. autoIndent is off.  Note also that the Left Margin (L-m).
  194.  
  195.  
  196.  
  197.  
  198. MANUAL UPDATE:  Hyper text was modified to allow partial words to be looked
  199. up.  This is not documented in the manual.  When the word buffer argument has
  200. something in it and the flag = 0 or 1, first the word buffer content is
  201. treated as a whole word/phrase in the lookup; if not found, it is treated as
  202. a partial word/phrase.  Thus you can type or click the first few letters of a
  203. hyper word or phrase and the lookup should find the whole word/phrase if it
  204. exists in the table.
  205.  
  206. MANUAL UPDATE:  The hyper text commands and their keys and menu entry were
  207. changed considerably:
  208.  
  209.     1.  The Open HT (R-gadget3) and Close HT (R-gadget4) commands were
  210.     dropped.  The manual's discussion of these is now obsolete.  The Hyper
  211.     Text submenu was dropped.  Only the entry for Hyper Text (R-gadget1) is
  212.     now in the menu.
  213.  
  214.     2.  Hyper Text is now opened by R-clicking a word or by R-clicking
  215.     gadget1 (which solicits a word input).
  216.  
  217.     3.  Config!H's hyper text commands were modified extensively to make
  218.     hyper text friendlier and nicer.  Virtual keys are no longer used.
  219.     ("Unused" macronum slots are used instead.)
  220.  
  221.     4.  The hyper text commands now expect you to have the following
  222.     directory structure:
  223.         S:Hyper/Files/HyperSample
  224.         S:Hyper/Tables/HyperSample.tbl
  225.  
  226.     You can easily edit the DEFINE() near the top of Config!H to use U:
  227.     instead of S:.  Also you can have any number of hyper text files and
  228.     tables in the S:Hyper subdirectory.
  229.  
  230.  
  231.  
  232.  
  233. MANUAL UPDATE:  Added:  -s CLI command line flag.  Examples:
  234.     run UE -s         .. runs UE & loads in the default state file "uestate".
  235.     run UE -sMyState .. runs UE & loads in state file MyState.
  236.  
  237. NOTE:  When a state is loaded, it uses the buffers that were in use when the
  238. state was saved.  WARNING:  Files in Uedit may be erased so that the state
  239. can use their buffers; you should save any changes before loading in a state.
  240. Note also that if you type "Run UE -s file1 file2", file1 and file2 may be
  241. erased from Uedit's memory so their buffers can be used by the state being
  242. loaded in.
  243.  
  244. The -s flag is processed BEFORE the -k & -l CLI command line flags and AFTER
  245. the named files (if any) are loaded in.  You can specify a key or learned
  246. sequence (-k or -l) to act on the loaded state's files.  -s is processed
  247. after the -c and -d flags, of course.  To summarize, the sequence is this:
  248.     process -c and -d, if used
  249.     load files, if any
  250.     process -s, if used
  251.     process -l and -k, if used
  252.  
  253.  
  254. ELIMINATE ALL GLOBAL/LOCAL FLAG COMMANDS - use the flag-table versions
  255. (c-g & s-f5)
  256.  
  257.  
  258. --------------------------------------------------------------------------
  259. --------------------------------------------------------------------------
  260. --------------------------------------------------------------------------
  261. --------------------------------------------------------------------------
  262. --------------------------------------------------------------------------
  263. --------------------------------------------------------------------------
  264. --------------------------------------------------------------------------
  265. --------------------------------------------------------------------------
  266. --------------------------------------------------------------------------
  267. --------------------------------------------------------------------------
  268. --------------------------------------------------------------------------
  269.  
  270.  
  271.  
  272. Introduction
  273.  
  274. Uedit is a programmable text editor for technical people.  Development of
  275. Uedit began in November, 1985.  It first came out in March, 1986.  The aim
  276. has been to develop an editor such that one would:
  277.    û Be able to work without bumping into limits of power, freedom, and capacity;
  278.    û Be able to automate repetitive work, eliminate tedium, save time;
  279.    û Be spared the irritation of unnecessary keystrokes and stodgy performance;
  280.    û Be able to customize the environment fully;
  281.    û Be able to create, on the spot, new capabilities that are needed.
  282.  
  283. Since Uedit came out, user feedback has been, by far, the principal and best
  284. source of inspiration and ideas for improving the program.
  285.  
  286. Uedit has no editing commands built into it.  It loads in a data file at
  287. startup which has the configuration it will use.  Novices need not be
  288. concerned about this, as Uedit loads the standard data file, Data!,
  289. automatically unless told to do otherwise.
  290.  
  291. The standard configuration has a lot of commands and features.  As a new
  292. user, you may:
  293.     o Use the standard configuration, as is.
  294.     o Tweak the standard configuration, swapping keys, changing the default colors,
  295.        line length, etc.
  296.     o Use an emulation of some popular editor or wordprocessor.  Emulations are
  297.        available in the public domain or as extras.
  298.     o Create a custom configuration or emulate a favorite environment.
  299.  
  300. 75% of users use the standard configuration or customize it slightly.  25%
  301. overhaul the standard configuration in a major way or create a personal
  302. configuration or emulation of a favorite editor or wordprocessor.
  303.  
  304. Uedit has registered users in the USA and in more than a dozen foreign
  305. countries.  A survey revealed that virtually all are technical or scientific.
  306. Most write programs at least part-time.  Nearly half earn their living by
  307. programming.  More than a third have a doctorate in physics, computer
  308. science, math, engineering, medicine, or other discipline.
  309.  
  310. Getting Started
  311.  
  312. To start Uedit from the Workbench, double-click its icon.
  313.  
  314. To start it in CLI, type "Run UE myfile1 myfile2 myfile3...."  To run with a
  315. custom data file, use "Run UE -dMyData".  Once inside Uedit, use the menus,
  316. Help key, and Teach Keys as needed.
  317.  
  318. FILES UEDIT MAY NEED:
  319.             File Name           Need it?
  320.             ---------           --------
  321.             Data!               YES, at startup, unless you use the -d or -c flag.
  322.             Help!               only if you press the HELP key.
  323.             Key-Help            only if you use Teach Keys.
  324.             NoName.info         only if "Make icons" is active.
  325.             Config!(H,M,P,R,S)  if Data! is not found or you use the -c flag.
  326.  
  327. Uedit looks for these first in your current directory, and, if necessary, in
  328. the S:  directory.  If you copy them to S:, you can run Uedit from any
  329. directory.
  330.  
  331. Sometime when you can spare a few minutes, in CLI type "Run UE -c".  Make
  332. sure that the Config!(A-Z) files are in S: or in your current directory.
  333. This should be instructive and may encourage you to look into the
  334. possibilities of the command language.
  335.  
  336. Specifications
  337.  
  338. Uedit Program Specifications:
  339.     number of files     max can be set from 1 to 100; can exceed using stack
  340.     buffers             buf0-buf99; actual # limited only by stack memory
  341.     file/buffer size    8 megabytes or memory limit
  342.     tracked locations   20 per buffer
  343.     colored regions     2 per buffer; hilite and invert (regular or columnar)
  344.     other regions       7 per buffer
  345.     number variables    n0-n99; actual # limited only by stack memory
  346.     named number vars   about 50 named number variables, such as lineLength etc
  347.     file names          up to 76 chars in length
  348.     queued file-saves   limited by stack memory, 8 bytes per entry
  349.     queued prints       12; prints in busy mode, if full or low on memory
  350.     learned sequences   200 steps
  351.     command size        8 megabytes uncompiled, 20k bytes compiled
  352.     run-depth           10 levels of commands running commands
  353.     # of commands       1148 online, unlimited using various techniques
  354.     gadget names        up to 19 chars in length
  355.     search strings      delimited search1, search2, & "all-but" strings
  356.     search str size     64 chars in each string, 127 total
  357.     replace str size    8 megabytes or limit of memory
  358.     grep string         /search/replace/ string up to 127 chars
  359.     menu descriptions   up to 17 chars in length
  360.     menus               7
  361.     menu items          20
  362.     menu subitems       12
  363.     total menu items    1680
  364.     submenu offset      0 to 100%, relative to parent menu
  365.     screens             4; regular or interlace, 1 or 2 bitplanes
  366.     scroll types        2; update colors or suppress color updating
  367.     fonts               any non-proportional; speeds up size 8 & 11 fonts
  368.     RGB colors          RGB tuning (0-15) of 4 color registers (0-3)
  369.     4-color combos      16 local & global color settings, each set separately
  370.     window height       128 lines
  371.     window width        128 chars
  372.     split windows       8
  373.     split window size   2 lines min; max is window height minus 2 lines
  374.     tab rulers          5
  375.     tabs per ruler      32
  376.     max tab column      255
  377.     left margin         0 to 255
  378.     top/bottom margins  0 to 255
  379.     lines/page          1 to 255
  380.     line length         1 to 9999
  381.  
  382. A number of the above specifications may be exceeded using the CL.  For
  383. instance, lineLength, pageLines, and certain other variables may be set
  384. outside the specs using the CL.
  385.  
  386. Items which are limited by stack memory need 8 bytes per entry in the stack,
  387. so the practical limit is quite large.  Some unlisted specs cannot be
  388. assigned a fixed limit, such as the maximum size of a block of nested
  389. commands, or the maximum number of files that may be auto-edited using a
  390. learned sequence; these need not be limited by available memory.  The actual
  391. max buffer size is really very close to 16 megabytes in Uedit, but only 8
  392. megabytes is claimed.  Most of the features described elsewhere in this
  393. manual, such as typing and printing modes, columnar text operations, and
  394. things you can do using the command language, are not reflected in the above
  395. table of specs.
  396.  
  397. Organization of this Manual
  398.  
  399. Every Uedit command is customizable.  Whenever a key command is mentioned in
  400. this manual, it is referring to the standard configuration.  If you customize
  401. the standard config or use a different config, the standard key-bindings
  402. cease to apply.  This manual is divided into 3 parts:
  403.  
  404. Part 1 is Using the Standard Configuration.
  405.  
  406. Part 2 is Getting More out of Uedit.  It describes how to get more out of the
  407. program by using Learn Mode, editing tricks, and the command language.
  408.  
  409. Part 3 is the Command Language Documentation.
  410.  
  411. Abbreviations and Terminology
  412.  
  413. "Configuration" and "data" are used often in this manual.  A configuration
  414. file defines all of Uedit's commands and features; it is a readable, editable
  415. command language source file that is compiled by Uedit to create a compact
  416. binary data file.  The data file is what Uedit loads and uses in processing
  417. your editing inputs.
  418.  
  419. "Configuration" may be called "config".  "Data file" may be called "data".
  420. While stored in memory, it is "data".  When written to disk, it becomes a
  421. "data file".
  422.  
  423. "Key" may be used in place of "key command" or "key argument".  "Key" is any
  424. input that may run a command, or sometimes "key" means the command itself, as
  425. in "when the new key is run...."  Even mouse button inputs are keys.  The
  426. CloseBox and message-line gadget inputs are keys.  Menu inputs are not keys,
  427. because menus run existing keys.
  428.  
  429. A "command" is what runs when you input a key.  Commands may be run by other
  430. commands, so commands may be called "routines" or "modules".
  431.  
  432. The following abbreviations or acronyms may be used in this manual:
  433.     Words                   Abbreviations            Examples
  434.     -----                   -------------            --------
  435.     primitive mode          PM
  436.     Workbench               WB
  437.     command language        CL
  438.     virtual                 virtual or V             virtual-Esc or V-Esc
  439.     Shift                   shft or S                shft-F1 or S-F1
  440.     Alt                     alt or A
  441.     Ctrl                    ctl or C
  442.     Shift-Alt               shftAlt or SA
  443.     Shift-Ctrl              shftCtl or SC
  444.     Alt-Ctrl                altCtl or AC
  445.     Shift-Alt-Ctrl          shftAltCtl or SAC        shftAltCtl-z or SAC-z
  446.     Left Amiga              lAmiga or L              lAmiga-b or L-b
  447.     Right Amiga             rAmiga or R
  448.     numeric keypad          kp                       ctl-kp7 or C-kp7
  449.     end of line             eol
  450.     end of file             eof
  451.     linefeed                LF
  452.     formfeed                FF
  453.     carriage return         CR
  454.  
  455. Shift-modifiers are abbreviated in two ways:  In the text and in menus SAC-z
  456. would be used rather than shftAltCtl-z, for the sake of brevity.  But in the
  457. command language shift-modifiers must be spelled as follows:  normal shft alt
  458. ctl shftAlt shftCtl shftAltCtl lAmiga rAmiga or virtual.  (Upper and lower
  459. case are valid throughout the CL.)
  460.  
  461. "File" and "buffer" are used interchangeably, because files are loaded into
  462. buffers and any buffer may be saved as a file.  Instead of saying "the
  463. current file in the window" or "the current buffer", "curFile" is used.
  464. curFile is a CL variable which means the buffer or file in the window.  If
  465. split windows are in use, curFile is in the active window-split.
  466.  
  467. Where possible the CL names for things are used without explanation or
  468. apology.  CL names are self-descriptive.  For instance, "overStrike",
  469. "wordWrap", "rightJustify", and "lineLength" are CL variables.
  470.  
  471. "Page" is either a window page or a printed page.  In the CL, "page" is
  472. window page, and "form" is printed page.  But in discussing printing and
  473. paging documents, "page" means printed page.  The context makes it clear
  474. which kind of page is being discussed.
  475.  
  476.  
  477. Part 1.  Using the Standard Configuration
  478.  
  479. 1.1  Uedit's Menus
  480.  
  481. The following are Uedit's menus as defined in the standard configuration,
  482. Config!.  The names in parentheses are command language (CL) flag variables
  483. that are turned on or off by the menu selections:
  484.  
  485. FILES (MENU #1)                             Grep (submenu)
  486. Next file                  f1                       Grep fwd         L-f9
  487. Prev file                S-f1                       Grep bkwd        R-f9
  488. Open (submenu)                                      Set grep         L-f7
  489.         Open             A-f1                       Grep repl->     L-f10
  490.         File request     L-f1                       Grep repl<-     R-f10
  491.         New file         C-f1               Bookmarks (submenu)
  492.         Insert file     SA-f1                       Goto mark      S-gad1
  493.         Restore         SC-f1                       Goto next      S-gad2
  494.         Rename            A-n       Set mark S-gad3  Init marks S-gad4
  495. Save (submenu)                              BUFFERS (MENU #3)
  496.         Save               f2               Buffers (submenu)
  497.         Save changes     A-f2                        Swap buf #0      A-w
  498.         Save as...       S-f2                        Swap buf #43     C-w
  499.         Save hilite     SC-f2                        See buffers    SC-f6
  500.         Abort save      SA-f2                        Edit buffer    SA-f6
  501. Close (submenu)                                      Free buffers    A-f3
  502.         Close              f3                        Push buffer      L-w
  503.         Auto-close       S-f3                        Pop buffer       R-w
  504. Quit (submenu)                                       Roll stack      SA-w
  505.         Quit               f4               Data file (submenu)
  506.         Auto-quit        S-f4                       Save data        A-f6
  507.         ABORT Uedit!     A-f4                       Load data        C-f6
  508. AmigaDOS (submenu)                          Compile (submenu)
  509.         AmigaDOS          C-y                       Compile            f6
  510.         DOS + result      C-z                       Cfg defalts     AC-f6
  511.         Directory         A-z                       Make command     S-f6
  512.         CD (Chg dir)     AC-z               Keys (submenu)
  513. About...                SAC-a                       Swap keys          f5
  514. SEARCH (MENU #2)                                    Swap mouseUp      A-m
  515. Search (submenu)                                    Kill key       SAC-f6
  516.         Search fwd         f9                       Find key         L-f6
  517.         Search bkwd      S-f9               Learn (submenu)
  518.         Set search         f7                       Start learn       C-s (learnMode)
  519. Replace (submenu)                                   End/Run learn     C-r
  520.         Replace fwd       f10                       Save learn        C-5
  521.         Rpl all fwd     A-f10                       Load learn        C-6
  522.         Rpl bkwd        S-f10                       Load & run        C-7
  523.         Set replace       f8                Name gadget             C-esc
  524. Settings (submenu)                          Speak hilite              A-s
  525.         Case sensitiv     C-8 (searchCaps)
  526.         Wildcards        A-f7
  527.         Either-or        C-f7
  528.  
  529. EDITS (MENU #4)                        Rexx (submenu)
  530. Col display              SC- (columnar)       Ed out buf35     AC-1
  531. Cut&Paste Hilite (submenu)                     Ed in buf36      AC-2
  532.         Copy              kp.                  Buf35->Rexx      AC-3
  533.         Cut               kp-                  Buf36<-Rexx      AC-4
  534.         Paste         kpEnter                  hilite->Rexx     AC-5
  535.         Clear             C-h                  Cursor<-Rexx     AC-6
  536. Cut&Paste Invert (submenu)                     Reply OKAY->     AC-7
  537.         I-Copy          C-kp.                  Reply text->     AC-8
  538.         I-Cut           C-kp-                  Auto-traffic     AC-9 (userGlobalB)
  539.         I-Paste     C-kpEnter                  Make x.rexx      AC-0
  540.         I-Clear           C-i          MODES (MENU #5)
  541. Columnar (submenu)                     Hyper Text (submenu)
  542.         Col Cut          SC-1                  Hyper text     R-gad1
  543.         Col Erase        SC-2                  Open HT        R-gad3
  544.         Col Copy         SC-3                  Close HT       R-gad4
  545.         Col Insert       SC-4          Teach Keys (submenu)
  546.         Col Overlay      SC-5                  Teach keys     C-help (teachKeys)
  547.         Ins Hil->Csr     SC-6                  Teach one      C-t
  548.         Ovl Hil->Csr     SC-7          Local modes            S-f5
  549. Text reformats (submenu)               Global modes           C-g     
  550.         Paragraph         C-3
  551.         Del white-spc     C-4
  552.         Tabs->spaces      L-t
  553.         Spaces->tabs      R-t
  554. Printing (submenu)           
  555.         Print select      A-p
  556.         Print hilite      C-p
  557.         Print file       AC-p
  558.         Restart print     L-s
  559.         Abort print       L-a
  560.         Stop all prts     R-a
  561.         Code help       SAC-p
  562.         Bracket hilite    L-p
  563.         Find code         R-g
  564.         Embed code        L-g
  565.         Type formfeed     L-f
  566. Paging (submenu)
  567.         Go to page #      A-3
  568.         Top of page       L-h
  569.         Bottom page       L-b
  570.         Divide page       L-v
  571.         Auto page div     L-r
  572.         Del page div      L-d
  573.         Del page #        L-y
  574. Spelling (submenu)
  575.         Load speller      R-u
  576.         Check fwd         R-c
  577.         Chk&mark fwd      R-m
  578.         Chk & collect     R-l
  579.         Merge w/ dict     R-d
  580.         Del from dict     R-e
  581.         Free Speller      R-f
  582.  
  583. NUMBERS (MENU #6)                   DISPLAY (MENU #7)
  584. Show vals              S-help          Colors                 A-help
  585. Tab ruler (submenu)                    Tune RGB                A-esc
  586.         See ruler      SA-tab          Hide display              R-h (hideDisplay)
  587.         Set ruler      SC-tab          Scroll type               R-s (scrollType)
  588.         Tab table     SAC-tab          Split windows (submenu)
  589. Line-Page (submenu)                            Next split        L-9
  590.         Line length     C-rtn                  Drop split        L-0
  591.         Lines/page        A-g                  Split lines       L-8
  592.         Left margin       L-k                  Mouse size        L-=
  593.         Top margin        L-u                  Curr buf          L-c
  594.         Bottom margin     L-l                  Undo buf          L-1
  595.         End of line       C-e                  Search buf        L-2
  596. Command mult              C-m                  Replac buf        L-3
  597. Max files               AC-f1                  Hilite buf        L-4
  598. Idle timer              SAC-i                  Invert buf        L-5
  599. PM terminator             ESC                  Columnar          L-6
  600. File size                 C-1                  Directories       L-7
  601.                                                Lace/planes (submenu)
  602.                                                        Toggle          S-esc
  603.                                                        Reg 1 plane      R-f1
  604.                                                        Reg 2 planes     R-f2
  605.                                                        Lace 1 plane     R-f3
  606.                                                        Lace 1 planes    R-f4
  607.                                                Refresh               SC-help
  608.                                                Do menus             SAC-help
  609.                                                Unhilite                  A-h
  610.                                                Uninvert                  A-i
  611.  
  612.  
  613. 1.2 Things You Should Know
  614.  
  615. Here are some basic facts about the operation of Uedit that you should know:
  616.  
  617. No commands are hardwired in Uedit.  Every command is user-customizable.
  618. Whatever happens when you give an input, such as when you click the mouse
  619. button, is governed by a command that was originally written in the CL, can
  620. be found in the Config! file or one of its (A-Z) extensions, and was compiled
  621. by Uedit.  This means that you can change what you do not like about Uedit in
  622. most cases or can create most anything new that you need.  Changes in how
  623. Uedit operates can be made on the fly, without closing the files you are
  624. editing.  Any customizing that you can do by compiling an entire config file
  625. can also be done during an edit session.
  626.  
  627. Amiga-ESC (left or right Amiga key) is the general purpose abort key.  It is
  628. the only hardwired or dedicated key in Uedit, except for special cases such
  629. as responding to requesters and tab rulers.  Use Amiga-ESC to abort any
  630. operation except spooled prints and file-saves.  Spooled prints and file-
  631. saves must be aborted by their separate commands, which are Abort Print (L-a)
  632. and Abort Save (SA-f2).
  633.  
  634. Use Amiga-ESC to abort Teach Mode when you are finished using it.  Certain
  635. Amiga-key combinations are not reported correctly to Uedit by the Amiga and
  636. may be internally wired to the abort function.  If Teach Keys aborts
  637. spontaneously because you input such an Amiga-key combination, restart it
  638. using Teach Keys (C-Help) again.  (See Teach Keys, 1.11.2.)
  639.  
  640. Clicking the window's title bar switches Uedit to its tiny window.  Clicking
  641. in the tiny window returns Uedit to its big screen.  (See Tiny Window, 1.4.).
  642. To slide Uedit's screen up or down, put the mouse in the title bar at the
  643. very top and slide the screen as you would any other screen on the Amiga.
  644. (See Lace/Planes (S-esc), 1.39.1.)
  645.  
  646. Primitive Mode is used for collecting string and number inputs during
  647. editing.  For example, if you select Set Search (f7) to input a search
  648. string, you are put into Primitive Mode.  PM is unlike normal editing mode in
  649. that no editing commands may be used.  PM allows typing and deleting; the
  650. arrow keys move the cursor, and shift keys increase the power of the cursor
  651. movement.  (See Primitive Mode, 1.7.)
  652.  
  653. Primitive Mode is terminated using either a mouse click or the current PM
  654. terminator character (pmEsc).  In the Config! defaults, pmEsc is set to the
  655. ESC key (ASCII 27).  This manual may remind you to press ESC or it may just
  656. assume that you know what to do.  If it reminds you to press ESC to terminate
  657. PM, what it really means is that you should either click the left mouse
  658. button or input the current pmEsc character, which you may have changed from
  659. ESC to something else, such as the Return key.  (See Primitive Mode, 1.7.)
  660.  
  661. Uedit offers 4 choices for the screen it uses, which are regular or
  662. interlace, each using 1 or 2 bitplanes.  1-bitplane screens use only 2
  663. colors; 2-bitplane screens use 4 colors.  Scrolling is faster and less memory
  664. is used with 1 bitplane.  You get more lines per window using interlace.  The
  665. least memory is used in regular (non-interlace) with 1 bitplane, which also
  666. gives the fastest scrolling.  Interlace with 1 bitplane uses about the same
  667. memory as non-interlace with 2 bitplanes.  (See Lace/Planes, 1.39.1.)
  668.  
  669. When you change anything such as Colors or lineLength or if you compile a new
  670. command, selecting Save Data overwrites the data file so that the change is
  671. saved to disk for future use.  Throughout this documentation, rather than
  672. telling you repeatedly that you may select Save Data (A-f6) to save changes
  673. to Uedit's data, you are expected to know that you may do this.  (See Save
  674. Data, 1.36.1.)
  675.  
  676. When you have made changes that you wish to recover from, such as swapping or
  677. killing keys or changing colors, you may recover the original data by using
  678. Load Data (C-f6).  (See Load Data, 1.36.2.)
  679.  
  680. To make Uedit use a particular data file at startup, type the following in
  681. CLI:  "Run UE -dMyData ...", where MyData is the data file that Uedit is to
  682. use.  When no data file is specified, Uedit loads in the standard data file,
  683. Data!, automatically.  Uedit never needs a config file, unless you tell it to
  684. compile a config at startup using the -c flag; or unless it cannot find the
  685. data file either in the current directory or in S:.  If Uedit cannot find the
  686. data file it is supposed to be using, it looks for the standard config
  687. (Config! and its (A-Z) segments) to load in and compile.  (See CLI Command
  688. Line, 2.1.)
  689.  
  690. Terminating and aborting:
  691.  
  692. To abort any operation except spooled prints and spooled file-saves, use Amiga-ESC.
  693.  
  694. To abort a spooled print, use Abort Print (L-a).
  695.  
  696. To abort a "busy" print (realtime, in foreground, not spooled), use Amiga-ESC.
  697.  
  698. To abort a spooled file-save, use Abort Save (SA-f2).
  699.  
  700. To terminate Teach Mode, press Amiga-ESC.
  701.  
  702. To terminate Set Ruler (setting tab ruler), type any non-applicable key or
  703. click the mouse 2 lines away from the tab ruler.  To abort Set Ruler, use
  704. Amiga-ESC.  (See Set Ruler (SC-tab), 1.26.4.)
  705.  
  706. To interrupt a startup-compile (when Uedit is compiling an entire config file
  707. at startup), use Amiga-ESC.  To quit Uedit after interrupting the startup-
  708. compile, use Amiga-ESC again.  To resume startup-compiling, put the cursor
  709. where you wish the compiling to resume and press ESC.
  710.  
  711. 1.3 Window Title Bar
  712.  
  713. The name of the current file (buffer) is displayed at the right in the
  714. window's title bar.  If no name exists, "Buffer-#" is used, where # is the
  715. buffer's number, 0 to 99.
  716.  
  717. The square brackets [buf#,flags] to the left of curFile's name contain the
  718. current buffer number and status flags.  The status flags are as follows:
  719.  
  720.     If Learn Mode is active, "L#" appears, where # is the number of inputs
  721.     you have "recorded" using Learn Mode.
  722.  
  723.     If Teach Mode is active, a "T" appears.  In Teach Mode, instead of acting
  724.     as function keys, keys describe themselves when you input them.
  725.  
  726.     If prints have been queued up, "P#" appears, where # is the number of
  727.     unfinished print jobs in the queue.
  728.  
  729.     If file-saves are queued up, "S#" appears, where # is the number of
  730.     unfinished file-saves in the queue.
  731.  
  732. To the left of the brackets [buf#,flags] is a row of buffer status flags =
  733. "tiokrwjmcabf".  These indicate all of curFile's flag settings.  If the
  734. letter is capitalized, the flag is ON.  The flags can be toggled ON/OFF by
  735. clicking the appropriate letters in the title bar.  The flags are as follows:
  736.     t/T = trueTabs
  737.     i/I = autoIndent
  738.     o/O = Overstrike
  739.     k/K = autobacKup
  740.     r/R = Readonly
  741.     w/W = wordWrap
  742.     j/J = rightJustify
  743.     m/M = Mapchars (map illegal characters)
  744.     c/C = Changed
  745.     a/A = userglobalA (used for Save On Idle)
  746.     b/B = userglobalB
  747.     f/F = Favorite
  748.  
  749. The window title bar also has the following additional uses:  When in
  750. Primitive Mode, the title bar notifies you that you are in Primitive Mode.
  751. And an "X" flag appears before the square brackets "X[buf#]", and clicking
  752. the "X" toggles the Primitive Mode terminator character between ESC and
  753. Return.  (See Primitive Mode, 1.7.)
  754.  
  755. When you click the title bar, the big window closes and the tiny window opens
  756. up.  (See Tiny Window, 1.4.)
  757.  
  758. 1.4 Tiny Window
  759.  
  760. Clicking the title bar causes Uedit to switch to its tiny window.  Using a
  761. tiny window is better than using window depth gadgets for a number of
  762. reasons:  Uedit's tiny window comes up inactive, so you can immediately type
  763. into a CLI or shell window.  The title bar is easier to click than small
  764. depth gadgets are.  The tiny window frees up about 30k or more of graphics
  765. memory.  Going to/from tiny window lets the Amiga reopen the big window in a
  766. better memory location, creating more contiguous free space for graphics.
  767. (See Memory, 1.5.)
  768.  
  769. To return Uedit to its big window, click inside the tiny window.  If the tiny
  770. window is the active window, any keys that you type are ignored except ESC.
  771. ESC causes a return to the big window.
  772.  
  773. When you first go to tiny window, if commands are being executed their
  774. execution continues until finished.  Then Uedit finishes any printing or
  775. file-saves that are queued up.  Then it does housekeeping, packing and
  776. reallocating buffers in order to eliminate memory waste and fragmentation.
  777. When finished with its busywork, it sleeps so that other tasks run
  778. efficiently.
  779.  
  780. The tinyPriority command language variable and Config! default determines the
  781. task priority that Uedit uses when in tiny window.  You may wish to lower the
  782. priority in order to increase the computer resource available to other tasks.
  783.  
  784. When you try to return to big window but there is insufficient memory for it,
  785. Uedit sleeps until it can reopen its big window.  Normally memory becomes
  786. available when another task finishes running.  If no memory can be had by
  787. waiting, close or shrink the CLI or Workbench windows and Uedit may find
  788. enough graphics memory to reopen its big window.
  789.  
  790. When the screen is reopened after being in tiny window its vertical
  791. coordinate is the same as before.  That is, you can slide the screen down, go
  792. to tiny window or switch to another screen type and the reopened screen keeps
  793. the original coordinates.  To reset Uedit's screen coordinates to (0,0), go
  794. to tiny window and move it before clicking in it.
  795.  
  796. 1.5 Memory
  797.  
  798. When you pause for 4 seconds, Uedit does memory housekeeping.  If you resume
  799. typing before it has finished, it interrupts its housekeeping and pays
  800. attention.  To monitor which buffer is being packed during housekeeping,
  801. select Busies (C-b).  Uedit also does housekeeping when in tiny window.  When
  802. it has finished with housekeeping, it sleeps.
  803.  
  804. Memory housekeeping consists of packing buffers that have been fragmented.
  805. When contiguous memory falls below about 10k, Uedit reallocates each buffer
  806. block, allowing the Amiga to create as much contiguous memory for graphics as
  807. possible.
  808.  
  809. Uedit monitors the available memory and alerts you if less than 10k of
  810. contiguous memory is remaining; it flashes the screen, displays a "Memory..."
  811. message, and starts housekeeping.  This 10k-warning is helpful when you are
  812. running other tasks, because you can switch to tiny window and free about 30k
  813. or more of memory for the other tasks to use, avoiding a no-memory abort in
  814. tasks such as compiles and links.
  815.  
  816. If the "Memory...." message keeps coming back, close some files or select
  817. Free Buffers (A-f3) to free all non-file buffers.  Uedit sacrifices memory
  818. for speed in text-inserts.  Large numbers of text-inserts, such as massive
  819. search-replaces, may use up nearly all available memory for a while.  The
  820. memory is recovered 4 seconds later by housekeeping or immediately if memory
  821. runs too low.
  822.  
  823. 1.6 Gadgets
  824.  
  825. The message-line, just beneath the title bar of the window, contains four
  826. invisible "gadgets" that are activated by clicking the mouse in them.  These
  827. gadgets are "keys" in Uedit, just like keyboard keys.  When gadgets are
  828. clicked, their customizable command is run.  There can be shift-modified
  829. gadget commands also, but none are defined in the standard config.  Gadget
  830. commands may be swapped, killed, used in learned sequences, and so on, just
  831. like other keys.
  832.  
  833. Mark Gadgets (C-g) turns On/Off the gadget names in the message line.  The
  834. gadget names are defined in the config defaults.  (See the Config! file.)  If
  835. Row/Column (C-2) is turned On, the 4th gadget-name is replaced by the
  836. cursor's page-row-column.
  837.  
  838. 1.7 Primitive Mode
  839.  
  840. Primitive Mode (PM) is used when string and number inputs are needed, such as
  841. inputting a file name or new lineLength value.
  842.  
  843. The title bar indicates when you are in Primitive Mode.  The file name is
  844. replaced by a message saying "Primitive Mode string input (ESC = done):"
  845. or "Primitive Mode number input (ESC = done):".  The message line beneath
  846. the title bar gives instructions; for example, when you use Set Search (f7)
  847. the message says "Input search string:".  If the current PM terminator is
  848. Return, the title bar message will instead say "(Return = done):".  (See PM
  849. Terminator, 1.28.1.)
  850.  
  851. In Primitive Mode, editing commands are disabled and only typing and single
  852. character deletes are permitted; the cursor is moved using the arrow keys.
  853. If overstrike typing mode is On, it is turned Off temporarily.  You can type
  854. Ctrl-characters directly into PM.  Thus you can search on characters like
  855. ctrl-m (carriage return) and ctrl-l (formfeed).  (In normal editing mode you
  856. must use Input Control Character (C-c) to type control characters into the
  857. text.)
  858.  
  859. Primitive Mode may be aborted with Amiga-ESC.  PM is the bare bones of Uedit
  860. without any commands whatsoever, and so in order to do deletes and move the
  861. cursor certain keys are hardwired:  DEL deletes the character under the
  862. cursor.  BACKSPACE deletes character-left.  The arrow keys move the cursor;
  863. using Shift, Alt, or Ctrl increases the power of the arrow key.
  864.  
  865. pmEsc is the character that terminates Primitive Mode.  It is set to the ESC
  866. key (ASCII 27) in the defaults in Config!.  But a PM Terminator command (ESC)
  867. is provided to allow you to change pmEsc.  Clicking the left mouse button
  868. also terminates Primitive Mode, no matter what the pmEsc character is.  (See
  869. More About Primitive Mode, 2.2.)
  870.  
  871. pmEsc can also be changed while inside Primitive Mode.  When in PM, an "X"
  872. flag appears in the title bar just before the square brackets "X[buf#]", and
  873. clicking the "X" toggles the PM terminator between ESC and Return.
  874.  
  875. 1.7.1 PM Terminator (ESC)
  876.  
  877. pmEsc is the Primitive Mode escape (terminator) character, which must be a
  878. control character, such as Return or ESC.  In the config defaults, pmEsc is
  879. set to ESC (ASCII 27).  Many prefer using Return, however.
  880.  
  881. By pressing ESC, you can select a different PM terminator (pmEsc) character,
  882. such as the Return key.  If you press ESC by mistake and it asks for the new
  883. pmEsc character, just press ESC a second time.
  884.  
  885. ESC asks you to input the new pmEsc character.  If you type a control
  886. character (such as ESC or Return or Ctrl-m), it becomes the new pmEsc.
  887.  
  888. pmEsc should be a character that you are unlikely to want to use in text
  889. inputs in response to questions, because questions requiring a text input
  890. most often use Primitive Mode.  This is why ESC, and not Return, is used as
  891. the standard pmEsc character.
  892.  
  893. However, as noted above, pmEsc can also be changed while inside Primitive
  894. Mode, by clicking the "X" in the title bar during Primitive Mode.
  895.  
  896. 1.8 Fonts
  897.  
  898. The font and font size Uedit is to use are specified initially in the Config!
  899. defaults.  If the specified font is invalid, Uedit defaults to Topaz 8.
  900.  
  901. During a work session, you can change the font using Set Font (SA-f).  Use
  902. Save Data (A-f6) to save the modified data to disk, if you wish to preserve
  903. the new font choice.
  904.  
  905. Uedit accepts proportional fonts.  However, Uedit calculates the spacing per
  906. letter as though the font were non-proportional.  So mouse-cursor placement
  907. acts strange and other cosmetic side effects may occur.
  908.  
  909. For the fastest screen updates and scrolling, choose a size 8 or size 11
  910. font, such as Topaz 8, Topaz 11, or Clean 8.
  911.  
  912. 1.8.1  Set Font (SA-f)
  913.  
  914. SA-f asks first for the font name (such as "Topaz") and then it asks for the
  915. font size (such as "8").  Uedit then reopens its screen and rebuilds the
  916. menus, using the new font.  If the font name or size that you specify is
  917. invalid, Uedit defaults to the Topaz 8 font.
  918.  
  919. 1.9 Help (Help)
  920.  
  921. Help loads the Help! file into buffer 42 which becomes curFile.  (curFile is
  922. the currently active buffer in Uedit.)  The Help! file must be in the current
  923. directory or in S:.  The Help is set to readOnly status so that you cannot
  924. damage it by mistake, but you may edit it and save it by turning Off its
  925. readOnly flag using Read-only (SA-f5).
  926.  
  927. When finished looking at the Help, if you press Help again, it erases buffer
  928. 42 from memory.  If you instead toggle to the next file using F1 or gadget1
  929. or any other file-toggling input, Help stays resident in buffer 42 and the
  930. next time you press Help it appears instantly.  (See Hyper Text, 1.47.)
  931.  
  932. 1.10 Show Vals (S-Help)
  933.  
  934. Show Vals shows the values and settings that are global for Uedit and local
  935. to curFile that are not shown in the Local and Global Modes menus.  That is,
  936. to find out whether curFile has its WordWrap flag set, look in the Local
  937. Modes menu.  To find out its file size and the global Print Select value or
  938. current lineLength or pageLines, use Show Vals.
  939.  
  940. Show Vals displays the following Uedit-global and curFile-local information:
  941. Serial number, Buffer, Size, Max files, Split size, Idle timer, Color bits,
  942. End-of-line, PM terminator, Line length, Lines/page, Left margin, Top margin,
  943. Bottom margin, Tab table, Printer select, Search wildcard, Search multiWild,
  944. Search allBut, Search eitherOr, Search single-white, and Search multi-white.
  945. (See the sections discussing these.  See Global Modes (C-g), 1.19.  Also see
  946. the defaults in Config!.)
  947.  
  948. 1.11 Teach
  949.  
  950. Teach Mode teaches the purpose of inputs.  In Teach Mode, inputs do not cause
  951. editing commands to be run but merely display their help messages.  An input
  952. may be a mouse click or gadget click or key or menu selection or the
  953. CloseBox.  The input may use shift-modifier keys, such as Shift or Alt.  When
  954. using Teach Mode, try the various shift keys along with the inputs.
  955.  
  956. When trying shift-modifiers along with inputs, use the left and right Amiga
  957. keys individually, not in combination with other modifiers; however, Shift,
  958. Alt, and Ctrl may be used in any combination together to modify any key or
  959. mouse input.  If the input has a command, its help message appears in the
  960. message line; if it has no command, the message "No help or unused" appears.
  961.  
  962. The Key-Help file must be in your S: directory in order to use Teach Mode,
  963. unless you customize the defaults in Config! and move the key help file
  964. elsewhere.  When you first use Teach Mode, Key-Help is copied to RAM:uejunk,
  965. so that message response is faster.  When you abort Teach Mode with Amiga-
  966. ESC, the junk file is left in RAM:, in case you need to use Teach Mode again
  967. later.  If you do not plan to use it again, delete RAM:uejunk at some point.
  968. (See the first few defaults in Config!, which are for key-help.  Also see
  969. Building Key-Help for Teach Keys, 2.11.)
  970.  
  971. While Teach Mode is active, a "T" is shown in the square brackets in the
  972. title bar.  To terminate Teach Mode, press Amiga-ESC.  Certain Amiga-modified
  973. keys are internally wired to Uedit's abort function just as Amiga-ESC is.
  974. This was done, because the Amiga does not report certain Amiga-modified keys
  975. to Uedit reliably.  If an Amiga-modified input causes an abort out of Teach
  976. Mode, the screen will flash, the "T" will disappear from the title bar, and
  977. you must press C-Help to reenter Teach Mode.  (See Valid Key Arguments, 2.29.)
  978.  
  979. 1.11.1 Teach One (C-t)
  980.  
  981. C-t displays the help message for the (one) next input that you give.  The
  982. first time you use it, there is a delay while the key help is copied to RAM:.
  983. After that, the response is immediate.
  984.  
  985. 1.11.2 Teach Keys (C-Help)
  986.  
  987. C-Help turns on Teach Mode.  It stays active, displaying the help messages of
  988. all inputs that you give, until you abort with Amiga-ESC.  There is a delay
  989. after the first input you give, as the key help is copied to RAM.  After
  990. that, the response is fast.
  991.  
  992. 1.12 Cursor
  993.  
  994. The cursor may be placed with the left mouse button or using the keypad keys,
  995. kp2, kp4, kp6 and kp8.  The unshifted keypad's cursor-movement keys are word-
  996. oriented, rather than character-oriented.  This facilitates rapid cursor
  997. movements for fast typists.
  998.  
  999. A "word" consists of the following characters:  Alphanumeric characters (A-Z,
  1000. a-z, 0-9); characters with ASCII value greater than 127 (European umlaut
  1001. characters etc); and the apostrophe "'".
  1002.  
  1003. In all cursor movements, if the cursor goes offscreen, the text is scrolled
  1004. so that the cursor line is centered in the window.
  1005.  
  1006. 1.12.1 Find Cursor (kp5)
  1007.  
  1008. Kp5, S-kp5, A-kp5, and C-kp5 find cursor and center it in window.  Typing any
  1009. printable key also finds the cursor.
  1010.  
  1011. 1.12.2 Place Cursor (buttonDown)
  1012.  
  1013. Position the mouse in the text and press the left mouse button.  This
  1014. deposits the cursor at the mouse location.  Clicking the mouse button in any
  1015. window split activates that window split, making it curFile.  Holding down
  1016. the button and moving the mouse causes vertical scrolling.
  1017.  
  1018. 1.12.3 Cursor Character Left (S-kp4)
  1019.  
  1020. S-kp4 moves the cursor left 1 character.
  1021.  
  1022. 1.12.4 Cursor Character Right (S-kp6)
  1023.  
  1024. S-kp6 moves the cursor right 1 character.
  1025.  
  1026. 1.12.5 Cursor Word Left (kp4)
  1027.  
  1028. kp4 moves the cursor left to the start of the next word.  (See the above
  1029. definition of "word" characters.)  The cursor is left on the first character
  1030. of the word.
  1031.  
  1032. 1.12.6 Cursor Word Right (kp6)
  1033.  
  1034. kp6 moves the cursor right to the end of the current or next word.  (See the
  1035. above definition of "word" characters.)  The cursor is left on the first
  1036. character after the end of the word.
  1037.  
  1038. 1.12.7 Cursor Upline (kp8)
  1039.  
  1040. kp8 and S-kp8 move the cursor up 1 line.  The cursor stays in its original
  1041. column, unless the line above is too short; it regains its original column if
  1042. moved up or down to a line at least as long as the cursor's original column.'
  1043.  
  1044. Note:  Wordprocessors typically do preserve the cursor column in up/down
  1045. cursor movements, even if it puts the cursor beyond the eol.  This hides
  1046. information and may result in characters being put into the file that you do
  1047. not realize are there.  Also wordprocessors often put their own "spooks" into
  1048. files.  Uedit is an editor, and it does not let the cursor rest anywhere
  1049. except on a real character or at eof; it puts in no hidden characters of its
  1050. own.
  1051.  
  1052. 1.12.8 Cursor Downline (kp2)
  1053.  
  1054. kp2 and S-kp2 move the cursor down 1 line.  See Cursor Upline (kp8) regarding
  1055. the cursor's column.
  1056.  
  1057. 1.12.9 Cursor to Start-of-Line (A-kp4)
  1058.  
  1059. A-kp4 and C-kp4 move the cursor to the start of its line.  If the cursor is
  1060. already at start-of-line, it moves to the start of the previous line.
  1061.  
  1062. 1.12.10 Cursor to End-of-Line (A-kp6)
  1063.  
  1064. A-kp6 and C-kp6 move the cursor to the end of its line.  If the cursor is
  1065. already at end-of-line, it moves to the end of the next line.
  1066.  
  1067. 1.12.11 Cursor to Start-of-Window (A-kp8)
  1068.  
  1069. A-kp8 moves the cursor to the start of the window.  The text is scrolled so
  1070. that the cursor-line is centered in the window.
  1071.  
  1072. 1.12.12 Cursor to End-of-Window (A-kp2)
  1073.  
  1074. A-kp2 moves the cursor to the end of the window.  The text is scrolled so
  1075. that the cursor-line is centered in the window.  The end of the window is by
  1076. definition the first character in the line just below the window.  (Regions
  1077. in Uedit are bounded as follows:  The start of any region is the first
  1078. character contained in the region.  The end of the region is the first
  1079. character after the region.  This approach may at first seem strange, but it
  1080. makes sense once you are used to it.  See Hilite and Invert Regions, 1.29.
  1081. Also see Locations and Regions, 2.12.)
  1082.  
  1083. 1.12.13 Cursor to Start-of-Form (C-kp8)
  1084.  
  1085. C-kp8 moves the cursor to the start of the current form (printed page), as
  1086. determined by line-count and formfeeds in the text.  If already at start-of-
  1087. form, the cursor is moved to the start of the previous form.
  1088.  
  1089. 1.12.14 Cursor to End-of-Form (C-kp2)
  1090.  
  1091. C-kp2 moves the cursor to the end of the current form (printed page), as
  1092. determined by line-count and formfeeds in the text.  If already at end-of-
  1093. form, the cursor is moved to the end of the next form.
  1094.  
  1095. 1.13 Scrolling
  1096.  
  1097. Scrolling does not require moving the cursor.  You can scroll to another
  1098. location in a file, take a look, and return to the original cursor page by
  1099. typing any printable key or using Find Cursor (kp5).
  1100.  
  1101. Scrolling is faster when using a 1 bitplane screen; mouse scrolling is faster
  1102. than arrow key scrolling, because key-repeat speed is limited.  Using the
  1103. arrow keys, you can scroll to another place in the file, create a hilite
  1104. region using the mouse and copy or cut it, and return to the cursor without
  1105. losing its original position.  If scrollType is 0, colors are updated during
  1106. scrolling; if scrollType is nonzero, scrolling is somewhat faster because
  1107. colored regions are not colored during the scroll.  (See Display Modes, 1.39.
  1108. See Hilite and Invert Regions, 1.29.  See Scroll Type (R-s).)
  1109.  
  1110. 1.13.1 Scroll with Mouse (buttonDown)
  1111.  
  1112. Hold down the left mouse button and move the mouse up or down in the text.
  1113. Moving the mouse upward scrolls the text toward the start of the file.
  1114. Moving the mouse downward scrolls the text toward the end of the file.
  1115. Releasing the button stops the scrolling.  Clicking the mouse button without
  1116. moving the mouse deposits the cursor without causing scrolling.
  1117.  
  1118. 1.13.2 Scroll Down (gadget3)
  1119.  
  1120. Holding down the mouse button in gadget3 in the message line causes the text
  1121. to scroll toward the end of the file.  Scrolling continues as long as the
  1122. button is depressed, until end-of-file is reached.  (See Mark Gadgets,
  1123. 1.19.4.)
  1124.  
  1125. 1.13.3 Scroll Up (gadget4)
  1126.  
  1127. Holding down the mouse button in gadget4 in the message line causes the text
  1128. to scroll toward the start of the file.  Scrolling continues as long as the
  1129. button is depressed, until start-of-file is reached.  (See Mark Gadgets,
  1130. 1.19.4.)
  1131.  
  1132. 1.13.4 Scroll Up 1 Line (upArrow)
  1133.  
  1134. upArrow scrolls the text up 1 line toward start-of-file.  If upArrow is held
  1135. down, scrolling continues until upArrow is released or start-of-file is
  1136. reached.
  1137.  
  1138. 1.13.5 Scroll Down 1 Line (downArrow)
  1139.  
  1140. downArrow scrolls the text down 1 line toward end-of-file.  If downArrow is
  1141. held down, scrolling continues until downArrow is released or end-of-file is
  1142. reached.
  1143.  
  1144. 1.13.6 Scroll Up 11 Lines (S-upArrow)
  1145.  
  1146. S-upArrow scrolls the text up 11 lines toward start-of-file.
  1147.  
  1148. 1.13.7 Scroll Down 11 Lines (S-downArrow)
  1149.  
  1150. S-downArrow scrolls the text down 11 lines toward end-of-file.
  1151.  
  1152. 1.13.8 Scroll Page Up (A-upArrow)
  1153.  
  1154. A-upArrow scrolls 1 page toward start-of-file.  A page is the number of lines
  1155. that will fit into the window.
  1156.  
  1157. 1.13.9 Scroll Page Down (A-downArrow)
  1158.  
  1159. A-downArrow scrolls 1 page toward end-of-file.  A page is the number of lines
  1160. that will fit into the window.
  1161.  
  1162. 1.13.10 Scroll to Start-of-File (C-upArrow)
  1163.  
  1164. C-upArrow scrolls to the start of the file.
  1165.  
  1166. 1.13.11 Scroll to End-of-File (C-downArrow)
  1167.  
  1168. C-downArrow scrolls to the end of the file, centering the end-of-file in the
  1169. window.
  1170.  
  1171. 1.13.12 Scroll Right 1 Column (rightArrow)
  1172.  
  1173. rightArrow scrolls the text right 1 column toward start-of-line.
  1174.  
  1175. 1.13.13 Scroll Left 1 Column (leftArrow)
  1176.  
  1177. leftArrow scrolls the text left 1 column toward end-of-line.
  1178.  
  1179. 1.13.14 Scroll Right 10 Columns (S-rightArrow)
  1180.  
  1181. S-rightArrow scrolls the text right 10 columns toward start-of-line.
  1182.  
  1183. 1.13.15 Scroll Left 10 Columns (S-leftArrow)
  1184.  
  1185. S-leftArrow scrolls the text left 10 columns toward end-of-line.
  1186.  
  1187. 1.13.16 Scroll Right 20 Columns (A-rightArrow)
  1188.  
  1189. A-rightArrow scrolls the text right 20 columns toward start-of-line.
  1190.  
  1191. 1.13.17 Scroll Left 20 Columns (A-leftArrow)
  1192.  
  1193. A-leftArrow scrolls the text left 20 columns toward end-of-line.
  1194.  
  1195. 1.13.18 Scroll to Start-of-Line (C-rightArrow)
  1196.  
  1197. C-rightArrow scrolls the text right all the way to start-of-line.
  1198.  
  1199. 1.13.19 Scroll to End-of-Line (C-leftArrow)
  1200.  
  1201. C-leftArrow scrolls the text left all the way to end-of-line as determined by
  1202. the current lineLength value.
  1203.  
  1204. 1.14 AmigaDOS
  1205.  
  1206. You may run AmigaDOS programs by clicking the title bar to go to tiny window
  1207. and running them in CLI or Workbench.  You may also run programs from inside
  1208. Uedit by using the AmigaDOS menu.  When running Uedit in Workbench, be
  1209. selective about which programs you run from inside Uedit.  Some programs
  1210. cannot be run safely in Workbench and will hang up the Amiga.  You may have
  1211. to find out by trial and error which programs are safe to run from inside
  1212. Uedit.  You will need the following programs in your C: directory in order
  1213. for certain commands to work:  Execute Run Dir Cd.
  1214.  
  1215. 1.14.1 Execute AmigaDOS Program (C-y)
  1216.  
  1217. C-y asks for the name of the program you wish Uedit to execute using the
  1218. Amiga's Execute function.  Type in the program name and ESC.  It runs the
  1219. program but does not collect the result, if any, when the program terminates.
  1220.  
  1221. To run the Calculator program, you can use C-y and type "Calculator"; that
  1222. will run the Calculator, but it will tie up Uedit until you exit from the
  1223. Calculator.  Or you can type "Run Calculator".  This is better, because Uedit
  1224. isn't tied up and you can edit and use the Calculator at the same time.
  1225.  
  1226. Also if you run a program from inside Uedit by typing just "ProgramName",
  1227. Uedit will move its screen to the back temporarily so you can type inputs
  1228. into the program.  But if you instead type "Run ProgramName", its window is
  1229. opened on top of Uedit's screen.  For instance, if you run NewCLI by typing
  1230. "Run NewCLI" in Uedit, the new CLI window will be on top of Uedit's screen;
  1231. it will be overwritten by Uedit's screen updates, but you can prevent this by
  1232. opening an unused split window and putting the CLI (or other) window on top
  1233. of it.  Note that Uedit will not let you go to tiny window or close its
  1234. screen if there is a window on top of its screen.
  1235.  
  1236. 1.14.2 Execute AmigaDOS Program and Get Results (C-z)
  1237.  
  1238. C-z functions exactly the same as C-y, except C-z collects the results, if
  1239. any, when the program terminates.  The results are displayed in buffer 40,
  1240. which becomes curFile, after the program terminates.
  1241.  
  1242. 1.14.3 Get Directory Listing (A-z)
  1243.  
  1244. A-z uses the Dir program to get a directory listing.  It asks for a directory
  1245. name followed by ESC.  If you give it no name, it gets a listing of Uedit's
  1246. current directory.  The directory listing is loaded into a file buffer which
  1247. becomes curFile.  A-z accomplishes the same thing as the F2 option in the
  1248. S:Directories split window.  (See Click-Load File (C-buttonDown), 1.15.4.)
  1249.  
  1250. 1.14.4 Change Uedit's Directory (AC-z)
  1251.  
  1252. AC-z changes Uedit's Current Directory.  (Note:  This may not work in
  1253. Workbench, but it does work in CLI.)  AC-z asks for the directory name
  1254. followed by ESC.  AC-z accomplishes the same thing as the F4 option in the
  1255. S:Directories split window.  (See Click-Load File (C-buttonDown), 1.15.4.)
  1256.  
  1257. 1.15 Files
  1258.  
  1259. The MaxFiles setting determines how many of the 100 numbered buffers Uedit is
  1260. to use as file buffers.  If MaxFiles is 20, Uedit will use buffers 0 to 19
  1261. for loading files and will not let you load 21 files.  You can load any
  1262. number of files up to the limit of memory by using Insert File or the buffer
  1263. stack, however.  (See Buffers, 1.20.)
  1264.  
  1265. 1.15.1 Next File (f1,gadget1)
  1266.  
  1267. F1 and gadget1 advance to the next existing file buffer, making it the new
  1268. curFile.  (See Mark Gadgets (C-g), 1.19.4.)
  1269.  
  1270. 1.15.2 Previous File (S-f1,gadget2)
  1271.  
  1272. S-f1 and gadget2 go backward to the previous existing file buffer, making it
  1273. the new curFile.  (See Mark Gadgets (C-g), 1.19.4.)
  1274.  
  1275. 1.15.3 Max Files (AC-f1)
  1276.  
  1277. AC-f1 asks how many documents should be allowed (1-100).  Type in the number
  1278. you want (typically 20) and press ESC.  If you type in 20, then buffers 0 to
  1279. 19 become the file buffers.  The remaining buffers are available for
  1280. commands.  Unless you overhaul the standard config, you should not set
  1281. MaxFiles higher than about 30, because commands use buffers for various
  1282. purposes.  (See Buffers, 1.20.)
  1283.  
  1284. 1.15.4 Click-Load File (C-buttonDown)
  1285.  
  1286. Ctrl-clicking the mouse button does a number of things relating to files and
  1287. directories.  You are encouraged to use the convenience of click-loading
  1288. files rather than tediously typing file names to load in or using a file
  1289. requester.
  1290.  
  1291. Click-loading a file:  Hold down the Ctrl key and click a file name in any
  1292. buffer.  The file is loaded automatically.  If the file doesn't exist, a file
  1293. buffer is opened with its name.  If a click-loading directory name was
  1294. selected earlier, the directory name is prepended to the file name before the
  1295. file is loaded.
  1296.  
  1297. Selecting a click-loading directory name:  When you Ctrl-click a directory
  1298. name or whitespace in any buffer for the first time, the S:Directories file
  1299. is loaded into buffer 38.  If S:Directories does not exist, buffer 38 is
  1300. initialized with the following directory names:  DF0:  DF1:  DH0:  RAM:
  1301.  
  1302. If you Ctrl-click a directory name in any buffer, the directory name is added
  1303. to the list in buffer 38 and becomes the current click-loading directory.
  1304. Thereafter, when you Ctrl-click a file name, the directory name is prepended
  1305. to the file name automatically before the file is loaded in.  (Directory
  1306. names must end with "/" or ":".)
  1307.  
  1308. Seeing the Directories list:  Ctrl-click whitespace in the window, and the
  1309. Directories list (buffer 38) is shown in a split window.  While the split
  1310. window is open, the message line presents the following options:
  1311.     Ctrl-mouse=SelectDir.  F1=Edit.  F2=DirList.  F3=Save.  F4=ChgDir.  F5=CD.
  1312.  
  1313. To close the Directories split window, click the mouse normally, without
  1314. using a shift key.
  1315.  
  1316. While in the Directories split window:  If you Ctrl-click a directory name,
  1317. it is hilited and becomes the new click-loading directory.  If you Ctrl-click
  1318. whitespace in the Directories list, Uedit's current directory becomes the
  1319. default click-loading directory.  F1 allows you to edit the Directories list;
  1320. then to close the split window, press L-0.  F2 gets a directory listing of
  1321. the current click-loading (hilited) directory.  F3 saves the file
  1322. S:Directories (buffer 38) which is in the split window, making it available
  1323. next time you run Uedit.  F4 changes Uedit's Current Directory to the
  1324. currently hilited click-loading directory.  (This may not work in Workbench,
  1325. but it works in CLI.)  F5 does a CD, getting Uedit's Current Directory and
  1326. displaying it in the message line.
  1327.  
  1328. You may find it convenient to keep a NoName file in your working directories
  1329. with a comprehensive list of directory and file names in it; clicking these
  1330. selects any directory or loads any file you may need.  If you run UE without
  1331. naming any files, the NoName file is loaded automatically.
  1332.  
  1333. 1.15.5 Open File (A-f1)
  1334.  
  1335. A-f1 asks for the name of the file to load.  Type in the directory/file name
  1336. and press ESC.  No directory is required, if the file is in the current
  1337. directory.
  1338.  
  1339. 1.15.6 New File (C-f1)
  1340.  
  1341. C-f1 opens an empty file buffer named Empty.
  1342.  
  1343. 1.15.7 Insert File (SA-f1)
  1344.  
  1345. SA-f1 asks for the name of the file to insert.  Type in the name and press
  1346. ESC.  The file is loaded and inserted at the cursor location in curFile.
  1347.  
  1348. 1.15.8 Restore (SC-f1)
  1349.  
  1350. SC-f1 asks whether you want to restore curFile to the original.  If you
  1351. answer Yes, it closes curFile and reloads the original file.
  1352.  
  1353. 1.15.9 Rename (A-n)
  1354.  
  1355. A-n displays the name of the current file, allowing you to change the name.
  1356. Type in the new file name, deleting or modifying the old name as needed, and
  1357. press ESC.
  1358.  
  1359. 1.15.10 File Request (L-f1)
  1360.  
  1361. L-f1 brings up a directory/file requester, allo,ing you to select a directory
  1362. and a file to load in.  If a current click-loading directory has been
  1363. selected, the file requester is intialized with the current click-loading
  1364. directory.  If you select a file using the file requester, the file is
  1365. loaded.  If you select just a directory, the directory becomes the new click-
  1366. loading directory.  If you select Cancel, nothing is done.  (See Click-Load
  1367. File, 1.15.4)
  1368.  
  1369. 1.15.11 Save State (R-f5)
  1370.  
  1371. R-f5 saves Uedit's current state to a state file on disk.  The state includes
  1372. all files and buffers, search/replace/grep strings, color settings, cursor
  1373. and page positions, colored hilite/invert regions, and so on.  R-f5 first
  1374. asks for the state-file name.  The default name is "uestate".  Then it asks
  1375. whether you want to overwrite the existing state file (if one exists).
  1376.  
  1377. 1.15.12 Load State (R-f6)
  1378.  
  1379. R-f6 first asks whether you want to save any files in Uedit that have been
  1380. changed.  If you select "Yes", it saves all changed files in Uedit to disk.
  1381. Then it asks the name of the state file you wish to load in; the default
  1382. state file name is "uestate".  Note that loading in a state-file will wipe
  1383. out whatever files and buffers you are currently using, if the state file
  1384. needs those buffer slots.  So it is important to save your changes, if you
  1385. want to keep them, before loading in a state file.
  1386.  
  1387. 1.16 Save
  1388.  
  1389. When files are saved, they are saved under the directory/file name that is in
  1390. the window's title bar.  If a file already exists on disk, its attributes are
  1391. preserved when it is saved.  When you save a file, the buffer is locked and
  1392. put into the file-saving queue.  File saving is spooled and handled in the
  1393. background.  Inside the square brackets in the window's title bar an "S#"
  1394. appears, where # is the number of file-saves currently queued up.
  1395.  
  1396. If you close a file after putting it into the file saving queue, its buffer
  1397. is freed automatically after the save is finished.  You can edit a file
  1398. that's in the file-save queue, if it isn't the one currently being saved.  If
  1399. you edit such a file, when its turn comes in the queue it is not saved.
  1400. Instead it is removed from the saving queue.
  1401.  
  1402. Any number of file-saves may be pending at the same time.  File-saving
  1403. proceeds in the background as you continue editing other buffers or if you
  1404. switch to tiny window.  When the file-save is complete, the buffer is
  1405. unlocked and can be modified once again.
  1406.  
  1407. Quitting Uedit:  When you quit Uedit, any pending file-saves are completed
  1408. before the quitting process is carried out.  If you give any input while the
  1409. file-saves are in progress, Uedit abandons the quit and returns you to edit
  1410. mode.
  1411.  
  1412. 1.16.1 Save File (f2)
  1413.  
  1414. F2 saves curFile to disk using the file name displayed in the title bar.
  1415.  
  1416. 1.16.2 Save Changes (A-f2)
  1417.  
  1418. A-f2 saves all file buffers that have been modified since they were last
  1419. saved.  They are locked and cannot be edited until they have been saved.
  1420.  
  1421. 1.16.3 Save As (S-f2)
  1422.  
  1423. S-f2 asks for the new name to save curFile under.  Type in the new name and
  1424. press ESC.  curFile is saved under the new name, and the title bar now
  1425. displays the new file name.
  1426.  
  1427. 1.16.4 Save Hilite (SC-f2)
  1428.  
  1429. SC-f2 saves the hilite region in curFile to disk.  Type in the file name and
  1430. press ESC.  If no hilite region exists, nothing is saved and a warning
  1431. message "Read-only, empty, or bad name" appears.
  1432.  
  1433. 1.16.5 Abort Save (SA-f2)
  1434.  
  1435. SA-f2 aborts the file-save that is currently in progress.  Pressing SA-f2
  1436. repeatedly aborts all file-saves that are queued up.  Warning:  If you abort
  1437. a file-save, the copy on disk is destroyed.  You must be sure to save the
  1438. file before leaving Uedit, if you want the file preserved!
  1439.  
  1440. 1.17 Close
  1441.  
  1442. Closing a buffer merely frees the buffer.  If a file buffer has been changed
  1443. since it was last saved, the close commands ask whether you want to save the
  1444. changes before closing the buffer.
  1445.  
  1446. 1.17.1 Close File (Closebox)
  1447.  
  1448. Clicking the CloseBox closes curFile.  If curFile has been changed since it
  1449. was last saved, CloseBox asks whether you want to save the changes or not.
  1450. Select Yes, No, or Cancel.  If you select Yes, it saves curFile and closes
  1451. it.  If you select No, it closes curFile without saving it.  If you select
  1452. Cancel, it aborts and does nothing.
  1453.  
  1454. After you have closed the last file buffer, a NoName buffer is opened.  If a
  1455. NoName file exists in the current directory, it is loaded in.  If no NoName
  1456. file exists, the NoName buffer is empty and you are asked whether you want to
  1457. quit or not.  Thus you can close all buffers and quit, using the CloseBox,
  1458. unless you happen to have a NoName file in the current directory.  Note:  If
  1459. you happen to have a NoName file in your current directory, CloseBox will not
  1460. let you quit Uedit and you will have to quit using one of the F4 quit
  1461. commands.
  1462.  
  1463. 1.17.2 Close File (f3)
  1464.  
  1465. F3 closes curFile, if it has not been changed.  If it has been changed, F3
  1466. asks whether you want to save the changes or not.  Select Yes, No, or Cancel.
  1467. If you select Yes, it saves curFile and closes it.  If you select No, it
  1468. closes curFile without saving it.  If you select Cancel, it aborts and does
  1469. nothing.
  1470.  
  1471. 1.17.3 Auto Close (S-f3)
  1472.  
  1473. S-f3 asks no questions.  It saves curFile, if it has been changed.  Then it
  1474. closes curFile.
  1475.  
  1476. 1.18 Quit
  1477.  
  1478. The quit commands may ask whether you want to save changes before quitting
  1479. Uedit or may save the changes automatically.  The A-f4 quit command is an
  1480. exception; it quits immediately without saving anything.  After any saving of
  1481. files is done, and assuming that you do not abort with Amiga-ESC, the actual
  1482. quitting is handled by the quit() CL function.  (See the Quit() CL function
  1483. in 3.4.)
  1484.  
  1485. The quit CL function behaves as follows:  If ARexx is in use and a sent Rexx
  1486. message has not received a reply, you are returned to edit mode and cannot
  1487. quit until the reply has arrived.  If a received Rexx message hasn't been
  1488. sent a reply, Uedit replies to it and to all queued incoming Rexx messages
  1489. with a "failed" reply, to alert the senders that Uedit cannot receive anymore
  1490. messages.  If you have pushed buffers onto the buffer stack and haven't
  1491. popped them off, Uedit asks if it can throw them away.  If you answer No or
  1492. Cancel, it returns you to edit mode.  If any prints or file-saves are queued
  1493. up, Uedit finishes processing them before quitting.  During the time quit()
  1494. is finishing any queued up prints and file-saves, if you give any input, it
  1495. returns you to edit mode.
  1496.  
  1497. When Uedit quits, it gives a return code to AmigaDOS.  The return code is 0
  1498. on all quit commands except ABORT Uedit! (A-f4), which gives a return code of
  1499. 10 to AmigaDOS.  The return code of 10 looks bad in the CLI window, but it
  1500. doesn't mean anything bad happened.  Its purpose is to help those who run
  1501. Uedit in execute files and need a meaningful return code.  (The return code
  1502. can be customized in the Alt-f4 command in the Config!M file.)
  1503.  
  1504. 1.18.1 Quit (f4)
  1505.  
  1506. F4 asks if you really want to quit.  Select Yes, No, or Cancel.  If you
  1507. select No or Cancel, it aborts the quit and returns you to edit mode.  If you
  1508. select Yes, and if any file buffers have been changed, it asks if you want to
  1509. save the changes.  Select Yes, No, or Cancel.  If you select Yes, it saves
  1510. all changed files and quits.  If you select No, it quits.  If you select
  1511. Cancel, it aborts the quit and returns you to edit mode.  It gives AmigaDOS a
  1512. return code of 0.
  1513.  
  1514. 1.18.2 Auto-Quit (S-f4)
  1515.  
  1516. S-f4 asks no questions.  It saves any file buffers that have been changed and
  1517. quits.  It gives AmigaDOS a return code of 0.
  1518.  
  1519. 1.18.3 ABORT Uedit! (A-f4)
  1520.  
  1521. A-f4 quits Uedit FAST, asking no questions and saving no files.  It gives
  1522. AmigaDOS a return code of 10.
  1523.  
  1524. 1.19 Global Modes
  1525.  
  1526. The Global Modes menu shows the current status of global flag settings.  If a
  1527. check-mark appears, the flag is On.  (See Local Modes, 1.31, and Show Vals,
  1528. 1.10.)
  1529.  
  1530. 1.19.1 Speak Messages (SC-f5)
  1531.  
  1532. SC-f5 toggles the speakMsgs flag.  When Speak Msgs is checkmarked, message-
  1533. line messages are spoken.  (Note:  Text speaking uses the SPEAK: device.  It
  1534. must be mounted before speaking will work.  You might want to mount it in
  1535. your Startup-Sequence.)
  1536.  
  1537. 1.19.2 Speak Alerts (AC-f5)
  1538.  
  1539. AC-f5 toggles the speakAlerts flag.  When Speak Alerts is checkmarked, the
  1540. text in requester boxes is spoken.
  1541.  
  1542. 1.19.3 Busies (C-b)
  1543.  
  1544. C-b toggles the Busies flag.  When Busies is On, a message "...#" appears
  1545. when a buffer is being packed, where # is the number of the buffer being
  1546. packed.  Buffer housekeeping is done automatically after a 4 second pause in
  1547. your typing.
  1548.  
  1549. 1.19.4 Mark Gadgets (C-g)
  1550.  
  1551. C-g toggles the markGadgets flag.  When Mark Gadgets is On, the gadget names
  1552. and markings are visible in the message line.
  1553.  
  1554. 1.19.5 Make Icons (AC-i)
  1555.  
  1556. AC-i toggles the makeIcons flag.  When Make Icons is On and a file is saved
  1557. to disk, a Workbench icon is created for the file, if none already exists.
  1558. The icon is created by copying S:NoName.info into myFile.info, where myFile
  1559. is the file being saved.  NoName.info must be in S:, in order for Make Icons
  1560. to work.
  1561.  
  1562. 1.19.6 Use Keys (A-u)
  1563.  
  1564. A-u toggles the useKeys flag.  When Use Keys is On, printable keys such as
  1565. the keypad keys operate as typing keys and not as function keys.  When Use
  1566. Keys is Off, any printable key can operate as a command-key whose command
  1567. replaces the typed input of that key.  (See Part 2 sections covering Keys,
  1568. InputChar, and MacroNum.)
  1569.  
  1570. 1.19.7 Invisibles (C-v)
  1571.  
  1572. C-v toggles the Spooks flag.  When Invisibles is On, control characters such
  1573. as ESC are visible as box characters in the text (depending on the font you
  1574. are using).  When Invisibles is Off, control characters are invisible in
  1575. text.  When spooks are invisible and you move the cursor through the text and
  1576. it lands on a spook, the cursor becomes invisible.  Also, when spooks are
  1577. invisible be careful when creating hilite and invert regions, because you may
  1578. forget to include an invisible spook in the region.  To see the ASCII value
  1579. of any spook ("box") character, put the cursor on it and press C-/.
  1580.  
  1581. 1.19.8 Row/Column (C-2)
  1582.  
  1583. C-2 toggles the rowCol flag.  When Row/Column is On, the cursor's page-row-
  1584. column appears in the gadget4 (rightmost) position in the message line.
  1585. Following a cursor movement there may be a delay, depending on the size of
  1586. the file and how deep in it the cursor is, before the page-row-column info is
  1587. updated.
  1588.  
  1589. 1.20 Buffers
  1590.  
  1591. A buffer is a block of memory for holding text files or regions of text.
  1592. Uedit has 100 numbered buffers, 0 to 99.  Any number of buffers may be pushed
  1593. onto buffer stacks as well, up to the limit of memory.
  1594.  
  1595. There are 100 buffer stacks, 0 to 99.  The buffer stack commands in the menu
  1596. all use buffer stack 99.
  1597.  
  1598. When viewing a buffer in the main window or in a split window, the buffer
  1599. number is displayed in the square brackets in the title bar.  In normal
  1600. editing, buffer handling is transparent and the user need not think about
  1601. buffer numbers or what is in various buffers.  (See Split Windows, 1.42.)
  1602.  
  1603. The low-numbered buffers (typically 0 to 19) are used for file editing.
  1604. These are called "file buffers".  The maximum number of files you can edit is
  1605. determined by the setting of MaxFiles you are using.  It can be changed by
  1606. selecting Max Files (AC-f1).  Typically MaxFiles is 20.
  1607.  
  1608. In Uedit, all buffers are general purpose.  But there are reasons for having
  1609. a MaxFiles setting:  It provides a toggle range, so that you can rotate among
  1610. files without having to scan through all buffers.  It establishes an upper
  1611. limit so that files are not loaded into buffers that are used for special
  1612. purposes in commands in the config you are using.  (File buffers may be used
  1613. in commands too, but by convention they rarely are.)
  1614.  
  1615. Higher-numbered buffers (MaxFiles and above, typically buf20 to buf99) may be
  1616. called "work buffers", and they are used by commands in the config.  They may
  1617. contain search & replace text, copy/cut/paste text, scratch deletes, and so
  1618. on.  You can examine them using Edit Buffer (SA-f6) or See Buffers (SC-f6).
  1619.  
  1620. The lowest file buffer is the "home" buffer.  When you close curFile, Uedit
  1621. returns "home" to the lowest buffer that is in use; usually this is buffer 0.
  1622. When you load in a file or select New File, Uedit uses the lowest file buffer
  1623. number that is available.
  1624.  
  1625. Uedit insists that at least one file buffer be open at all times.  If you
  1626. close the last file buffer, it opens a NoName buffer.  If a NoName file
  1627. exists in the current directory, NoName is loaded automatically when you
  1628. close the last file buffer.
  1629.  
  1630. At any given time, most buffers are empty and do not exist.  They are created
  1631. as needed by the commands that you use, such as inputting a search string or
  1632. the name of a file to load in.
  1633.  
  1634. Here are the buffer conventions used in the standard configuration:
  1635. (NOTE:  The max files setting can be as high as 36 without touching any
  1636. buffers that are in use.)
  1637.  
  1638. buf65-99 = available for user commands
  1639.     (the buf99 buffer stack is used for scratch stacking, but the variable
  1640.     buf99 is not in use anywhere)
  1641. buf50-59 = used for temporary purposes in commands
  1642. buf0-35  = used for loading files
  1643.  
  1644. buf36 = holds REXXCOMM File for Rexx interface
  1645. buf37 = copied columnar data
  1646. buf38 = directory names
  1647. buf39 = used for result of AmigaDOS commands (if result selected)
  1648. buf40 = used for AmigaDOS commands
  1649. buf41 = used in buffer swapping command, ctl-w
  1650. buf42 = holds Help, if loaded
  1651. buf43 = document names
  1652. buf44 = make-command buffer
  1653. buf45 = holds scratch deletes for Undo, keypad-0
  1654. buf46 = copied invert
  1655. buf47 = copied hilite
  1656. buf48 = replace string
  1657. buf49 = search or grep string
  1658. buf60 = names of bookmarks
  1659. buf61 = Rexx msg/reply input buffer
  1660. buf62 = Rexx msg/reply output buffer
  1661. buf63 = hyper text filename
  1662. buf64 = hyper text tablename
  1663.  
  1664. This buffer convention is not sacred.  All buffers are general purpose.  You
  1665. may customize the standard config or create a custom config and use any
  1666. buffer convention.
  1667.  
  1668. You may use Edit Buffer (SA-f6) to examine and modify buffers freely.
  1669. Sometimes it is more convenient to "hand edit" a buffer using Edit Buffer
  1670. than it is to input the buffer's contents using a command that uses Primitive
  1671. Mode.  Example:  When you select Set Replace (f8) to input a replace string
  1672. to use in search & replace operations, it puts you into Primitive Mode.  In
  1673. Primitive Mode, you cannot use editing commands, so you cannot paste in the
  1674. replace-text.  But using Edit Buffer, you can edit the Replace buffer (buffer
  1675. 48) and paste in the replace-text.
  1676.  
  1677. Saving memory:  It is good practice to select Free Buffers (A-f3) now and
  1678. then, when the buffers are not holding anything that you need to keep.
  1679. Sometimes you may experience a memory shortage without realizing that a
  1680. buffer is holding a huge block of text that you used in a cut & paste
  1681. operation earlier and forgot to free up when you were through with it.
  1682.  
  1683. 1.20.1 Edit Buffer (SA-f6)
  1684.  
  1685. SA-f6 asks for a buffer number that you wish to edit.  Enter the buffer
  1686. number, 0 to 99, followed by ESC.  The buffer becomes curFile.
  1687.  
  1688. 1.20.2 See Buffers (SC-f6)
  1689.  
  1690. SC-f6 steps through all work buffers which have something in them, as you
  1691. press F1.  Pressing F2 quits the command, leaving the buffer in the window so
  1692. that you can edit it.  Pressing F3 quits the command, returning you to the
  1693. home buffer (usually buffer 0).
  1694.  
  1695. 1.20.3 Free a Buffer (A-f)
  1696.  
  1697. A-f asks for a buffer number.  Enter the buffer number (0-99) and press ESC.
  1698. The buffer is freed, if it exists.
  1699.  
  1700. 1.20.4 Free Buffers (A-f3)
  1701.  
  1702. A-f3 frees all work buffers which exist.  This erases all cut or copied
  1703. hilite text, scratch deletes, etc, that are currently in the work buffers.
  1704. Use A-f3 when you need to recover all the memory that you can.
  1705.  
  1706. Note:  Free buffers does not free any buffers that you may have pushed onto
  1707. buffer stack 99 using Push Buffer (L-w).  These can only be freed by popping
  1708. them off the stack first using Pop Buffer (R-w) or quitting Uedit.
  1709.  
  1710. 1.20.5 Swap with Buf41 (C-w)
  1711.  
  1712. C-w swaps curFile with buffer 41.  Pressing C-w again reverses the swap.
  1713. (See Editing Tricks, 2.7, for examples of why this is useful.)
  1714.  
  1715. 1.20.5.1 Compare with Buf41 (R-7)
  1716.  
  1717. R-7 compares the contents of curFile with that of buffer 41, starting from
  1718. the cursor forward in each buffer.  The comparison stops when disagreement is
  1719. found or end-of-file is reached.  If cursor is left at the stopping place in
  1720. each buffer.  When disagreement is found, the start-of-page in both buffers
  1721. is at the cursor's line and the two buffers are flash-displayed 2 times.  To
  1722. continue the buffer comparison, put the cursor's at the beginning of text
  1723. that is in agreement and press R-7 again.  (See Swap with Buf41 (C-w) above.)
  1724.  
  1725. 1.20.6 Swap to Buffer 0 (A-w)
  1726.  
  1727. A-w swaps curFile with buffer 0, making curFile the "home" (0) buffer.  When
  1728. a particular buffer is central to the work you are doing, swap it to buffer 0
  1729. for convenience.
  1730.  
  1731. 1.20.7 Buffer Stack
  1732.  
  1733. When buffer N is pushed onto a buffer stack, it is no longer accessible using
  1734. Edit Buffer or any buffer-accessing command (except Pop Buffer (R-w)).  The
  1735. buffer-N slot is now available and a new buffer N may be created.  Any buffer
  1736. may be pushed onto the stack.  Buffers may be popped off the stack into any
  1737. buffer number slot.
  1738.  
  1739. Uedit's buffer stacks are LIFO, "last in, first out."  The following commands
  1740. all use buffer stack 99, and the entries of stack 99 may be rotated using
  1741. Roll Stack (SA-w).
  1742.  
  1743. Buffers are popped off the stack using Pop Buffer (R-w) and may either free
  1744. and replace curFile or occupy a new file-buffer slot.
  1745.  
  1746. When you quit Uedit, if any buffer stack is not empty, Uedit asks whether it
  1747. is okay to throw away the buffer stack.  If you respond No, Uedit will not
  1748. quit and it returns you to editing mode.
  1749.  
  1750. Buffer stacking uses only 8 additional bytes for each buffer that is pushed
  1751. onto a stack.  When you use any buffer-stack command, the message line
  1752. reports the number of buffers that are on stack 99.
  1753.  
  1754. 1.20.8 Push Buffer onto Stack (L-w)
  1755.  
  1756. L-w pushes curFile onto buffer stack 99.  If it is the only file buffer in
  1757. use, a NoName buffer is opened.
  1758.  
  1759. 1.20.9 Pop Buffer from Stack (R-w)
  1760.  
  1761. R-w asks whether it may delete curFile.  If you answer No, it pops stack 99
  1762. into a new file-buffer slot, if one is available; if all file-buffer slots
  1763. are in use, it does nothing.  If you answer Yes, it deletes curFile and pops
  1764. the stack buffer into curFile's buffer-number slot.  If no buffers are on the
  1765. stack, it reports "Buffer stack is empty".
  1766.  
  1767. 1.20.10 Roll Buffer Stack (SA-w)
  1768.  
  1769. SA-w rolls buffer stack 99 so that the bottom buffer is moved to the top.
  1770. That is, instead of being the next one that would be popped off, it becomes
  1771. the last one that would be popped off.
  1772.  
  1773. 1.21 Search
  1774.  
  1775. Searching uses the following:
  1776.  
  1777. 1.  One or two search strings, each up to 63 characters in length.
  1778.  
  1779. 2.  If two search strings are used, they are delimited by the eitherOr
  1780. delimiter "$".  Example:  Smith$Jones
  1781.  
  1782. 3.  Optional single-character "?" and multi-character "*" wildcards in each
  1783. of the above strings.  Example:  Sm?th*$Jones
  1784.  
  1785. 4.  An optional "all-but" string, up to 63 characters in length and delimited
  1786. by the allBut delimiter "~".  If an all-but string is used, searching skips
  1787. over any matches to it.  Example: Sm?th*$Jones~Smythe
  1788.  
  1789. 5.  To include an allBut or eitherOr delimiter or wildcard in a search string
  1790. literally, precede it with a backslash.  Example:  /\* matches /*
  1791.  
  1792. 6.  SingleWhite and multiWhite variables determine how the single and multi
  1793. wildcards are treated in the search.  If these have value 0, no whitespace is
  1794. accepted as a "match" to the wildcard.  If they have value 1, spaces and tabs
  1795. are accepted as a match to the wildcard.  If they have value 2, any
  1796. whitespace, including eols and formfeeds, is accepted as a match to the
  1797. wildcard.
  1798.  
  1799. 7.  Case sensitivity, On or Off.  (Select Global Modes (C-g) and see whether
  1800. searchCaps is On or Off.)
  1801.  
  1802. 8.  Incremental searching, On or Off.  (Select Global Modes (C-g) and see
  1803. whether incremSearch is On or Off.)
  1804.  
  1805. The delimiters, wildcards, and singleWhite and multiWhite values are defined
  1806. in the config defaults and may be modified using the Search menu.  The
  1807. current values of these may be seen by using Show Vals (S-Help).
  1808.  
  1809. All search strings, including the all-but string, may use wildcards.  When
  1810. Case Sensitive is checkmarked in the menu, searching is case-sensitive.  When
  1811. it is not checkmarked, searching ignores upper/lower case.
  1812.  
  1813. Forward searching is faster when case sensitivity is used (searchCaps is On)
  1814. and when wildcards and the either-or delimiter are not used - i.e., using a
  1815. "simple" search string.  Using an all-but string does not affect search speed
  1816. measurably, unless many "finds" have to be rejected on account of it.
  1817.  
  1818. When searching succeeds, it does the following:  It puts the cursor at the
  1819. beginning of the "matched" region.  It makes the matched region a colored
  1820. invert region, to emphasize it.  It scrolls the text, if necessary, in order
  1821. to show the cursor and matched region in the window.  When doing search &
  1822. replace, the inverted region is deleted and the replace text is inserted.
  1823. (See Replace, 1.22.)  If searching fails, a "Search failed" message is
  1824. displayed.
  1825.  
  1826. Incremental searching (the default option) actually begins the instant you
  1827. type in the first character of the search string.
  1828.  
  1829. (Also see Grep, 1.48.)'
  1830.  
  1831. 1.21.1 Input Search Text and Search Forward (f7)
  1832.  
  1833. F7 solicits a search string input.  If incremental searching is On, searching
  1834. begins when you type in the first letter of the search string.  At any time
  1835. you can change the direction (forward/backward) of the search using the down/
  1836. up arrow keys (or alternatively using f9/S-f9).  Case-sensitivity is normally
  1837. Off, but if you type a capital letter it is turned On automatically.  If you
  1838. are satisfied with the search, press ESC or click the mouse to end the search
  1839. string input.  If you want to abandon the search, press backspace until the
  1840. search string is deleted and then press ESC; this restores the cursor to its
  1841. original position.
  1842.  
  1843. If incremental searching is Off, after pressing F7 merely type in the search
  1844. string and press ESC or click the mouse in order to cause the search to occur.
  1845.  
  1846. 1.21.2 Modify Search Text and Search Forward (S-f7)
  1847.  
  1848. S-f7 behaves exactly the same as F7, except the old content of the search
  1849. buffer (buffer 49) is not erased; thus, you can modify the existing search
  1850. string.
  1851.  
  1852. 1.21.3 Search Forward (f9)
  1853.  
  1854. F9 searches forward using the existing search string(s) that you input
  1855. earlier.  If it reaches end-of-file without getting a hit, a "Search failed"
  1856. message is displayed.
  1857.  
  1858. 1.21.4 Search Backward (S-f9)
  1859.  
  1860. S-f9 behaves exactly the same as F9, except it searches in the backward
  1861. direction.  If it reaches start-of-file without getting a hit, a "Search
  1862. failed" message is displayed.
  1863.  
  1864. 1.21.5 Global Search Forward (A-f9)
  1865.  
  1866. A-f9 searches for a match to the current search string(s) starting from the
  1867. cursor's position in curFile until end of file and continues through all file
  1868. buffers, until it finds a match or fails.
  1869.  
  1870. 1.21.6 Change Search Wildcards (A-f7)
  1871.  
  1872. A-f7 asks, one at a time, for the single wildcard, the multi wildcard, the
  1873. singleWhite value, the multiWhite value, and the all-but delimiter.  The
  1874. config defaults define the single wildcard as "?", the multiWild as "*",
  1875. singleWhite and multiWhite as 0, and the all-but delimiter (allBut) as "~".
  1876. If singleWhite and multiWhite are 0, no whitespace is allowed as a "hit"
  1877. underneath the wildcards in the search.  If these are 1, spaces and tabs are
  1878. allowed as a hit under the wildcards.  If these are 2, any whitespace is
  1879. allowed as a hit under the wildcards.
  1880.  
  1881. 1.21.7 Change Search Either-Or Delimiter (C-f7)
  1882.  
  1883. C-f7 asks for the new eitherOr delimiter to use in delimiting two search
  1884. strings.  The next character that you type becomes the new eitherOr delimiter.
  1885.  
  1886. 1.22 Replace
  1887.  
  1888. A successful Search marks the "matched" area as a colored invert region.  The
  1889. replace commands below require the existence of a colored invert region.  If
  1890. there is no invert region, the replace commands do nothing.  Replace strings
  1891. may be of any size up to 8 megabytes.  (See Search, 1.21.)
  1892.  
  1893. 1.22.1 Input Replace Text (f8)
  1894.  
  1895. F8 solicits a replace string using Primitive Mode.  Existing text in the
  1896. replace buffer (buffer 48) is erased.  When finished inputting the replace
  1897. text, press ESC.
  1898.  
  1899. 1.22.2 Modify Replace Text (S-f8)
  1900.  
  1901. S-f8 is identical to F8 except that the existing replace text is not erased.
  1902.  
  1903. 1.22.3 Replace and Search Forward (f10)
  1904.  
  1905. F10 replaces the invert region with the replace text and continues the search
  1906. forward.  If no invert region exists, nothing happens.  (See Search, 1.21.)
  1907.  
  1908. 1.22.4 Replace and Global Search Forward (C-f10)
  1909.  
  1910. C-f10 replaces the invert region with the replace text and continues the
  1911. global search forward.
  1912.  
  1913. 1.22.5 Replace and Search Backward (S-f10)
  1914.  
  1915. S-F10 is identical to F10, except it continues a backward search after the
  1916. replace.
  1917.  
  1918. 1.22.6 Replace All (A-f10)
  1919.  
  1920. A-f10 works the same as F10 except it keeps searching and replacing until
  1921. end-of-file is reached.  When eof is reached, a "Search failed" message is
  1922. displayed.
  1923.  
  1924. 1.22.7 Replace All Globally (SA-f10)
  1925.  
  1926. SA-f10 works the same as A-f10 except it keeps searching and replacing until
  1927. all files have been searched and the cursor has returned to curFile once
  1928. again.
  1929.  
  1930. 1.23 Refresh (SC-Help)
  1931.  
  1932. SC-Help refreshes the display.  It is not needed in normal circumstances, but
  1933. when creating learned sequences which are "played back" like a tape
  1934. recording, Uedit may not update the display until the learned sequence has
  1935. played out.  By including a Refresh at selected points in the learned
  1936. sequence, you can cause the display to be updated at critical points as you'd
  1937. like.
  1938.  
  1939. 1.24 Do Menus (SAC-Help)
  1940.  
  1941. SAC-Help rebuilds the menus by running the startup command.  Use it after you
  1942. have changed fonts, so that the menus conform to the new font regime.  If you
  1943. kill a command that's in a menu, after using SAC-Help its menu entry will no
  1944. longer appear.  (See Kill Key (SAC-f6), 1.38.1.)  Similarly, if you create a
  1945. command for a currently invisible menu selection, the selection does not
  1946. appear until the menus have been rebuilt.  SAC-Help rebuilds the menus so
  1947. that only existing commands are shown in the menus.  (See Customizing the
  1948. Menus, 2.17.)
  1949.  
  1950. 1.25 Scratch Deletes and Undo Deletes
  1951.  
  1952. Scratch deletes are deletes that are performed with the keypad 7 & 9 or with
  1953. C-d, the Delete Line key.  Scratch deletes accumulate in the Undo buffer
  1954. (buffer 45) as long as you keep deleting without moving the cursor.  Then you
  1955. can move the cursor elsewhere and press the Undo key (kp0), inserting the
  1956. deleted text at a new location.
  1957.  
  1958. When you move the cursor elsewhere and do another scratch delete, the Undo
  1959. buffer is freed before the new delete is stored in it.  This makes scratch
  1960. deleting and Undo the handiest way to cut or copy words and lines of text and
  1961. paste them at a new location.  Scratch deleting and Undo should be used as
  1962. the method of choice for moving text and correcting mistakes.
  1963.  
  1964. The unshifted delete keys, kp7 and kp9, work at word level rather than
  1965. character level in order to suit fast typists.  Fast typists can delete the
  1966. preceding word and type it back in correctly faster than they can position
  1967. the cursor, correct a mistake, and reposition the cursor.  Slower typists may
  1968. want to swap the unshifted keypad keys to the Shift position.  (See Swap
  1969. Keys, 1.38.3.)
  1970.  
  1971. 1.25.1 Undo Scratch Deletes (kp0)
  1972.  
  1973. kp0 inserts the text in the scratch delete Undo buffer (buffer 45) at the
  1974. cursor.
  1975.  
  1976. 1.25.2 Delete Line (C-d)
  1977.  
  1978. C-d deletes the cursor line, including the end-of-line character, and stores
  1979. it in the Undo buffer.
  1980.  
  1981. 1.25.3 Delete Character Left (S-kp7)
  1982.  
  1983. S-kp7 deletes the character to the left of the cursor, storing it in the Undo
  1984. buffer.
  1985.  
  1986. 1.25.4 Delete Cursor Character (S-kp9)
  1987.  
  1988. S-kp9 deletes the character under the cursor, storing it in the Undo buffer.
  1989.  
  1990. 1.25.5 Delete Word Left (kp7)
  1991.  
  1992. kp7 deletes word-left, storing it in the Undo buffer.
  1993.  
  1994. 1.25.6 Delete Word Right (kp9)
  1995.  
  1996. kp9 deletes word-right, storing it in the Undo buffer.
  1997.  
  1998. 1.25.7 Delete to Start-of-Line (A-kp7)
  1999.  
  2000. A-kp7 deletes to start-of-line, storing it in the Undo buffer.
  2001.  
  2002. 1.25.8 Delete to End-of-Line (A-kp9)
  2003.  
  2004. A-kp9 deletes to end-of-line, storing it in the Undo buffer.
  2005.  
  2006. 1.25.9 Delete to Start-of-Page (C-kp7)
  2007.  
  2008. C-kp7 deletes to the top of the window, storing it in the Undo buffer.
  2009.  
  2010. 1.25.10 Delete to End-of-Page (C-kp9)
  2011.  
  2012. C-kp9 deletes to the bottom of the window, storing it in the Undo buffer.
  2013.  
  2014. 1.25.11 Delete Line Above Cursor (C-del)
  2015.  
  2016. C-del deletes the line above the cursor line, storing it in the Undo buffer.
  2017. Note that while this delete is stored in the Undo buffer and can be undone,
  2018. it is not a contiguous delete relative to the cursor location as the other
  2019. scratch deletes discussed previously are, because the cursor can be anywhere
  2020. in the line below the line that is deleted.  Before Undoing this delete, put
  2021. the cursor at the start of its current line; do not leave it in the middle of
  2022. the line.  You should not include C-del deletes along with contiguous scratch
  2023. deletes and expect Undo to restore the text in its proper order.
  2024.  
  2025. 1.25.12 Delete Line Below Cursor (C-bs)
  2026.  
  2027. C-bs (C-backspace) deletes the line below the cursor.  Again, this is not a
  2028. contiguous delete relative to the cursor position.  Before Undoing this
  2029. delete, put the cursor at the end of the current line; do not leave it in the
  2030. middle of the line.  (See discussion in C-del above.)
  2031.  
  2032. 1.26 Tabs and Tab Rulers
  2033.  
  2034. When you select See Ruler (SA-tab) or Set Ruler (SC-tab), curFile's tab ruler
  2035. is displayed.  There are 5 tab rulers, numbered 0 to 4.  Buffers may use any
  2036. of the 5 tab rulers.  If you adjust the tab stops in a given tab ruler, it
  2037. affects the display of all buffers that are using the same tab ruler.
  2038.  
  2039. When you type in a tab, if Use Tabs (AC-tab) in the Local Modes menu is
  2040. checkmarked, a true tab character (ASCII 9) is input.  If Use Tabs is turned
  2041. Off, when you type a tab spaces (ASCII 32) are inserted up to the next tab
  2042. stop.
  2043.  
  2044. If you are using autoIndent typing mode and Use Tabs is On, when you press
  2045. Return or the line word-wraps, true tab characters are used in creating the
  2046. auto-indentation.  If Use Tabs is Off, the indentation, if any, is made up of
  2047. spaces.
  2048.  
  2049. When See Ruler or Set Ruler is used, the tab ruler is drawn just above the
  2050. cursor line.  If the cursor is not in the window, the ruler is drawn at the
  2051. top of the window.  The ruler's number (0 to 4) is shown in the top left
  2052. corner of the ruler.  Tab rulers may have up to 32 tab stops in columns 2
  2053. through 255.
  2054.  
  2055. Normally tab characters are invisible like spaces are.  When you put the
  2056. cursor on a tab character, the cursor is as wide as the column-width of the
  2057. tab-spacing.  If there are tabs in the text which fall beyond the last tab-
  2058. stop in the current ruler, the tabs are displayed as box characters 1 column
  2059. wide.  Uedit does not know how wide the tab-spacing should be when the tab is
  2060. beyond the last stop; you may add more tab stops by using Set Ruler.
  2061.  
  2062. When typing, if you keep pressing the Tab key, when the cursor reaches the
  2063. last tab stop, the next Tab you type puts the cursor at the first tab stop on
  2064. the next line.  This facilitates typing columns of material.  (AutoIndent
  2065. typing mode is also helpful in typing columns of material.)
  2066.  
  2067. When using columnar display mode, tabs are shown as box characters to
  2068. facilitate columnar text handling.  Uedit cannot predict what the tab stops
  2069. might be at some new location you might move the text to, so the only safe
  2070. way to display tabs in columnar display mode is to show them as being 1
  2071. column wide.  Showing them as box characters also alerts you that once you
  2072. have made the columnar data movement, randomly scattered tabs could destroy
  2073. the columnar alignment and it might be a good idea to replace the tabs with
  2074. spaces before moving the columnar text.  (See Columnar, 1.40.)
  2075.  
  2076. 1.26.1 Use Tabs (AC-tab)
  2077.  
  2078. AC-tab toggles the useTabs setting for curFile.  If Use Tabs is On in the
  2079. Local Modes menu, true tab characters are inserted when you press the Tab
  2080. key; if Use Tabs is Off, spaces are inserted up to the next tab stop in the
  2081. curFile's tab ruler.
  2082.  
  2083. 1.26.2 Tab (TAB)
  2084.  
  2085. The Tab key types in a true tab character at the cursor, when Use Tabs is On.
  2086. When Use Tabs is Off, Tab inserts spaces up to the next tab stop in the
  2087. curFile's tab ruler.
  2088.  
  2089. 1.26.3 See Ruler (SA-tab)
  2090.  
  2091. SA-tab displays curFile's tab ruler above the cursor line.  If the cursor is
  2092. offscreen, it displays the tab ruler near the top of the window.  To scroll
  2093. the tab ruler leftward, to see tab stops beyond the right edge of the window,
  2094. hold down the mouse button, drag the mouse to the left, and release the
  2095. button.  To scroll rightward, drag the mouse to the right.  To terminate,
  2096. give any input; note that the input is used, not thrown away.  This is to
  2097. allow you to place the cursor in a column by looking at the tab ruler.
  2098.  
  2099. 1.26.4 Set Ruler (SC-tab)
  2100.  
  2101. SC-tab displays curFile's tab ruler and allows you to set tab stops in the
  2102. ruler.  To scroll the tab ruler leftward, hold the mouse button and drag the
  2103. mouse to the left.  To scroll rightward, drag the mouse to the right.
  2104. Clicking the mouse 2 or more lines above or below the ruler terminates the
  2105. ruler adjustments.
  2106.  
  2107. To erase a tab stop in the ruler, click the mouse on top of it.  To add new
  2108. tab stops, click the mouse in the desired columns.  The last tab stop in the
  2109. ruler has an "X" in it.
  2110.  
  2111. The DEL key erases all tab stops in the ruler.  The BACKSPACE key shifts all
  2112. tab stops to the left.  The SPACE bar shifts all tab stops to the right.  The
  2113. TAB key puts in a new tab stop, shifting all tab stops to the right, using
  2114. the same spacing as the first tab stop in the ruler.  Thus, if the first tab
  2115. stop is in column 5, the Tab key slides all tab stops rightward 4 columns,
  2116. putting a new tab stop in column 5.
  2117.  
  2118. To save changes made in the tab ruler, click the mouse 2 or more lines above
  2119. or below the ruler, or press a key that isn't used in setting tabs.  This
  2120. updates the tab ruler.  To throw away changes made in the tab ruler, abort
  2121. with Amiga-ESC.
  2122.  
  2123. 1.26.5 Set Tab Ruler Number (SAC-tab)
  2124.  
  2125. SAC-tab asks for the new tab ruler number to use for curFile.  It must be a
  2126. number between 0 and 4.
  2127.  
  2128. 1.26.6 Tabs To Spaces (L-t)
  2129.  
  2130. L-t converts all tabs in curFile to spaces.  A "Tab->space" message is
  2131. displayed during the conversion.  Converting tabs to spaces may run out of
  2132. memory on large files.  If it does, a "Memory...."  message appears while
  2133. memory housekeeping is being done.  When conversion resumes, the "Tab->space"
  2134. message is redisplayed.
  2135.  
  2136. 1.26.7 Spaces To Tabs (R-t)
  2137.  
  2138. R-t converts spaces in curFile to tab characters wherever spaces happen to
  2139. fall upon a tab stop in curFile's tab ruler.  During the conversion, a
  2140. "Space->tab" message is displayed.  (See Smart Tabs in the Config! defaults.)
  2141.  
  2142. 1.26.8 Transparent Tab Forward (S-tab)
  2143.  
  2144. S-tab advances the cursor to the next tab stop.  Nothing is typed in.  In
  2145. transparent tabbing, column 1 is considered to be a tab stop.  Thus when the
  2146. cursor reaches the last tab stop in the current line, it moves to column 1 of
  2147. the next line.
  2148.  
  2149. 1.26.9 Transparent Tab Backward (A-tab)
  2150.  
  2151. A-tab moves the cursor backward to the previous tab stop.  Nothing is typed
  2152. in or deleted.  Column 1 is considered to be a tab stop in transparent
  2153. tabbing.  Thus when the cursor reaches the first tab stop in the line, the
  2154. next place it stops is column 1, before moving backward to the last tab stop
  2155. in the previous line.
  2156.  
  2157. 1.26.10 Untab (C-tab)
  2158.  
  2159. C-tab deletes white space back to the previous tab column.  Column 1 is
  2160. considered to be a tab column in untabbing, so if the cursor is positioned on
  2161. or before the first tab stop, white space is deleted to the start of the
  2162. line.  C-tab functions as a transparent back-tab when there is no white space
  2163. to delete.
  2164.  
  2165. 1.27 Eol
  2166.  
  2167. Text files use different end-of-line characters, depending on where they were
  2168. last edited.  The standard config presets the eol to a linefeed (ASCII 10).
  2169. Uedit does not alter the eol of files that are loaded in, unless the user
  2170. does it purposely.
  2171.  
  2172. If a file's eol is not the same as Uedit is currently using, the file is
  2173. displayed All On One Line!  The non-standard eols appear as odd looking "box"
  2174. characters.
  2175.  
  2176. In that event, there are two choices:  You can change Uedit's eol to the one
  2177. that the file is using.  This makes the file display correctly, but it makes
  2178. all other buffers in Uedit display All On One Line.  Or you can change the
  2179. eols in the file to Uedit's current eol character.
  2180.  
  2181. First you must find out what the non-standard eols actually are.  Put the
  2182. cursor on top of one of the "box" characters and press C-/.  The message line
  2183. displays the ASCII value of box character.  Next, use one of the following
  2184. two commands.
  2185.  
  2186. 1.27.1 Change Default Eol (A-e)
  2187.  
  2188. Alt-e changes Uedit's current eol.  It does not alter the text in the buffer.
  2189. It asks for the ASCII value (normally 10 or 13) of the new eol you wish to
  2190. use.  (The default eol in the standard config is the linefeed, ASCII 10).
  2191. Type in 10 (lf) or 13 (cr) for the new eol and press ESC.
  2192.  
  2193. Note that after changing the default eol, buffers that are not using the new
  2194. eol will display All On One Line.  The only line terminators in those buffers
  2195. will be formfeeds, if any formfeeds are present.
  2196.  
  2197. 1.27.2 Change Default Eol and Eols in Text (C-e)
  2198.  
  2199. C-e changes both Uedit's default eol and the eols in curFile.  Most of the
  2200. time, you will use C-e to convert non-standard eols in files to Uedit's
  2201. current eol.  C-e asks first for the ASCII value of the non-standard eols in
  2202. the text, so that it can find and convert them.  To find out what they are,
  2203. put the cursor on one of the box characters and press C-/.  Then type in
  2204. their ASCII value and press ESC.
  2205.  
  2206. Next it asks for the ASCII value of the new eol to convert to.  Here you
  2207. would typically just type in the current eol value (10) and press ESC.  Then
  2208. it searches curFile, changing non-standard eols to the (possibly new) current
  2209. eol.
  2210.  
  2211. Example:  If you load in a file that uses carriage returns (ASCII 13) as
  2212. eols, the file displays all on one line.  Press C-e and answer 13 in response
  2213. to the first question and 10 in response to the second question.  C-e
  2214. converts the carriage returns (13) to linefeeds (10).  It does not change
  2215. Uedit's current eol (10), so other buffers will still display correctly.
  2216.  
  2217. CR-LF:  If you require an eol that is both carriage return and linefeed, you
  2218. can install the carriage returns in several ways.  One method is to use
  2219. search and replace.  Another is to use Learn Mode and C-c.  Another is to
  2220. write a simple command that inserts the carriage returns.  Still another is
  2221. to insert the carriage returns by hand using C-c.  (See Learn Mode, 1.35, and
  2222. Embed Control Character, 1.32.10.)
  2223.  
  2224. 1.28 Miscellaneous Commands
  2225.  
  2226. The following are miscellaneous commands.
  2227.  
  2228. 1.28.2 Cycle Counter (SA-c)
  2229.  
  2230. SA-c counts the number of successful executions of the next function key that
  2231. you press.  Example:  Typing SA-c and F9 (to search forward) causes
  2232. continuous searching until search fails.  The message line then reports the
  2233. number of successful searches.
  2234.  
  2235. Another useful example is counting the number of words in a file:  Press SA-c
  2236. and then kp6 (Cursor Word Right).  This counts the number of words in curFile
  2237. from the cursor to eof.  Using kp2 or A-kp6, instead of kp6, would count the
  2238. number of lines to eof.
  2239.  
  2240. 1.28.3 Command Multiplier (C-m)
  2241.  
  2242. C-m asks for the command multiplier value.  Type in a number followed by ESC.
  2243. Then the next input you give is multiplied using the command multiplier.
  2244. Command multiplier is often used to run learned sequences multiple times, but
  2245. it has many other uses.  If you give a very large number and it takes too
  2246. long to run out, press Amiga-ESC to abort the multiple executions.
  2247.  
  2248. 1.28.4 Speak Hilite (A-s)
  2249.  
  2250. A-s speaks the hilited region using the SPEAK: device.  The SPEAK: device
  2251. must be mounted in order for speaking to work.  (See AmigaDOS, 1.14.)
  2252.  
  2253. 1.28.5 Name Gadget (C-esc)
  2254.  
  2255. C-esc asks for the number (1-4) of a gadget to be named.  Then it asks for
  2256. the new gadget name.  Type in the name and ESC.  Gadget names may be up to 19
  2257. characters in length.  Use Mark Gadgets (C-g) to turn on/off the gadget names
  2258. and markings in the message line.
  2259.  
  2260. 1.28.6 Set Idle Time (SAC-i)
  2261.  
  2262. SAC-i asks for the interval, in tenths of a second, to set idleTime to.
  2263. idleTime determines how soon after each pause the Idle command is run.  The
  2264. default idleTime is 10 seconds (100 tenths of a second).  If you have
  2265. selected Save On Idle (C-f2) for certain files, after a 10 second pause the
  2266. changed files are saved to disk.  (See Idle Key and Idle Time, 2.18.)
  2267.  
  2268. 1.28.7 See Number Variable (A-8)
  2269.  
  2270. A-8 asks for the number (0-99) of the number variable you wish to examine.
  2271. It displays the value stored in that number variable.  (See Integer Variables
  2272. N0 to N99, 2.22)
  2273.  
  2274. The number variable usage in the standard configuration is as follows:
  2275.  
  2276. n31-n99 = available for use commands
  2277.     (the n99 number stack is used for scratch stacking, but the variable n99
  2278.     is not in use anywhere)
  2279. n0-n19 = scratch variables, used everywhere for temporary purposes
  2280.  
  2281. n20 = delay time
  2282. n21 = arithmetic total
  2283. n22 = #cycles in cycle counter
  2284. n23 = macroNum to be run in cycle counter
  2285. n24 = split window size for hyper text
  2286. n25 = hyper word index value
  2287. n26 = used by REXX
  2288. n27 = REXX action/result
  2289. n28 = REXX flag
  2290. n29 = REXX return code
  2291. n30 = bookmark number
  2292.  
  2293. 1.28.8 Set Number Variable (A-9)
  2294.  
  2295. A-9 asks for the number (0-99) of the number variable to be set.  Type in the
  2296. number (0-99) and ESC.  Next it asks for the value to store in the number
  2297. variable.  Type in the value and press ESC.  (See Integer Variables N0 to
  2298. N99, 2.22)
  2299.  
  2300. 1.28.9 About... (SAC-a)
  2301.  
  2302. SAC-a displays Uedit's About... message.
  2303.  
  2304. 1.28.10 Delay (A-d)
  2305.  
  2306. A-d causes a delay of n46 tenths of a second, where the value stored in n46
  2307. is set using Set Delay (SA-d) below.  Delays may be used in learned sequences
  2308. to create desired results, such as preventing printer buffer overflow due to
  2309. serial-line handshaking problems or slowing down display updates.  Delays are
  2310. also helpful in debugging complicated commands and learned sequences.
  2311.  
  2312. 1.28.11 Set Delay (SA-d)
  2313.  
  2314. SA-d asks for the delay interval, in tenths of a second, to store in n46.
  2315. Type in the value and press ESC.  n46 determines how long the Delay (A-d)
  2316. command will delay.
  2317.  
  2318. 1.28.12 Toggle Hex/Decimal (C-x)
  2319.  
  2320. C-x toggles the number under the cursor between decimal and hexadecimal
  2321. integer format.  This is useful to programmers.
  2322.  
  2323. 1.28.13 Show ASCII (C-/)
  2324.  
  2325. C-/ displays the ASCII value of the character under the cursor and advances
  2326. the cursor to the next character.
  2327.  
  2328. 1.28.14 Goto Line N (C-n)
  2329.  
  2330. C-n asks for the line number in the text to go to.  This is useful to
  2331. programmers.
  2332.  
  2333. 1.28.15 Line Sort (SA-s)
  2334.  
  2335. SA-s sorts the lines in the current buffer alphabetically.
  2336.  
  2337. 1.28.16 Init Marks(S-gadget4)
  2338.  
  2339. S-gadget4 initializes the 8 bookmarks for curFile to the following locations:
  2340. start of file, end of file, start of hilite, end of hilite, start of invert,
  2341. end of invert, locA, and locB.  (See Locations and Regions, 2.12.)
  2342.  
  2343. 1.28.17 Goto Mark (S-gadget1)
  2344.  
  2345. S-gadget1 displays the 8 bookmark selections in the title bar and lets you
  2346. click the bookmark you wish to go to; you may also press F1-F8 to select the
  2347. bookmark.  Press any other key or click below the message line, if you don't
  2348. wish to make a selection.
  2349.  
  2350. 1.28.18 Goto Next Mark (S-gadget2)
  2351.  
  2352. S-gadget2 moves the cursor to the next bookmark.  This is useful for browsing.
  2353.  
  2354. 1.28.19 Set Mark (S-gadget3)
  2355.  
  2356. S-gadget3 lets you rename a bookmark and make it point to the cursor's
  2357. present location.  It displays the 8 bookmark names.  Click the bookmark name
  2358. you wish to edit and move the location of.  Press ESC or click the mouse when
  2359. finished.  The bookmark now points to the cursor's present location.
  2360.  
  2361. 1.29 Hilite and Invert Regions
  2362.  
  2363. In the standard config, there are 4 ways of doing cut & paste operations
  2364. using the commands provided.  (There could be many more ways, using the CL.)
  2365. Most of the time you will do cut & paste using scratch deletes and Undo at
  2366. the cursor.  For large regions, you will probably do cut & paste using hilite
  2367. or invert colored regions.  And you can do columnar-text cut & paste using
  2368. columnar display mode and a hilite region.  (See Scratch Deletes and Undo
  2369. Deletes, 1.25.  See Columnar, 1.40.)
  2370.  
  2371. Hilite and invert regions use distinct colors, based on the color combination
  2372. you are using.  If you are using a 1-bitplane screen, which allows only 2
  2373. colors, hilite and invert regions are both displayed in inverse video and are
  2374. indistinguishable.  (See Color Combinations (A-Help), 1.30.6.  See Display
  2375. Modes, 1.39.)
  2376.  
  2377. For a hilite or invert region to exist, the end of the region must come after
  2378. the start of the region.  If the locations are equal or the ending location
  2379. comes first, no region exists.  When a region is defined, the starting
  2380. location is included in the region, but the ending location is the first
  2381. character just after the region.  Example:  To hilite a word, mark the first
  2382. letter in the word as the start-of-hilite.  Mark the first character after
  2383. the word as the end-of-hilite.
  2384.  
  2385. If columnar display mode is On, hilite and invert regions are displayed as
  2386. rectangular in shape.  You cannot do the regular cut & paste operations
  2387. described here, if columnar display mode is On.  To use what is described
  2388. here, turn Off columnar display mode.  Also when columnar display mode is On,
  2389. non-columnar hilite or invert regions may not be visible, even though they do
  2390. exist; this is because for columnar display mode to display a region, the end
  2391. of the region must be in a higher column than the start of the region.  (See
  2392. Columnar, 1.40.)
  2393.  
  2394. Hilite and invert regions may be defined using the mouse or the keypad keys.
  2395. When a hilite region is copied, the copy is stored in buffer 47.  (Copied
  2396. columnar hilite regions are stored in buffer 37.)  Copied invert regions are
  2397. stored in buffer 46.  The contents of these buffers may be monitored
  2398. continuously by displaying them in split windows.  (See Split Windows, 1.42.)
  2399.  
  2400. 1.29.1 Set Start-of-Hilite (S-buttonDown)
  2401.  
  2402. Position the mouse cursor in the text where the start-of-hilite is to be.
  2403. Press the Shift key and click the left mouse button.
  2404.  
  2405. 1.29.2 Set End-of-Hilite (A-buttonDown)
  2406.  
  2407. Position the mouse cursor in the text where the end-of-hilite is to be.
  2408. Press the Alt key and click the left mouse button.
  2409.  
  2410. 1.29.3 Drag Mouse for Hilite (SAC-buttonDown)
  2411.  
  2412. Position the mouse cursor where either end of hilite is to be.  Press Shift,
  2413. Alt, and Ctrl.  Press the left mouse button and drag the mouse to the other
  2414. end of the desired hilite region.  Release the button.
  2415.  
  2416. 1.29.4 Set Start-of-Invert (SC-buttonDown)
  2417.  
  2418. Position the mouse cursor where the start-of-invert is to be.  Press Shift
  2419. and Ctrl and click the left mouse button.
  2420.  
  2421. 1.29.5 Set End-of-Invert (AC-buttonDown)
  2422.  
  2423. Position the mouse cursor where the end-of-invert is to be.  Press Alt and
  2424. Ctrl and click the left mouse button.
  2425.  
  2426. 1.29.6 Set Start-of-Hilite at Cursor (kp1)
  2427.  
  2428. Kp1, S-kp1, and A-kp1 each set the start-of-hilite at the cursor location.
  2429.  
  2430. 1.29.7 Set End-of-Hilite at Cursor (kp3)
  2431.  
  2432. Kp3, S-kp3, and A-kp3 each set the end-of-hilite at the cursor location.
  2433.  
  2434. 1.29.8 Set Start-of-Invert at Cursor (C-kp1)
  2435.  
  2436. C-kp1 sets the start-of-invert at the cursor location.
  2437.  
  2438. 1.29.9 Set End-of-Invert at Cursor (C-kp3)
  2439.  
  2440. C-kp3 sets the end-of-invert at the cursor location.
  2441.  
  2442. 1.29.10 Uncolor Hilite (A-h)
  2443.  
  2444. A-h uncolors the hilite region by making the start and end locations equal.
  2445. Afterward, no region exists.
  2446.  
  2447. 1.29.11 Uninvert (A-i)
  2448.  
  2449. A-i uncolors the invert region by making the start and end locations equal.
  2450. Afterward, no region exists.
  2451.  
  2452. 1.29.12 Clear Hilite (C-h)
  2453.  
  2454. C-h deletes the hilite region.  No copy is made!
  2455.  
  2456. 1.29.13 Clear Invert (C-i)
  2457.  
  2458. C-i deletes the invert region.  No copy is made!
  2459.  
  2460. 1.29.14 Copy Hilite (kpDot)
  2461.  
  2462. kpDot, S-kpDot, and A-kpDot store a copy of the hilite region.  If no region
  2463. exists, nothing is done.
  2464.  
  2465. If columnar display mode is Off, the region is stored in buffer 47.  If
  2466. columnar display mode is On, the rectangular (columnar) region is stored in
  2467. buffer 37.  Thus, kpDot, kpMinus, and kpEnter handle copy/cut/paste for
  2468. either normal or columnar hilite regions, depending on the setting of
  2469. columnar display mode.
  2470.  
  2471. 1.29.15 Cut Hilite (kpMinus)
  2472.  
  2473. kpMinus, S-kpMinus, and A-kpMinus copy and then delete the hilite region.  If
  2474. no region exists, nothing is done.
  2475.  
  2476. The discussion above for kpDot also applies to kpMinus:  If columnar display
  2477. mode is Off, kpMinus cuts the non-columnar hilite region and stores it in
  2478. buffer 47.  If columnar display mode is On, kpMinus cuts a columnar region,
  2479. if a columnar region exists, and the copy is stored in the columnar buffer
  2480. (buffer 37).  Thus kpMinus serves a dual purpose which depends on the setting
  2481. of columnar display mode.
  2482.  
  2483. 1.29.16 Paste Hilite (kpEnter)
  2484.  
  2485. kpEnter, S-kpEnter, and A-kpEnter insert the copied hilite region at the
  2486. cursor.  After the region is inserted, it is hilited.  Thus it can be removed
  2487. by pressing kpMinus (cut) or C-h (clear).
  2488.  
  2489. The discussion above for kpDot and kpMinus also applies to kpEnter:  If
  2490. columnar display mode is Off, the non-columnar copied hilite in buffer 47 is
  2491. inserted at the cursor.  If columnar display mode is On, kpEnter inserts the
  2492. contents of the columnar buffer (buffer 37).
  2493.  
  2494. 1.29.17 Shift Hilite Right (A-r)
  2495.  
  2496. A-r shifts the hilite region to the right by one space.
  2497.  
  2498. 1.29.18 Shift Hilite Left (A-l)
  2499.  
  2500. A-l shifts the hilite region left by one space.
  2501.  
  2502. 1.29.19 Copy Invert (C-kpDot)
  2503.  
  2504. C-kpDot stores a copy of the invert region in buffer 46.  If columnar display
  2505. mode is On, no copy is made and a requester asks you to turn Off columnar
  2506. display mode.
  2507.  
  2508. 1.29.20 Cut Invert (C-kpMinus)
  2509.  
  2510. C-kpMinus copies and then deletes the invert region.  If columnar display
  2511. mode is On, no action is taken and a requester asks you to turn Off columnar
  2512. display mode.
  2513.  
  2514. 1.29.21 Paste Invert (C-kpEnter)
  2515.  
  2516. C-kpEnter inserts the copied invert buffer (buffer 46) at the cursor.  After
  2517. the insertion, the text is inverse-displayed and can be removed by pressing
  2518. C-kpMinus (cut) or C-i (clear).  If columnar display mode is On, no action is
  2519. taken and a requester asks you to turn Off columnar display mode.
  2520.  
  2521. 1.30 Local Values
  2522.  
  2523. The global values used by Uedit, such as lineLength and Colors, are set
  2524. initially using the config defaults when you compile the config or compile
  2525. just the config defaults, and they are stored in the data file.  (See the
  2526. Config! file.)
  2527.  
  2528. The following global values have counterparts which are local to each buffer
  2529. in Uedit, so that each buffer can use its own values for these:  lineLength,
  2530. pageLines (lines per page), leftMargin, topMargin, bottomMargin, and tabTable
  2531. (tab ruler number, 0-4).
  2532.  
  2533. Most of the above local values can be set using the Line-Page menu.  To see
  2534. the current local values, select Show Vals (S-Help).  For the initial
  2535. settings of global numerical values, see the defaults in Config!.  (Also see
  2536. the CL argument lists in 3.1.)
  2537.  
  2538. When a local value is changed, it does not change the corresponding global
  2539. value.  For example, when lineLength is set to 70 in curFile, new files
  2540. loaded in and new buffers created will not inherit the lineLength of 70.  To
  2541. change the global values inherited by new files loaded in and new buffers,
  2542. edit the defaults in the Config! file.
  2543.  
  2544. Technical note:  topMargin and bottomMargin are not used internally by Uedit.
  2545. Any use of them is strictly by the customizable commands in the config.
  2546. Other local and global variables like lineLength, pageLines, and leftMargin
  2547. are used internally, however.  See the discussions below.
  2548.  
  2549. Technical note:  Whether the corresponding global value is changed or not
  2550. when the local value is changed depends on how the customizable commands are
  2551. written.  The setLocal() CL function changes only the local value, such as
  2552. the local lineLength.  To change the global lineLength, the global variable
  2553. lineLength must be given a new value.  This is unlike the case for local
  2554. flags, where if you toggle a local flag such as wordWrap using flipFlag(), it
  2555. also toggles the corresponding global flag.  However, changing a local flag
  2556. by clicking its flag-letter in the title bar does not change the
  2557. corresponding global flag.  (See Local Modes, 1.30.  See Local and Global
  2558. Integer and Flag Variables, 2.23.)
  2559.  
  2560. 1.30.1 LineLength (C-Return)
  2561.  
  2562. C-Return asks for the new lineLength value for curFile to use.  Type in the
  2563. lineLength (1 to 9999 characters per line) and press ESC.  The lineLength
  2564. determines when word-wrapping is to occur and is used in paragraph
  2565. reformatting and in right-justification.  If lineLength is set too high, the
  2566. window jerks, as you type long lines, in order to keep the cursor visible.
  2567. By increasing the pixel-width of the Workbench screen, you can display longer
  2568. lines.  (See WordWrap, RightJustify, and Reformat Paragraph in 1.31.)
  2569.  
  2570. 1.30.2 PageLines (A-g)
  2571.  
  2572. A-g asks for the new lines-per-page value for curFile to use.  Type in the
  2573. pageLines value (typically 66 lines per printed page) and press ESC.
  2574. PageLines is used in finding page boundaries when there are no formfeeds to
  2575. go by and line-count must be used.  It is used in computing page and row in
  2576. the page/row/column display when Row/Column (C-2) is turned On.  It is used
  2577. internally in all page-related calculations.
  2578.  
  2579. 1.30.3 LeftMargin (L-k)
  2580.  
  2581. L-k asks for the new leftMargin value for curFile to use.  Type in the
  2582. leftMargin value (0 to 255) and press ESC.
  2583.  
  2584. When leftMargin is 0, Uedit uses the autoIndent flag if it is On.  When
  2585. leftMargin is not 0, Uedit ignores the autoIndent flag and uses leftMargin
  2586. instead.
  2587.  
  2588. When leftMargin is 0 and autoIndent is On, auto-indenting is used and, after
  2589. word-wrapping or if you type Return, the new line gets the same indentation
  2590. as the old line.  When leftMargin is not zero, autoIndent is ignored and
  2591. leftMargin determines the indentation of the next line; when leftMargin is 1,
  2592. the next line gets no indentation.
  2593.  
  2594. When trueTabs is On, indentations are created using tab characters up to the
  2595. closest tab stop and spaces fill any residual.  When trueTabs is Off,
  2596. indentations are created using only spaces.
  2597.  
  2598. Paragraph reformatting indents paragraphs using leftMargin, if leftMargin is
  2599. non-zero.  If leftMargin is 0 and autoIndent is On, paragraph reformatting
  2600. uses autoIndent.  (See Reformat Paragraph, 1.33.1.)
  2601.  
  2602. 1.30.4 TopMargin (L-u)
  2603.  
  2604. L-u asks for the new topMargin value for curFile to use.  Input the new
  2605. topMargin value (0 to 255) and press ESC.  TopMargin is used by paging
  2606. commands as the number of blank lines to insert after the formfeed when
  2607. creating page divisions.  (See Paging, 1.41.)
  2608.  
  2609. 1.30.5 BottomMargin (L-l)
  2610.  
  2611. L-l asks for the new bottomMargin value for curFile to use.  Input the new
  2612. bottomMargin value (0 to 255) and press ESC.  BottomMargin is used by paging
  2613. commands to determine the number of blank lines to insert before the formfeed
  2614. when creating page divisions.  (See Paging, 1.41.)
  2615.  
  2616. 1.30.6 Colors (A-Help)
  2617.  
  2618. There are 16 sets of foreground and background colors, which are used for
  2619. displaying normal text, the cursor, hilite and invert regions, etc.  The
  2620. following color table appears in the Config! defaults and is displayed when
  2621. you use Colors (A-Help):
  2622.  
  2623. Colors:  (values must be 0-3, corresponding to RGB color register numbers)
  2624.                                 fg      bg
  2625.     ((local colors for buffers))
  2626.     0  normal text              <1>     <0>
  2627.     1  cursor                   <1>     <2>
  2628.     2  hilite                   <1>     <3>
  2629.     3  cursor+hilite            <3>     <1>
  2630.     4  inverse                  <0>     <1>
  2631.     5  cursor+inverse           <0>     <2>
  2632.     6  hilite+inverse           <3>     <1>
  2633.     7  cursor+hilite+inverse    <0>     <3>
  2634.     ((screen colors))
  2635.     8  title bar                <1>     <3>
  2636.     9  msg line                 <2>     <0>
  2637.     10 menus                    <1>     <3>
  2638.     11 tab ruler                <1>     <2>
  2639.     12 requester                <1>     <2>
  2640.     13 formfeed                 <1>     <2>
  2641.     14 spare1                   <0>     <1>
  2642.     15 spare2                   <0>     <2>
  2643.  
  2644. The color values in the table must be in the range 0 to 3, corresponding to
  2645. one of the 4 RGB color register numbers for a 2-bitplane screen.
  2646.  
  2647. Each buffer uses its own colors.  When a new file is loaded or a new buffer
  2648. is created, it picks up the current color combination, which is the most
  2649. recent combination that you have selected.  Different files may use different
  2650. color combinations.  When selecting colors, it is helpful to create partially
  2651. overlapping hilite and invert regions in the text, so that you can see what
  2652. they will look like as you adjust the local colors.  Also, after you change
  2653. the menu colors, examine the menus to see their coloring.
  2654.  
  2655. When using only a 1-bitplane screen, only 2 colors are available for each
  2656. item in the color table.  In that event, Uedit uses colors 0 and 1,
  2657. foreground and background, respectively, for normal text and the message
  2658. line, and it uses the reverse, colors 1 and 0, for the other 14 items in the
  2659. color table.
  2660.  
  2661. When satisfactory color settings have been found, the colors can be saved in
  2662. the data file by using Save Data (A-f6).
  2663.  
  2664. 1.30.6.1 Tune RGB (A-esc)
  2665.  
  2666. You may use RGB color tuning to adjust each of the 4 color registers, and
  2667. this also affects the 2 colors used with 1-bitplane screens.  RGB tuning
  2668. affects all screen types.
  2669.  
  2670. Alt-esc lets you tune the RGB colors using the unshifted and shifted arrow
  2671. keys.  As a color register is modified, the new colors are used and you can
  2672. see the results.  ESC or "q" or clicking the left mouse-button ends the RGB
  2673. tuning session, and the new colors are used.  Any other key input causes the
  2674. original colors to be restored.
  2675.  
  2676. When satisfactory RGB colors have been found, the settings can be saved in
  2677. the data file by using Save Data (A-f6).  Also you can write down the color
  2678. values while using Tune RGB and put them into your config's defaults, so that
  2679. they become the standard colors.  The RGB color values currently in Config!
  2680. are:  (Note that this may be changed without notice.)
  2681.  
  2682. Red     Green   Blue
  2683. <0>     <5>     <10>    Register 0
  2684. <15>    <15>    <15>    Register 1
  2685. <15>    <9>     <0>     Register 2
  2686. <0>     <9>     <15>    Register 3
  2687.  
  2688. 1.30.6.2  Color Sets 1, 2, & 3
  2689.  
  2690. In the RGB colors menu are 3 selections for different RGB color settings.
  2691. The 3 color settings are assigned to keys which cannot be input from the
  2692. keyboard; they must be selected from the menu.  When a different RGB color
  2693. setting is selected, it takes effect immediately.
  2694.  
  2695. Technical note:  The 3 color settings are assigned to the L-esc, R-esc, and
  2696. virtual-esc keys, respectively.  To change the color selections, modify the
  2697. setRGB() arguments and recompile the commands in Config!Z.  (See setRGB() in
  2698. Part 3.)
  2699.  
  2700. 1.30.7 TabTable (SAC-tab)
  2701.  
  2702. SAC-tab asks for the new tab ruler number for curFile to use.  Input the tab
  2703. ruler number (0 to 4) and press ESC.  (See Tabs and Tab Rulers, 1.26.)
  2704.  
  2705. 1.31 Local Modes
  2706.  
  2707. Local modes (flags) are local to each file or buffer.  The Local Modes menu
  2708. shows the modes for curFile.  If a mode is On, it is checkmarked in the menu.
  2709.  
  2710. Local modes have a corresponding global-flag counterpart.  When a new file is
  2711. loaded in, it picks up the current global flags.  The global flags are set
  2712. initially in the config defaults.  When a local mode is turned On or Off
  2713. during an edit session, its global flag counterpart is set to the same value.
  2714. For example, if you turn wordWrap Off, the global wordWrap flag is turned Off
  2715. and future files loaded in will not use wordWrap.  You may change the global
  2716. flags either by changing the local mode in the Local Modes menu or by
  2717. customizing and recompiling the config defaults.  (See the commands discussed
  2718. below.  See Compile Config Defaults (AC-f6), 1.37.2.)
  2719.  
  2720. Technical note:  The Changed, ReadOnly, Favorite, UserLocalA, and UserLocalB
  2721. flags do not have a global-flag counterpart, because they apply strictly to
  2722. individual files.  When a file is modified, its Changed flag is automatically
  2723. turned On.  When you load a duplicate of a file already in Uedit, its
  2724. readOnly flag is turned On automatically.  The Favorite flag enables you to
  2725. tag any file as a "favorite" and toggle only through favorites by using the
  2726. toggle() CL function.  The userLocal flags are available for custom purposes;
  2727. in the standard config the userLocalA flag is used for tagging files to Save
  2728. On Idle.  (See Save On Idle (C-f2), 1.31.10.  See the argument lists in 3.1
  2729. and the CL functions toggle(), flipFlag(), and getFlag() in 3.4.)
  2730.  
  2731. 1.31.1 Overstrike (S-f5)
  2732.  
  2733. S-f5 toggles On/Off overStrike typing mode in curFile.  When overStrike is
  2734. On, typing overstrikes the characters under the cursor until eol is reached.
  2735. At eol, it uses insert typing mode until the line wraps (if wordWrap is On)
  2736. or you press Return or move the cursor.  (Primitive Mode ignores the
  2737. overStrike flag and uses insert mode only.  See Primitive Mode, 1.7.)
  2738.  
  2739. 1.31.2 WordWrap (C-f5)
  2740.  
  2741. C-f5 toggles On/Off wordWrap typing mode in curFile.  When wordWrap is On,
  2742. lines wrap automatically when the lineLength value is exceeded.  Word-
  2743. wrapping wraps only on a space, tab, hyphen "-", or a slash "/" character.
  2744. (See LineLength (C-Return), 1.30.1.)
  2745.  
  2746. 1.31.3 RightJustify (A-j)
  2747.  
  2748. A-j toggles On/Off rightJustify typing mode in curFile.  When rightJustify is
  2749. On, lines are right-justified when word-wrapping occurs.  Right-justification
  2750. does not occur when Return is pressed, because to do so would cause
  2751. inconvenience to programmers.  To restore proper right-justification to
  2752. paragraphs that have been modified, use Reformat Paragraph (C-3).
  2753.  
  2754. Right-justification is achieved by putting extra spaces between words.
  2755. Spaces are added starting from one end, and then on the next line starting
  2756. from the opposite end.  If more than one fourth of a line would have to be
  2757. space-filled, it is not right-justified.
  2758.  
  2759. 1.31.4 AutoIndent (A-f5)
  2760.  
  2761. A-f5 toggles On/Off autoIndent typing mode in curFile.  When autoIndent is
  2762. On, word-wrapping or pressing Return causes the new line to use the same
  2763. amount of indentation as the current line.
  2764.  
  2765. If Use Tabs is On, Tab characters are used in the indentation where possible
  2766. and any residual is filled with spaces.  If useTabs is Off, only spaces are
  2767. used.  (See Tabs and Tab Rulers, 1.26.)
  2768.  
  2769. If leftMargin is non-zero, it overrides autoIndent and the new line's
  2770. indentation is equal to the leftMargin value.  (See Reformat Paragraph,
  2771. 1.33.1.  See LeftMargin, 1.30.3.)
  2772.  
  2773. 1.31.5 ReadOnly (SA-f5)
  2774.  
  2775. SA-f5 toggles On/Off the readOnly status of curFile.  If a file's readOnly
  2776. flag is On, the file may not be changed or saved to disk.  If a duplicate of
  2777. a file already in Uedit is loaded in, Uedit sets it to readOnly status
  2778. automatically.
  2779.  
  2780. 1.31.6 Changed (L-f5)
  2781.  
  2782. L-f5 toggles On/Off the Changed status of curFile.  Uedit turns On the
  2783. Changed flag, when a buffer is modified.  The status of the Changed flag
  2784. determines whether you will be asked if you want to save the file when you
  2785. close it and whether it will be saved automatically if Save On Idle (C-f2) or
  2786. Save Changes (A-f2) is used.  Note:  If you turn Off the Changed flag, be
  2787. aware that Uedit will not then save it automatically or even ask whether you
  2788. want it saved.
  2789.  
  2790. 1.31.7 Use Tabs (AC-tab)
  2791.  
  2792. AC-tab toggles On/Off the trueTabs flag of curFile.  If trueTabs is On, when
  2793. you press the Tab key, a tab character (ASCII 9) is typed in.  When trueTabs
  2794. is Off and you press the Tab key, spaces are inserted up to the next tab
  2795. stop.  (See Tabs and Tab Rulers, 1.26.)
  2796.  
  2797. When trueTabs is On, autoIndent and leftMargin use tabs in creating
  2798. indentations.  When trueTabs is Off, only spaces are used.
  2799.  
  2800. 1.31.8 AutoBackup (SAC-f5)
  2801.  
  2802. SAC-f5 toggles On/Off the autoBackup flag of curFile.  If autoBackup is On,
  2803. the first time curFile is saved to disk the original file on disk is renamed
  2804. with a "BAK" file-name extension; if a "BAK" version already exists, it is
  2805. deleted.  Then curFile is saved to disk; curFile's BackedUp (internal only)
  2806. flag is turned On, so that the "BAK" version is not disturbed when you save
  2807. curFile again later on.
  2808.  
  2809. 1.31.9 Map Illegals (SA-m)
  2810.  
  2811. SA-m toggles On/Off the mapChars flag of curFile.  Uedit reserves 4
  2812. characters (ASCII values 0 to 3) for internal use only.  No buffer is allowed
  2813. to contain these characters in the text.  These characters are mapped to
  2814. legal character values, however, if mapChars is On.
  2815.  
  2816. When (the global flag for) mapChars is On, you can load files with illegal
  2817. characters in them or type in illegal control characters.  The illegals are
  2818. mapped to the legal alternatives that are specified in the map-illegals table
  2819. in the config defaults.  When you save a file that has mapChars turned On,
  2820. any mapped characters in it are converted back to their illegal ASCII 0 to 3
  2821. values as the file is saved; in printing, the mapped characters are converted
  2822. as the text is printed.  In the table in the standard config's defaults,
  2823. ASCII 0-3 are mapped to ASCII 128-131, respectively.  (See the Config! file.
  2824. See Compile Config Defaults, 1.37.2.)
  2825.  
  2826. When mapChars is Off, you cannot embed illegal control characters (ASCII 0-3,
  2827. which are Ctrl-@ and Ctrl-a through Ctrl-c) using Embed Control Character (C-
  2828. c).  And if you try to load a file with illegals in it, Uedit asks whether it
  2829. can wipe them or not.  If you answer No, it does not load the file.  If you
  2830. answer Yes, it converts illegals to the "@" character.
  2831.  
  2832. 1.31.10 Save On Idle (C-f2)
  2833.  
  2834. C-f2 toggles the userLocalA flag On/Off.  If Save On Idle is checkmarked
  2835. (userLocalA flag is On), and if you pause in your typing for idleTime tenths
  2836. of seconds, and if the file has been changed, it is automatically saved to
  2837. disk.  (See Set Idle Timer, 1.28.6.  See Idle Key and IdleTime, 2.18.)
  2838.  
  2839. 1.32 Editing
  2840.  
  2841. The following commands are useful in general editing.  Also see Scratch
  2842. Deletes and Undo Deletes, Miscellaneous Commands, Local Modes, Formatting,
  2843. and Paging.
  2844.  
  2845. 1.32.1 Join Lines (C-j)
  2846.  
  2847. C-j joins the cursor line with the next line.  It deletes all leading spaces
  2848. and tabs in the next line, adding only one space where the lines are joined.
  2849. The cursor is left at the joining of the lines.  (See Reformat Paragraph (C-
  2850. 3), 1.33.1.)
  2851.  
  2852. 1.32.2 Trim Spaces (A-c)
  2853.  
  2854. A-c trims the extra spaces between the next two words after the cursor,
  2855. leaving only 1 space.  The cursor is left at the next non-white character
  2856. after the spaces that were removed.
  2857.  
  2858. 1.32.3 Toggle Case (C-f)
  2859.  
  2860. C-f flips the upper/lower case of the alpha character under the cursor and
  2861. advances the cursor.  Non-alpha characters are undisturbed.
  2862.  
  2863. 1.32.4 To Upper Case (C-u)
  2864.  
  2865. C-u converts the alpha character under the cursor to upper case and advances
  2866. the cursor.  Non-alpha characters are undisturbed.
  2867.  
  2868. 1.32.5 To Lower Case (C-l)
  2869.  
  2870. C-l converts the alpha character under the cursor to lower case and advances
  2871. the cursor.  Non-alpha characters are undisturbed.
  2872.  
  2873. 1.32.6 Clear Leading White (A-1)
  2874.  
  2875. A-1 clears the leading white space in the cursor line.  The cursor position
  2876. is not changed.
  2877.  
  2878. 1.32.7 Center Line (A-2)
  2879.  
  2880. A-2 centers the cursor line horizontally, based upon the current, local
  2881. lineLength value.  The cursor is left at the beginning of the centered text.
  2882.  
  2883. 1.32.8 Right Align Line (A-5)
  2884.  
  2885. A-5 right-aligns the text in the cursor line from the cursor forward.  Text
  2886. coming before the cursor is not moved.  The right-alignment uses the current,
  2887. local lineLength value.  The cursor is left at the beginning of the shifted
  2888. text.
  2889.  
  2890. 1.32.9 Match Indent (A-4)
  2891.  
  2892. A-4 shifts the cursor line to match its indentation with the previous line.
  2893. The cursor is left at the beginning of the next line.
  2894.  
  2895. 1.32.10 Embed Control Character (C-c)
  2896.  
  2897. Control characters may be typed-in directly in Primitive Mode.  For instance,
  2898. to search for carriage returns, select Set Search (f7) to input the search
  2899. text and type C-m to insert an ASCII 13 (CR).  (Note that pressing Return or
  2900. Enter instead of C-m would input a linefeed (10), not a CR (13), unless you
  2901. have changed the default eol character.)
  2902.  
  2903. Control characters cannot be typed directly in normal edit mode, because they
  2904. are often used as function keys.  To embed a control character, type C-c and
  2905. then the desired character.  The CTRL key need not be used; C-c followed by
  2906. "z" does the same thing as C-c followed by C-z; both insert ASCII 26 (Ctrl-z)
  2907. at the cursor.
  2908.  
  2909. Control characters may appear as a "box" character in the text (depending on
  2910. the font).  You may make control characters invisible by turning Off the
  2911. Invisibles flag (C-v).  To identify the ASCII value of a any character such
  2912. as a "box" character, put the cursor on it and press C-/.  (See Map Illegals
  2913. (SA-m), 1.31.9.)
  2914.  
  2915. 1.32.11 Open for Typing (S-bs, A-bs, S-Del, A-del, C-o)
  2916.  
  2917. The following commands open a space, putting the cursor in the opened space
  2918. ready for typing:  S-bs (S-BACKSPACE) opens a space in front of the word that
  2919. the cursor is in.  A-bs opens a line for typing above the cursor line.  S-DEL
  2920. opens a space at the cursor for typing.  A-DEL opens a line under the cursor
  2921. line for typing.  C-o opens the cursor line for typing.
  2922.  
  2923. 1.33 Formatting
  2924.  
  2925. For other types of formatting commands, see Tabs To Spaces (1.26.5), Spaces
  2926. To Tabs (1.26.6), and Paging (1.41).
  2927.  
  2928. 1.33.1 Reformat Paragraph (C-3)
  2929.  
  2930. C-3 reformats the cursor paragraph, starting at the cursor line.  If the
  2931. cursor is in a blank line, the next paragraph after the cursor is
  2932. reformatted.  A paragraph is determined by its indentation:  The first line
  2933. of the paragraph may have more indentation than the lines after it.  After
  2934. the first line, all non-blank lines with equal indentation are taken as part
  2935. of the paragraph.  When the indentation changes or a blank line is
  2936. encountered, the paragraph is deemed ended.
  2937.  
  2938. Paragraph reformatting uses curFile's local values for rightJustify,
  2939. lineLength, autoIndent (or leftMargin, if it is not 0), tabTable, and
  2940. trueTabs.  Paragraph reformatting turns wordWrap On temporarily, if it is not
  2941. already On.  AutoIndent, leftMargin, and trueTabs are used in the same way
  2942. that they are for typing:  That is, if leftMargin is non-zero, it overrides
  2943. autoIndent.  If trueTabs is On, any indentation that is required is put in
  2944. using tab characters; if trueTabs is Off, space characters are used.  (See
  2945. Local Modes (1.31), AutoIndent (1.31.4), and LeftMargin (1.30.3).)
  2946.  
  2947. To reformat a paragraph with varying amounts of indentation, you must either
  2948. adjust the indentation of those lines which have the wrong indentation so
  2949. that reformatting includes them, or a much faster way is to use Join Lines
  2950. (C-j) until you have put the whole paragraph onto the cursor line.  Then
  2951. press C-3 to reformat it.
  2952.  
  2953. Paragraph reformatting reacts to the following characters:  period, colon,
  2954. question mark, and exclamation point (".:?!").  These are reformatted with 2
  2955. spaces after them, if they are followed by 2 or more spaces.  If they are
  2956. followed by 1 space or less, the original spacing is kept.  With hyphen or
  2957. slash ("-" or "/"), if 1 or more spaces comes before these, a space is put
  2958. after them.  If no space comes before them, no space is put after; thus,
  2959. hyphenated words are rejoined correctly in reformatting.
  2960.  
  2961. Quotes and parentheses:  If there is a sentence terminator such as a period
  2962. or questionmark appearing before a quote or right parenthesis, reformat
  2963. treats the quote or right parenthesis as it would a sentence terminator.
  2964. That is, if there are 2 or more spaces following, it leaves 2 spaces.  If
  2965. there is only 1 or no space following, it preserves the original spacing.
  2966.  
  2967. 1.33.2 Delete Trailing Whitespace (C-4)
  2968.  
  2969. C-4 deletes all of the trailing whitespace in curFile.
  2970.  
  2971. 1.34 Arithmetic
  2972.  
  2973. The arithmetic commands add/subtract the number under the cursor to/from the
  2974. running total.  They handle whole integers and dollar.penny amounts.  Numbers
  2975. may be positive or negative.  Negative numbers are designated by a minus "-"
  2976. sign immediately preceding them or by being enclosed in parentheses.
  2977.  
  2978. Example:  Select Swap MouseUp (A-m) and press C-=.  This swaps the buttonUp
  2979. key with the add-numbers key.  Now go through various buffers clicking
  2980. numbers with the mouse.  The numbers are added to the running total, which is
  2981. displayed in the message line.  Non-numbers that are clicked do not affect
  2982. the total.  Reverse the above key-swap by doing it a second time.  Place the
  2983. cursor where the total should go in the text and press C-\ to insert the
  2984. total at the cursor.  (The total is stored in number variable n49.)
  2985.  
  2986. 1.34.1 Zero Total (C-0)
  2987.  
  2988. C-0 zeros the running arithmetic total.
  2989.  
  2990. 1.34.2 Insert Total (C-\)
  2991.  
  2992. C-\ types the current arithmetic total into the text at the cursor.
  2993.  
  2994. 1.34.3 Add to Total (C-=)
  2995.  
  2996. C-= adds the number under the cursor to the running total and displays the
  2997. new total in the message line.
  2998.  
  2999. 1.34.4 Subtract from Total (C--)
  3000.  
  3001. C-- subtracts the number under the cursor from the running total and displays
  3002. the new total in the message line.
  3003.  
  3004. 1.35 Learn Mode
  3005.  
  3006. Uedit can "learn" a sequence of up to 200 key, mouse, and menu inputs and
  3007. "replay" them on demand.  It is highly recommended that you take a moment to
  3008. learn how to use Learn Mode, because it is extremely easy, versatile, and
  3009. powerful.  Learn Mode uses only two keys:  C-s to turn it On; C-r to
  3010. terminate it; C-r again to "replay" it as many times as needed.
  3011.  
  3012. When Learn Mode is On, "L#" appears in the square brackets in the title bar,
  3013. where # is the number of learned steps recorded so far.  If you input more
  3014. than 200 steps, a message "Learn buffer is full" is displayed and no more
  3015. steps are learned.  To abort Learn Mode, erasing the stored steps, press C-s
  3016. a second time.  Learned sequences may be stored as disk files.
  3017.  
  3018. Learned sequences may use mouse cursor-positioning; when you click the left
  3019. mouse button, the location of the mouse is learned along with the click.
  3020.  
  3021. Clicking to go to tiny window is also learned; but clicking in the tiny
  3022. window to return to the big screen is not learned; thus the learned sequence
  3023. will switch to tiny and stay there until something in the learned sequence
  3024. causes it to return to the big screen.
  3025.  
  3026. Mouse scrolling is disabled in Learn Mode; scrolling should be done using the
  3027. arrow keys.
  3028.  
  3029. Requester inputs are not learned; conditional requesters can be avoided by
  3030. choosing the right keys.  For example, F3 (Close File) asks whether to save
  3031. changes; but S-F3 (Auto-Close) auto-saves changes before closing the file.
  3032.  
  3033. Primitive Mode inputs are learned.  Gadget inputs are learned.  (See Editing
  3034. Tricks, 2.7.)
  3035.  
  3036. Example using Learn Mode:  Press C-s to start Learn Mode.  Press F1 (Next
  3037. File) 2 times.  Press C-r to end Learn Mode.  Press C-r repeatedly to run the
  3038. learned sequence.
  3039.  
  3040. To play back a learned sequence 1000 times, select Command Multiplier (C-m),
  3041. type in 1000 followed by ESC, and press C-r.  To make a learned sequence run
  3042. indefinitely or until it fails or until you abort with Amiga-ESC, press SA-c
  3043. (Cycle Counter) and then C-r.  Note that the cycle counter and command
  3044. multiplier may be used to multiply the executions of any command, not just
  3045. with running learned sequences.  (See Miscellaneous, 1.28.)
  3046.  
  3047. 1.35.1 Start Learn Mode/Abort Learn Mode (C-s)
  3048.  
  3049. C-s turns On Learn Mode.  Inputs are memorized until you press C-r to end the
  3050. learning.  If you press C-s a second time, it aborts the learning and erases
  3051. the stored inputs.
  3052.  
  3053. 1.35.2 End Learn Mode/Run Learned Sequence (C-r)
  3054.  
  3055. When Learn Mode is On, C-r terminates learning with Learn Mode.  C-r after
  3056. that "replays" the learned sequence.
  3057.  
  3058. 1.35.3 Save Learned Sequence (C-5)
  3059.  
  3060. C-5 asks for the file name for the learned sequence.  Type in the name and
  3061. ESC.  The learned sequence is saved to disk.
  3062.  
  3063. 1.35.4 Load Learned Sequence (C-6)
  3064.  
  3065. C-6 asks for the file name of the learned sequence to load in.  Type in the
  3066. name and ESC.  The learned sequence is loaded in.
  3067.  
  3068. 1.35.5 Load and Run Learned Sequence (C-7)
  3069.  
  3070. C-7 asks for the file name of the learned sequence to load and run.  Type in
  3071. the name and ESC.  The learned sequence is loaded in and run.  To run it
  3072. again, press C-r.
  3073.  
  3074. 1.36 Data File
  3075.  
  3076. Uedit's "data" is all of its current flags and numerical values, such as
  3077. Colors and lineLength, and all of its editing commands.  In the standard
  3078. config, there about 300 commands, including the Startup command which defines
  3079. all of Uedit's menus.  (See the Config! file and A-Z extensions.  See Startup
  3080. Key and Menus, 2.16.)
  3081.  
  3082. At startup, Uedit automatically loads Data!, the standard data file, unless
  3083. you tell it to do otherwise by using the -c or -d CLI command-line flags.  If
  3084. the flags are not used and it cannot find Data!, it loads in Config!, the
  3085. standard config, and compiles it.  Uedit looks for these files in the current
  3086. directory or in S:.  If Data! is in S:, Uedit can be run from any directory
  3087. by typing "Run Ue" in CLI or by clicking its icon in Workbench.  (See Getting
  3088. Started.  See CLI Command Line, 2.1.)
  3089.  
  3090. During an edit session, when you compile a command or modify any attribute
  3091. such as lineLength or Colors, Uedit's current "data" is changed.  To make the
  3092. change permanent, use Save Data (A-f6) to rewrite the data file.  To recover
  3093. the original data after making changes, use Load Data (C-f6) to reload the
  3094. data file.
  3095.  
  3096. For more information about config and data files, see Config, Data, and
  3097. Customizing, 2.3.
  3098.  
  3099. 1.36.1 Save Data (A-f6)
  3100.  
  3101. A-f6 asks whether you want to save the data.  If you answer Yes, it asks for
  3102. the data file name.  If you type in a name and press ESC, the data is saved
  3103. under that name.  If you just press ESC, the current data file name is used,
  3104. which is Data! or S:Data!, the standard data file, unless you specified a
  3105. different data file name earlier.
  3106.  
  3107. 1.36.2 Load Data (C-f6)
  3108.  
  3109. C-f6 asks whether you want to load a data file.  If you answer Yes, it asks
  3110. for the name of the data file.  If you type a name and press ESC, the named
  3111. data file is loaded.  If you just press ESC, the current data file is
  3112. reloaded, which is Data! or S:Data!, the standard data file, unless you
  3113. specified a different name earlier.  After a data file is loaded in, Uedit
  3114. Aborts all activity and the screen flashes.  This abort is so that the
  3115. current command will stop running; loading in a data file replaces all
  3116. commands in Uedit's memory, including the one that is currently running.
  3117.  
  3118. 1.37 Compiling
  3119.  
  3120. A command runs when you give the input that the command is assigned to.  For
  3121. example, pressing F2 causes the file in the window to be saved.  Commands
  3122. start out as CL source code, such as:
  3123.             <normal-f2: saveFile(curFile) >
  3124.  
  3125. Commands may be written anywhere in any buffer in Uedit.  Uedit compiles the
  3126. command language into binary pcode which then becomes part of Uedit's "data".
  3127. The standard config, Config! and its A-Z segments, contains the CL source
  3128. code for all of Uedit's standard commands and defaults.  The defaults are the
  3129. list of values at the beginning of Config!.  (See the Config! file.  See
  3130. Config, Data, and Customizing, 2.3.)
  3131.  
  3132. 1.37.1 Compile (f6)
  3133.  
  3134. F6 compiles the command at or following the cursor.  The cursor must be on or
  3135. before the command's left angle bracket "<".  If an error is found during the
  3136. compile, the display flashes and the cursor stops just past the offending
  3137. portion of the command.  When the compile is successful, the cursor stops on
  3138. the ending angle bracket ">" of the command and the pcode size of the
  3139. compiled command is reported in the message line.  If the word "Size" is used
  3140. in the message, it is a new command for that key.  If the word "Replace" is
  3141. used, it is replacing an existing command for that key.  (See Parts 2 and 3
  3142. concerning CL control structures, functions, arguments, and compile errors.)
  3143.  
  3144. 1.37.2 Compile Config Defaults (AC-f6)
  3145.  
  3146. The first section in any configuration must be a series of flags and default
  3147. values for such things as lineLength, pageLines, and Colors.  AC-f6 compiles
  3148. the defaults in the config file.  Load Config! or the root segment of your
  3149. custom config, edit the defaults as needed, and select Cfg Defalts (AC-f6) to
  3150. compile the customized defaults.  The defaults are compiled and the window is
  3151. closed and reopened using the new values.  Use Save Data (A-f6) to save the
  3152. values in the data file for permanent use.
  3153.  
  3154. If an error is found during the default-compile, the display flashes and the
  3155. cursor stops just after the offending value.  Default values are enclosed in
  3156. angle brackets "<...>".  Do not remove these brackets or change the order in
  3157. which the defaults are presented.  For defaults which require a Yes or No
  3158. answer, use 0 for No and 1 for Yes.  If any other range of answers is
  3159. required, it is given beside the default.  (See Config Defaults, 2.4.)
  3160.  
  3161. 1.37.3 Make Command (S-f6)
  3162.  
  3163. S-f6 opens buffer 44 so that you can type a command into it.  Commands may be
  3164. written and compiled anywhere, but S-f6 is provided as a convenience.  Note
  3165. that you could as easily use buffer 44 as a scratch pad and S-f6 as a quick
  3166. means of switching to it as needed.
  3167.  
  3168. 1.38 Keys
  3169.  
  3170. A "key" is any input that may run a command.  This includes any keyboard or
  3171. mouse input.  Left mouse button inputs are keys, for example; they include
  3172. buttonDown and buttonUp, gadget clicks, and closeBox clicks, each with or
  3173. without shift-key modifiers.  The right mouse button is a key, if trapMenus
  3174. is True; the keys are menuDown and menuUp.  (See the defaults in Config!.)
  3175. Menu inputs are not considered keys themselves, because they run existing
  3176. keyboard and mouse keys.  For menu inputs, the commands described below act
  3177. upon the key the menu is running, not the menu itself.  (See Valid Key
  3178. Arguments, 2.29.)
  3179.  
  3180. You may swap and kill keys with abandon, in order to make your work as
  3181. convenient as possible, and this is definitely encouraged.  But do not select
  3182. Save Data (A-f6), after swapping or killing keys, unless you are satisfied
  3183. that the keys affected are not borrowed by other keys or by menus.
  3184.  
  3185. Dozens of keys are run by the menus.  Swapping or killing a menu selection is
  3186. exactly the same as swapping or killing its key.  In addition to the keys
  3187. borrowed by menus, the following keys are run by various keys in the standard
  3188. config.  If you swap or kill them, the keys running them cannot work
  3189. properly.  To see many examples of keys borrowing other keys, load Config!M
  3190. and search for "runKey".
  3191.  
  3192. The best example of keys running other keys is search-replace.  The Search
  3193. Fwd key (f9) is borrowed by the Replace Fwd key (f10), so that after each
  3194. replace another search occurs.  The Replace All Fwd key (A-f10) runs f10 in a
  3195. loop until the search in f9 fails.  (See the Config!M file and search for
  3196. "f9".)
  3197.  
  3198. Anytime you use a key a lot, it is convenient to swap it to a favored spot so
  3199. that the work is easier; and, again, this is highly recommended.  For
  3200. example, Reformat Paragraph (C-3) and Run Learn (C-r) may be used frequently
  3201. and may be swapped to ESC, which is easier to hit.
  3202.  
  3203. When using Swap Keys, note the following:  (1) If a menu item's key is
  3204. swapped, when the menu item is selected it runs the key it was swapped with -
  3205. or does nothing, if the key it was swapped with had no command.  (2) If Swap
  3206. Keys or Kill Key is selected by mistake, abort with Amiga-ESC or type a
  3207. couple of "safe" keys, such as "a".  (3) Do not click the left mouse button
  3208. during Swap Keys, unless you intend to swap the mouse's buttonDown and
  3209. buttonUp commands.  (4) If you swap a key that is run by other keys, the keys
  3210. running it cannot work right until you swap it back or select Load Data (C-
  3211. f6) to reload the original data file.
  3212.  
  3213. To swap the mouse's buttonDown key, select Swap Keys (f5), press the other
  3214. key first, and then click the mouse button.  This allows only buttonDown to
  3215. be included in the swap.
  3216.  
  3217. To swap the mouse's buttonUp key with another key, use Swap MouseUp (A-m).
  3218. In the standard config, no buttonUp command is defined, but it is handy to
  3219. swap keys such as C-= (the add-numbers key) to buttonUp, so that you can
  3220. click-add numbers in files.  Another example is swapping mouseUp with Run
  3221. Learn (C-r); then the current learned sequence is run every time the mouse is
  3222. clicked.  The learned sequence could, for instance, bracket clicked lines of
  3223. text with printer control codes or copy clicked words into another buffer.
  3224. (See Swapping Keys Permanently, 2.9.  See Editing Tricks, 2.7.)
  3225.  
  3226. 1.38.1 Kill Key (SAC-f6)
  3227.  
  3228. SAC-f6 kills the next key that is input.  If it has a command, the command is
  3229. deleted and the message "Key command was deleted" is displayed.  If it has no
  3230. command, nothing is done.
  3231.  
  3232. 1.38.2 Find Key (L-f6)
  3233.  
  3234. L-f6 enables you to find an "available" key to attach a new command to or
  3235. perhaps to swap another key to.  L-f6 stays active until you press Amiga-ESC
  3236. to abort it.  If the key you input has a command, "In use" is reported.  If
  3237. it has no command, "Available" is reported.
  3238.  
  3239. 1.38.3 Swap Keys (f5)
  3240.  
  3241. F5 displays the message "Next 2 function keys will be swapped!" and waits for
  3242. 2 inputs.  Give the 2 inputs that you want to swap.  If the swap is
  3243. successful, "Keys were swapped" is reported.  If neither input has a command
  3244. or the inputs are identical, nothing is done.
  3245.  
  3246. 1.38.4 Swap mouseUp (A-m)
  3247.  
  3248. A-m swaps the next key you input with the mouse's buttonUp command.  In the
  3249. standard config, buttonDown deposits the cursor and handles mouse scrolling,
  3250. but no buttonUp command is defined.  Swapping a key to buttonUp may be
  3251. extremely useful.  You may, for instance, swap C-r (Run Learn) with buttonUp.
  3252. Then pressing the mouse button deposits the cursor and releasing the mouse
  3253. button runs a learned sequence.  (See the discussion above.  See Editing
  3254. Tricks, 2.7.)
  3255.  
  3256. 1.39 Display Modes
  3257.  
  3258. Uedit has 4 display modes (screen types).  The modes use a non-interlace
  3259. screen with either 2 bitplanes (lace=0) or 1 bitplane (lace=1), or an
  3260. interlace screen with 2 bitplanes (lace=2) or 1 bitplane (lace=3).  (See
  3261. Lace/Planes, 1.39.1.  See the CL functions toggle(), flipFlag(), and
  3262. setLocal() in 3.4.)
  3263.  
  3264. Using 1 bitplane saves memory and gives faster scrolling, but it only shows 2
  3265. colors.  Interlace modes require more memory and displays twice as many lines
  3266. per window of text.  Interlace using just 1 bitplane (2 colors) uses about
  3267. the same amount of graphics memory as non-interlace with 2 bitplanes (4
  3268. colors).  If there is a shortage of graphics memory, Uedit will not use
  3269. interlace and may use only 1 bitplane (2 colors).
  3270.  
  3271. Regardless of which display mode is used, RGB color tuning is possible using
  3272. Tune RGB (A-Esc).  Also when using 2 bitplanes (4 colors), the 4 colors may
  3273. be rotated using Colors (A-Help).  Each buffer in Uedit may use its own
  3274. combinations of the 4 colors.  (See Colors (A-Help), 1.30.6.)
  3275.  
  3276. 1.39.1 Lace/Planes (S-Esc)
  3277.  
  3278. S-Esc toggles to the next screen type among 4 screen types.  The screen type
  3279. can also be selected using the following keys:
  3280.     Key     Screen type     Bitplanes   Colors   lace CL variable value
  3281.     ---     -----------     ---------   ------   ----------------------
  3282.     R-f2    regular         2           4        0
  3283.     R-f1    regular         1           2        1
  3284.     R-f4    interlace       2           4        2
  3285.     R-f3    interlace       1           2        3
  3286.  
  3287. Using 2 bitplanes with a regular or interlace screen uses twice as much
  3288. memory as a 1 bitplane screen.  Also scrolling and screen updates are faster
  3289. with 1 bitplane.
  3290.  
  3291. 1.39.3  Hide Display (R-h)
  3292.  
  3293. R-h toggles the hideDisplay CL flag.  If hideDisplay is True, displaying is
  3294. suppressed when running learned sequences or multiple operations with the
  3295. command multiplier.  Performance is a great deal faster in many cases when
  3296. display updates are suppressed.  (See the defaults in Config!.  See
  3297. flipFlag() and toggle() in 3.4.)
  3298.  
  3299. Technical note:  hideDisplay is turned on automatically, if you examine the
  3300. menus during a display update; this keeps the blitter from overwriting a
  3301. menu; in the next pause, hideDisplay is turned off and a full display refresh
  3302. is done.  Useful side effect:  To speed up the performance of a long process
  3303. involving display updates, just display a menu briefly by flicking the mouse
  3304. menu button and hideDisplay will be turned on.
  3305.  
  3306. Warning:  If you turn on hideDisplay and run a learned sequence that requires
  3307. an input, its prompting message will not be displayed!  You will wonder why
  3308. the process is taking forever, when in fact Uedit is waiting for an input
  3309. from you!
  3310.  
  3311. 1.39.4 Scroll Type (R-s)
  3312.  
  3313. R-s toggles the scrollType CL variable which determines whether colored
  3314. regions are colored during scrolls or not.  If scrollType is True, they are
  3315. not updated and scrolling is slightly faster; if scrollType is False, colored
  3316. regions are updated during scrolls.  (See the defaults in Config!.  See
  3317. flipFlag() and toggle() in 3.4.)
  3318.  
  3319. 1.40 Columnar
  3320.  
  3321. When you mark a hilite or invert region, you may also be marking a columnar
  3322. region without realizing it.  To see, after marking a colored region select
  3323. Col Display in the menu.  This turns On columnar display mode, so that
  3324. colored regions are displayed as rectangular in shape, if they happen to
  3325. correspond to a columnar region.  Example:  A regular hilite region exists,
  3326. if the end-of-hilite comes after the start-of-hilite in the text; this is the
  3327. only requirement.  But a columnar region has the added requirement that the
  3328. end-of-hilite must be in a higher column number than (to the right of) the
  3329. start of hilite; otherwise, no columnar hilite region exists.
  3330.  
  3331. Tab characters may be "unclean" to handle in columnar text operations,
  3332. because tabs may be scattered randomly throughout a columnar region.  A
  3333. region with tabs in it that are not perfectly aligned vertically could be
  3334. copied and inserted at another location where the tabs would have different
  3335. widths than they did originally, and this would destroy the rectangularity of
  3336. the region.  To overcome this problem, in columnar display mode tabs are
  3337. displayed as "box" characters that are only 1 column wide.  This makes it
  3338. easier to see tab characters and handle them cleanly.
  3339.  
  3340. When Use Tabs (AC-tab) in the Local Modes menu is Off, typing the Tab key
  3341. normally puts in enough spaces to move the cursor to the next tab stop; but
  3342. in columnar display mode, typing the Tab key puts in only one space, because
  3343. tab spacings are considered meaningless or invalid in columnar display mode.
  3344. If Use Tabs is On, typing the Tab key inserts a tab character (ASCII 9), as
  3345. it normally would, but it is displayed as a "box" (depending on the font)
  3346. that is only 1 column wide.
  3347.  
  3348. Columnar data operations are possible when there are tabs in the region, but
  3349. if a particular column in the region has a tab in it, every line in the
  3350. region should have a tab in that same column, so that the region's
  3351. rectangularity is maintained regardless of where it may be inserted or
  3352. overlaid.  If tabs are a problem, they should be converted to spaces using
  3353. Tabs To Spaces (L-t).
  3354.  
  3355. When a columnar region is copied and inserted in the text somewhere, it is
  3356. hilited just as the original copied region was; it can be "lifted out" in one
  3357. keystroke, because inserted columnar text merely pushes the text beneath it
  3358. to the right.  If overlaying rather than inserting is used, however, the
  3359. columnar text overlays the text beneath it and the text that is overwritten
  3360. cannot be recovered.  Note that inserting columnar text does not push the
  3361. lines beneath it downward like pasting in copied text normally does; it
  3362. pushes the text rightward instead.
  3363.  
  3364. The keypad keys kpDot, kpMinus, and kpEnter work as regular copy, cut, and
  3365. paste keys for regular hilite regions, when columnar display mode is Off.
  3366. When columnar display mode is On, these keys work instead as columnar copy,
  3367. cut, and paste keys.  (See Hilite and Invert Regions, 1.29.)
  3368.  
  3369. 1.40.1 Columnar Display (SC-)
  3370.  
  3371. SC-toggles columnar display mode On/Off.  If columnar display mode is On,
  3372. hilite/invert regions are displayed as rectangular in shape, if they
  3373. correspond to columnar regions.  If columnar display mode is Off, a colored
  3374. region may be visible; yet the region may become uncolored when columnar
  3375. display mode is turned On, because the end of the region is not in a higher
  3376. column number than the start of the region.
  3377.  
  3378. 1.40.2 Columnar Cut (SC-1)
  3379.  
  3380. SC-1 (or kpMinus) copies and then clears the hilited columnar region.  Text
  3381. to the right of the deleted region is pulled to the left.  The copy is stored
  3382. in buffer 37.
  3383.  
  3384. 1.40.3 Columnar Erase (SC-2)
  3385.  
  3386. SC-2 erases the hilited columnar region by filling it with spaces.
  3387.  
  3388. 1.40.4 Columnar Copy (SC-3)
  3389.  
  3390. SC-3 (or kpDot) copies the hilited columnar region.  The copy is stored in
  3391. buffer 37.
  3392.  
  3393. 1.40.5 Columnar Insert (SC-4)
  3394.  
  3395. SC-4 (or kpEnter) inserts the copied columnar text into curFile at the
  3396. cursor.  Text beneath it is pushed to the right.  The inserted columnar
  3397. region is hilited and can be lifted out using Columnar Cut (SC-1 or kpMinus).
  3398.  
  3399. 1.40.6 Columnar Overlay (SC-5)
  3400.  
  3401. SC-5 overlays the copied columnar text at the cursor in curFile.  The text
  3402. beneath it is overwritten and cannot be restored.  The columnar region is
  3403. hilited.
  3404.  
  3405. 1.40.7 Insert Columnar Hilite at Cursor (SC-6)
  3406.  
  3407. SC-6 inserts the hilited columnar region in curFile at the cursor in curFile
  3408. without making an intermediate copy of it.  The inserted region is hilited.
  3409. This command does not disturb buffer 37, which may be holding an earlier
  3410. copied columnar region.
  3411.  
  3412. 1.40.8 Overlay Columnar Hilite at Cursor (SC-7)
  3413.  
  3414. SC-7 overlays a hilited columnar region in curFile at the cursor in curFile
  3415. without making an intermediate copy of it.  The overlaid region is hilited.
  3416. The text beneath it is overwritten and cannot be recovered.  This command
  3417. does not disturb buffer 37, which may be holding an earlier copied columnar
  3418. region.
  3419.  
  3420. 1.41 Paging
  3421.  
  3422. Printed page (form) boundaries are determined by formfeeds (ASCII 12) in the
  3423. text or by the line-count based on the current pageLines (lines per page)
  3424. value.  A formfeed in the text causes Uedit to draw a horizontal line across
  3425. the window, marking the page boundaries.  The paging commands described below
  3426. insert a formfeed, when they create a page division.
  3427.  
  3428. To see the pageLines value that curFile is using, select Show Vals (S-Help).
  3429. To set pageLines, select Lines/Page (A-g).  To see the cursor's page-row-
  3430. column in curFile, turn On Row/Column (C-2).
  3431.  
  3432. In preparing a file for paging, leave out the page-divisions (formfeeds or
  3433. blank lines for margins) until the text is satisfactory.  Use only the blank
  3434. lines that are needed for separating paragraphs and sections.  When satisfied
  3435. with the file, save a copy of it before paging it.
  3436.  
  3437. Turn On Row/Column (C-2), which causes the page-row-column of the cursor to
  3438. be displayed in the message line.  Page-divisions may be installed in the
  3439. following ways:  manually, by putting in blank lines or formfeeds by hand;
  3440. manually, by choosing page-break locations and using Divide Page (L-v);
  3441. automatically, by using Auto Page Division (L-r).
  3442.  
  3443. Inserting page-divisions with the paging commands installs the page number;
  3444. it is put in the middle of the line which is 1/2 the bottomMargin distance
  3445. above the end of the page, where the end of the page is determined by the
  3446. current pageLines setting.  Example:  If pageLines is 66 and bottomMargin is
  3447. 4, 1/2 of 4 is 2, so the page number is put in the middle of line 64,
  3448. followed immediately by a formfeed.  (See PageLines, TopMargin, and
  3449. BottomMargin in Local Values, 1.30.)
  3450.  
  3451. Programmer note:  Programmers often need to go to a line number, rather than
  3452. going to page & line.  To disable paging so that only line number is used,
  3453. set pageLines to 1 using Lines/Page (A-g).  To go to a line number, use Goto
  3454. Line N (C-n).
  3455.  
  3456. 1.41.1 Go To Page # (A-3)
  3457.  
  3458. A-3 asks for the printed page (form) number to go to.  Input the page number
  3459. and press ESC.  The cursor is moved to the beginning of the specified page.
  3460.  
  3461. 1.41.2 Top of Page (L-h, C-kp8)
  3462.  
  3463. L-h and C-kp8 move the cursor to top of form (printed page).  If already at
  3464. top of form, the cursor moves to the top of the preceding form.
  3465.  
  3466. 1.41.3 Bottom of Page (L-b, C-kp2)
  3467.  
  3468. L-b and C-kp2 move the cursor to bottom of form.  If already at bottom of
  3469. form, the cursor moves to the bottom of the next form.
  3470.  
  3471. 1.41.4 Insert FormFeed (L-f)
  3472.  
  3473. L-f inserts a formfeed (ASCII 12) at the cursor.  A formfeed may also be
  3474. inserted using Input Control Character (C-c) followed by "l".
  3475.  
  3476. 1.41.5 Divide Page (L-v)
  3477.  
  3478. L-v inserts a page division at the cursor line.  A page division is a
  3479. formfeed (FF) preceded by and followed by blank lines according to the
  3480. current bottomMargin and topMargin values.  BottomMargin determines how many
  3481. blank lines are put before the page number and FF.  TopMargin determines how
  3482. many blank lines are put after the FF.
  3483.  
  3484. 1.41.6 Delete Page Division (L-d)
  3485.  
  3486. L-d deletes the next page division.  L-d removes the blank lines before and
  3487. after the page-division's formfeed; it does not know whether blank lines
  3488. should be left to separate two paragraphs or whether the page division was
  3489. splitting a paragraph; watch out for cases where blank lines need to be typed
  3490. back in after using L-d.
  3491.  
  3492. Page divisions are easy to delete using Delete Word-Right (kp9) also.  Put
  3493. the cursor in a blank line at the bottom of the page and press kp9; this
  3494. deletes the page number and all lines up to it, leaving the formfeed and top
  3495. margin after it.  Delete the desired number of blank lines using Del,
  3496. Backspace, or Delete Line (C-d).
  3497.  
  3498. 1.41.7 Auto Page Division (L-r)
  3499.  
  3500. L-r inserts page divisions from the cursor page forward.  To page an entire
  3501. file, put the cursor in the first page and use L-r.  It first scans forward,
  3502. displaying a "Scanning" message while it looks for formfeeds.  If it finds a
  3503. formfeed, it stops and tells you to delete the existing page divisions.  Use
  3504. Bottom Page (L-b) to find the old page divisions, and delete them using one
  3505. of the methods discussed earlier.
  3506.  
  3507. Once the old page divisions have been removed, put the cursor in the page
  3508. that you want auto-page-division to start from and press L-r again.  This
  3509. time it inserts page divisions and page numbers.  It uses bottomMargin and
  3510. topMargin as described earlier.  L-r looks for a non-blank line to page-break
  3511. on, because page-breaking on a blank line may cause the top margin of the
  3512. next page to have extra blank lines in it.
  3513.  
  3514. 1.41.8 Delete Page Number (L-y)
  3515.  
  3516. L-y finds and deletes the page number at the next page division.  It does not
  3517. delete the blank lines in the top and bottom margins.
  3518.  
  3519. 1.42 Split Windows
  3520.  
  3521. There may be up to 8 split windows in use at the same time.  The minimum
  3522. split window size is 2 lines, and the maximum is whatever will fit into
  3523. Uedit's window, leaving at least 2 lines for the main window.  The split
  3524. window that is currently active has "Uedit" in its title bar.  To activate a
  3525. split window, click the mouse in it or select Next Split (L-9).  The buffer
  3526. displayed in the active split window is by definition curFile.  Split windows
  3527. use the colors of the buffers displayed in them, so each split window may use
  3528. a different 4-color combination.  Split windows are discarded, when you
  3529. switch to or from interlace screen (S-esc) or change to a different font size.
  3530.  
  3531. Technical note:  If a buffer is displayed in two split windows, each uses its
  3532. own cursor and page locations.  locSC is the second window's cursor and locSP
  3533. is its start of page.  When you switch between the buffer's two windows,
  3534. atCursor is swapped with locSC and sPage is swapped with locSP.  This is the
  3535. only time locSC and locPC are changed by Uedit internally; locA through locJ
  3536. are never changed internally.
  3537.  
  3538. 1.42.1 Mouse Size (L-=)
  3539.  
  3540. L-= can resize the lower split windows, but not the main window.  Activate
  3541. the split window you wish to resize by clicking the mouse in it.  Then select
  3542. Mouse Size (L-=).  Hold down the mouse button and move the mouse up or down
  3543. to resize the split window.  Release the button, when the size is
  3544. satisfactory.
  3545.  
  3546. 1.42.2 Next Split (L-9)
  3547.  
  3548. L-9 activates the next split window and the buffer in it becomes curFile.  A
  3549. split window may also be activated by clicking the mouse in it.
  3550.  
  3551. 1.42.3 Drop Split (L-0)
  3552.  
  3553. L-0 removes the active split window, relinquishing its window-space to the
  3554. main window.
  3555.  
  3556. 1.42.4 Current File (L-c)
  3557.  
  3558. L-c opens a split window which also has curFile in it.
  3559.  
  3560. 1.42.5 Undo Buffer (L-1)
  3561.  
  3562. L-1 opens a split window with the Undo buffer in it (buffer 45).
  3563.  
  3564. 1.42.6 Search Buffer (L-2)
  3565.  
  3566. L-2 opens a split window with the search buffer in it (buffer 49).
  3567.  
  3568. 1.42.7 Replace Buffer (L-3)
  3569.  
  3570. L-3 opens a split window with the replace buffer in it (buffer 48).
  3571.  
  3572. 1.42.8 Hilite Buffer (L-4)
  3573.  
  3574. L-4 opens a split window with the copied hilite buffer in it (buffer 47).
  3575.  
  3576. 1.42.9 Invert Buffer (L-5)
  3577.  
  3578. L-5 opens a split window with the copied invert buffer in it (buffer 46).
  3579.  
  3580. 1.42.10 Columnar Buffer (L-6)
  3581.  
  3582. L-6 opens a split window with the copied columnar buffer in it (buffer 37).
  3583.  
  3584. 1.42.11 Directory Names (L-7)
  3585.  
  3586. L-7 opens a split window with the directory buffer in it (buffer 38).
  3587.  
  3588. 1.42.12 Split Window Size (L-8)
  3589.  
  3590. L-8 asks for the number of lines for newly created split windows to use.
  3591. Input the number of lines and press ESC.  The minimum number of lines allowed
  3592. is 2, and the maximum is as many lines as will fit into the window, leaving
  3593. at least 2 lines for the main window.  To resize existing split windows, use
  3594. Mouse Size (L-=).
  3595.  
  3596. 1.43 Printing
  3597.  
  3598. If there is enough memory to copy the text to be printed, printing files or
  3599. regions in Uedit is spooled out and handled in the background, so that you
  3600. can go on working.  Up to 12 print jobs may be spooled.  If memory is low,
  3601. printing is done in foreground and you must wait until it has finished.
  3602. Printing in foreground may be aborted with Amiga-ESC.  Amiga-ESC does not
  3603. abort spooled printing, however, so it is safe to use Amiga-ESC while editing
  3604. during spooled prints.  Spooled printing may be aborted using Abort Print (L-
  3605. a) or Stop All Prts (R-a).  If printTabs is False (see Config! defaults),
  3606. tabs are converted to spaces for the printer.  If printTabs is True, they are
  3607. not converted.
  3608.  
  3609. If Map Illegals (SA-m) is turned On, mapped illegal characters in the text
  3610. being printed are converted back to their former illegal values (ASCII 0-3)
  3611. before they are sent to the printer.  (See Map Illegals, 1.31.9.)
  3612.  
  3613. 1.43.1 Print Select
  3614.  
  3615. The Print Select value (0 to 3) determines where printed text is sent.
  3616. Spooled prints are handled according to the value of Print Select at the time
  3617. they were queued up; thus, you may queue up prints for both serial and
  3618. parallel printers at the same time.  (The CL variable prefPrint is the same
  3619. as Print Select.)
  3620.  
  3621. If a print job is too big to spool on account of insufficient memory, one of
  3622. two things happens:  If no prints are queued up, the text is printed in the
  3623. foreground ("busy" mode) and you must wait for it to finish, unless you abort
  3624. it with Amiga-ESC.  If other print jobs are in the queue, Uedit will hang and
  3625. keep printing in order to free up some memory; this hang-up may be aborted
  3626. with Amiga-ESC.
  3627.  
  3628. In tiny window, spooled prints and file-saves continue to be processed.  When
  3629. you quit Uedit, spooled prints and file-saves are finished before Uedit
  3630. closes out.  If during that time you give any input, the quit is abandoned
  3631. and you are returned to normal edit mode.  (See Quit, 1.18.)
  3632.  
  3633. Uedit's printer control codes may be embedded by commands in the Printing
  3634. menu.  These codes are of the form ESCxESC, where "x" is 1 to 3 characters
  3635. based on the printer control code and its arguments, if any.  When Print
  3636. Select 2 or 3 is used, Uedit strips off the second ESC and converts the "x"
  3637. to an Amiga printer code before sending it to the print device that you
  3638. selected with Preferences.  (See ROM Kernal Manual & table below.  Also see
  3639. the CL function printerCode() in 3.4.)
  3640.  
  3641. The Print Select (prefPrint) value determines which of 4 methods of printing
  3642. is used:  0 = raw straight out the parallel port.  1 = raw straight out the
  3643. serial port.  These go through the Amiga print device selected with
  3644. Preferences:  2 = Uedit converts its ESCxESC codes; print device touches all
  3645. text.  3 = Uedit converts its ESCxESC codes; print device touches only those
  3646. codes.
  3647.  
  3648. The advantage of Print Select 0 & 1 is that everything is sent out the
  3649. parallel or serial port in raw form.  Anything you put into the file is sent
  3650. "as is" and the printer selected with Preferences is ignored.  Do NOT use
  3651. Uedit's ESCxESC codes, in this case, because those are intended to be
  3652. processed by the Amiga print device, not by a printer directly.  That is, do
  3653. NOT embed printer control codes using the Printing menu when you are going to
  3654. print using Print Select 0 or 1.
  3655.  
  3656. The advantage of Print Select 3 is that Uedit translates its own ESCxESC
  3657. codes for the Amiga print device, but all other text, including your own ESC-
  3658. sequences to control your personal printer, is sent raw to the printer.
  3659.  
  3660. The advantage of Print Select 2 is that you may embed generic Amiga printer
  3661. control codes (listed in the Amiga ROM Kernal Manual) in the text or may
  3662. embed Uedit's ESCxESC codes using the Printing menu.  When the text is
  3663. printed, Uedit identifies its own ESCxESC sequences and converts them to
  3664. Amiga printer control codes, but it sends all other text, including the
  3665. control codes you embedded yourself, to the Amiga print device "as is".
  3666.  
  3667. The following summarizes the meanings of the Print Select values:
  3668.  
  3669.                                    What the Amiga does with
  3670. Print Select (to)    Uedit's ESCxESC codes           your ESC-sequences
  3671. -----------------    -----------------------------   ------------------
  3672. 0 (parallel port)    don't use                       sent in raw form
  3673. 1 (serial port)      don't use                       sent in raw form
  3674. 2 (print device)     converted & used                used or discarded by print device
  3675. 3 (print device)     converted & used                sent in raw form
  3676.  
  3677. 1.43.2 Printer Control Table
  3678.  
  3679. The Amiga print device recognizes 76 printer control codes, which it
  3680. translates into commands for your printer.  (See Amiga ROM Kernal Manual,
  3681. page 3-198.)  When using Embed Code in the Printing menu (or when writing
  3682. Uedit commands using the printerCode() function), use the following control
  3683. code values.  The printer codes which are marked with asterisks require 1 or
  3684. 2 numerical arguments, such as for color number or form length:
  3685.  
  3686. 0    reset                              45   proportional on
  3687. 1    initialize                         46   proportional off
  3688. 2    lf                                 47   proportional clear
  3689. 3    rtn, lf
  3690. 4    rev lf                             48   * set proportional offset
  3691. 5    norm char set                      49   auto left justify
  3692. 6    italics on                         50   auto right justify
  3693. 7    italics off                        51   auto full justify
  3694. 8    underline on                       52   auto justify off
  3695. 9    underline off                      53   letter space (justify)
  3696. 10   boldface on
  3697. 11   boldface off                       54   word fill (auto center)
  3698. 12   * fgnd  color n
  3699.        (n = 30-39. See colors below.)   55   1/8" line spacing
  3700. 13   * bkgnd color n                    56   1/6" line spacing
  3701.        (n = 40-49. See colors below.)   57   * set form length n
  3702. 14   normal pitch                       58   * perf skip n
  3703. 15   elite on                           59   perf skip off
  3704. 16   elite off
  3705. 17   condensed fine on                  60   left margin set
  3706. 18   condensed off                      61   right margin set
  3707. 19   enlarged on                        62   top margin set
  3708. 20   enlarged off                       63   bottom margin set
  3709. 21   shadow print on                    64   ** T&B margins
  3710. 22   shadow print off                   65   ** L&R margins
  3711. 23   double strike on                   66   clear margins
  3712. 24   double strike off
  3713. 25   NLQ on                             67   set horiz tab
  3714. 26   NLQ off                            68   set vert tabs
  3715.                                         69   clear horiz tab
  3716. 27   superscript on                     70   clear all h tabs
  3717. 28   superscript off                    71   clear vert tabs
  3718. 29   subscript on                       72   clear all v tabs
  3719. 30   subscript off                      73   clear all h & v tabs
  3720. 31   normalize the line                 74   set default tabs
  3721. 32   partial line up                    75   * extended commands
  3722. 33   partial line down
  3723. 34   US character set
  3724. 35   French char set
  3725. 36   German char set            * one number argument is required.
  3726. 37   UK character set          ** two number arguments are required.
  3727. 38   Danish I char set
  3728. 39   Swedish char set
  3729. 40   Italian char set
  3730. 41   Spanish char set
  3731. 42   Japanese char set
  3732. 43   Norwegian char set
  3733. 44   Danish II char set
  3734.  
  3735. Printer color codes:
  3736. Imagewriter II         0=black,   1=red,  2=green,  3=yellow, 4=blue
  3737. no background colors   5=purple,  6=blue, 7=yellow, 8=yellow, 9=black
  3738. Canon Inkjet           0=black,   1=red,  2=green,  3=yellow, 4=blue
  3739. foreground/background  5=magenta, 6=cyan  7=white
  3740.  
  3741. 1.43.3 Print Select (A-p)
  3742.  
  3743. A-p asks for the new Print Select value.  Input a number, 0 to 3.  (Print
  3744. Select is the same as the CL variable prefPrint.)
  3745.  
  3746. 1.43.4 Print Hilite (C-p)
  3747.  
  3748. C-p prints the hilite region in curFile, if it exists, using the current
  3749. Print Select value.
  3750.  
  3751. 1.43.5 Print File (AC-p)
  3752.  
  3753. AC-p prints all of curFile, using the current Print Select value.
  3754.  
  3755. 1.43.6 Abort Print (L-a)
  3756.  
  3757. L-a aborts the current spooled print, if a spooled print is in process.  The
  3758. print is removed from the print queue.
  3759.  
  3760. 1.43.7 Stop All Prints (R-a)
  3761.  
  3762. R-a aborts all spooled prints.  The prints are removed from the print queue.
  3763.  
  3764. 1.43.8 Restart Print (L-s)
  3765.  
  3766. L-s restarts the currently active spooled print.  Use this to start over
  3767. after a paper jam has occurred.
  3768.  
  3769. 1.43.9 Code Help (SAC-p)
  3770.  
  3771. SAC-p displays help for the Bracket Hilite (L-p) command.  See Bracket Hilite
  3772. below.
  3773.  
  3774. 1.43.10 Bracket Hilite (L-p)
  3775.  
  3776. L-p asks you to type in one of the following letters corresponding to a
  3777. printer control:  i=italics, u=underline, b=boldface, c=condensed, e=elite,
  3778. l=enlarged, s=shadow, d=double strike, n=NLQ, x=superscript, y=subscript, 8=8
  3779. lines/inch, h=help.
  3780.  
  3781. The hilite region in curFile is bracketed with the corresponding ESCxESC
  3782. printer codes that are required.  The control code at the start-of-hilite
  3783. turns On the printer feature, such as boldface.  The control code at the end-
  3784. of-hilite turns Off the feature.  You must print using Print Select 2 or 3 in
  3785. order for these special codes to be detected and converted by Uedit to the
  3786. correct generic Amiga printer control codes.  The Amiga print device, in
  3787. turn, converts the generic codes to the correct Esc-sequences for the printer
  3788. that was selected with Preferences; do not print using Print Select 0 or 1,
  3789. because Uedit will send the text raw and your printer will not recognize the
  3790. generic printer control codes.  (See the earlier discussion of Print Select,
  3791. 1.43.3.)
  3792.  
  3793. 1.43.11 Find Code (R-g)
  3794.  
  3795. R-g searches starting at the cursor in curFile to find the next ESCxESC code
  3796. in the text.  If one is found, it is inverse-displayed and may be deleted
  3797. using Delete Invert (C-i).
  3798.  
  3799. 1.43.12 Embed Code (L-g)
  3800.  
  3801. L-g asks you to input a printer control code number (0 to 75).  Input the
  3802. control code number and press ESC.  The corresponding ESCxESC printer code is
  3803. embedded at the cursor.  Note that unlike the Bracket Hilite (L-p) command,
  3804. L-g lets you embed the code for any printer command, 0 to 75.  Also, L-g does
  3805. not bracket a region.  You must print using Print Select 2 or 3, if ESCxESC
  3806. codes are embedded.  (See the Printer Control Table, 1.43.2.  See earlier
  3807. discussion of Print Select, 1.43.3.  See printerCode() in 3.4.)
  3808.  
  3809. 1.44 Building an Index
  3810.  
  3811. The first command below accumulates words and phrases for an index.  The
  3812. second command builds an index using the accumulated list.
  3813.  
  3814. 1.44.1 Store Index Words (SA-buttonDown)
  3815.  
  3816. SA-buttonDown and SA-buttonUp work together to store words and phrases for an
  3817. index.  Press Shift and Alt, put the mouse on the word or phrase you wish to
  3818. include, then either click the mouse if it is a word or hold down the button
  3819. and drag the mouse across the words if it is a phrase.  The text is inverted,
  3820. and the word/phrase is copied into buffer 41.  You need only include each
  3821. word/phrase one time, but duplicates are removed in the second step if any
  3822. are present.  To monitor and edit the accumulating list periodically, use
  3823. Swap Buffer (C-w).
  3824.  
  3825. 1.44.2 Build Index (SA-i)
  3826.  
  3827. Having accumulated a word/phrase list for the index in buffer 41, while
  3828. looking at the file to be indexed press SA-i to build the actual index.  SA-i
  3829. asks for the lines-per-page value.  Input the pageLines value and press ESC.
  3830. If a pageLines value is not input, the current pageLines value is used.
  3831. Regardless of the pageLines value, formfeeds in the text are taken as page
  3832. boundaries in computing the page numbers for index words and phrases.  SA-i
  3833. scans buffer 41, removing duplicate entries from the list.  Then it goes
  3834. through the list of index words/phrases, searching curFile for occurrences of
  3835. each, and storing the page number of each occurrence after the word/phrase
  3836. entry in the index.  Each word or phrase is displayed in the message line as
  3837. it is being processed.  When finished, it displays the message "Press Ctl-w
  3838. to see Index".  The Index is in buffer 41 and can be saved to disk.  Some
  3839. cleanup work on the index is required.  The entries are in first-character
  3840. alphabetical order only, and must be shuffled slightly.  Entries with extra
  3841. many page numbers, creating lines that are too long, must be broken into
  3842. multiple lines.
  3843.  
  3844. 1.45 NoName
  3845.  
  3846. Uedit insists that at least one file buffer be open at all times.  When Uedit
  3847. is started up, if you do not specify one or more files to load in, it opens a
  3848. NoName file buffer; if a NoName file exists in the current directory, it is
  3849. loaded automatically when no files are specified at startup.
  3850.  
  3851. Uedit opens a NoName file buffer, if you close the last file buffer.  Again,
  3852. if a NoName file is in the current directory, it is loaded in automatically.
  3853. This stubborn behavior means that if a NoName file exists, you cannot quit
  3854. Uedit using the CloseBox, because it will keep loading in the NoName file.
  3855. To make it possible to quit using the CloseBox, it is necessary to delete or
  3856. rename the NoName file in the current directory.  However, you may find it
  3857. convenient to keep a list of notes and directory/file names in a NoName file
  3858. in each work directory.  It is loaded by default and resides in the "home"
  3859. buffer slot (buffer 0).  If there is low memory when Uedit tries to load in
  3860. the NoName file, it opens an Empty buffer instead.  (See Buffers, 1.20.  See
  3861. Close File (CloseBox), 1.17.1.)
  3862.  
  3863. 1.45.1 NoName.info Icon
  3864.  
  3865. The NoName.info icon should be in your working directory or in S:, if Make
  3866. Icons (AC-i) is turned On.  If Make Icons is On, when a file is saved to
  3867. disk, Uedit copies NoName.info into MyFile.info, where MyFile is the file
  3868. being saved.  Uedit can use any icon that is named NoName.info and which is
  3869. in the current directory or in S:.
  3870.  
  3871. 1.46 Spelling
  3872.  
  3873. The programs associated with spell-checking are:
  3874.     Ue          Uedit uses spell-checking CL functions.
  3875.     UdBuild     Program to build working dictionary and table.
  3876.     Uspell      Program to spell-check files.
  3877.     Ufind       Program to find words in dictionary using wildcards.
  3878.  
  3879. The files associated with spell-checking are:
  3880.     dict.A-dict.Z       Readable, editable dictionary files.
  3881.     Udict               Working dictionary, compressed.
  3882.     Udtable             Table for working dictionary.
  3883.  
  3884. UdBuild reads the dict.A-dict.Z files and builds a working dictionary and
  3885. table.  The default working dictionary name is Udict and the default table
  3886. name is Udtable.  UdBuild looks for dict.A-dict.Z in the current directory,
  3887. unless a directory for them is specified.  UdBuild runs faster when the
  3888. dictionary and table are built in RAM.  If 200k or more of memory is
  3889. available, type:
  3890.         UdBuild MySpellDir -tRAM:Udtable -dRAM:Udict
  3891. where MySpellDir is the directory containing dict.A-dict.Z.  Typing "UdBuild"
  3892. by itself would read dict.A-dict.Z from the current directory and build Udict
  3893. and Udtable in the current directory.
  3894.  
  3895. The Ufind program finds words in the working dictionary Udict based on
  3896. wildcards.  Using Ufind, you could build Dict.A-dict.Z from a working
  3897. dictionary and table by typing the following in CLI:
  3898.         Ufind A* -oRAM:dict.A
  3899.         Ufind B* -oRAM:dict.B
  3900.         ...
  3901.         Ufind Z* -oRAM:dict.Z
  3902.  
  3903. In "word" handling, such as in cursor word-left and word-right movements,
  3904. Uedit considers the following characters to be "word" characters:  A-Z, a-z,
  3905. 0-9, the apostrophe "'", and characters in the range ASCII 128-255.
  3906.  
  3907. But spell-checking considers only the following to be "word" characters and
  3908. only these may be used in dict.A-dict.Z and are looked at during spell-
  3909. checking:  A-Z, a-z, and the apostrophe "'".
  3910.  
  3911. 1.46.1  Load Speller (R-u)
  3912.  
  3913. R-u brings up the speller.  It loads the dictionary table, Udtable (about
  3914. 12k), into memory.  It tries to load the working dictionary, Udict (about
  3915. 150k), into Uedit's memory also.  Spell-checking is much faster, if the
  3916. working dictionary is resident in Uedit's memory.  If unable to load Udict,
  3917. it accesses Udict on disk during spell-checking.  The Load Speller (R-u)
  3918. command may be customized in Config!S so that Uedit does not try to load
  3919. Udict into memory, by changing the flag in StartSpeller() from 1 to 0.  Also
  3920. it may be customized to use different working dictionaries and tables or to
  3921. look in different directories for them or to ask for their names at runtime.
  3922. Note that, as currently configured, R-u looks for Udict and Udtable in the
  3923. current directory.  (See the StartSpeller() CL function in 3.4.)
  3924.  
  3925. If Uedit cannot find about 12k to hold Udtable, a "No memory" message is
  3926. displayed.  When short of memory or finished using spell-checking, select
  3927. Free Speller (R-f) to free up the speller's memory, especially if Udict is
  3928. residing in Uedit's memory.
  3929.  
  3930. 1.46.2 Spell-Check (R-c)
  3931.  
  3932. R-c spell-checks curFile from the cursor forward and stops on the first word
  3933. not found in the dictionary.  Optional spellings are presented in the message
  3934. line, if the spelling dictionary is resident in memory.  Click the desired
  3935. word in the message line and it replaces the bad word and spell checking
  3936. resumes.  Click anywhere else and the word is left as is and spell checking
  3937. continues.  Spell checking stops at end-of-file or when aborted with Amiga-
  3938. ESC.  Buffer 41 may contain a supplemental dictionary; spell-checking looks
  3939. in the supplement, if the current word is not found in the main dictionary.
  3940. (See Swap Buffer (C-w).  See Check & Collect (R-l), which loads in a
  3941. supplemental dictionary, UdSupplement, and adds words to it.  See Sort Lines
  3942. (SA-s); it can sort an existing list of words alphabetically.)
  3943.  
  3944. 1.46.3 Spell-Check and Mark Words (R-m)
  3945.  
  3946. R-m spell-checks curFile from the cursor forward and puts an "@" character
  3947. after each word not found in the dictionary.  Spell-checking continues until
  3948. end-of-file or abort with Amiga-ESC.
  3949.  
  3950. 1.46.4 Spell-Check and Collect Bad Words (R-l)
  3951.  
  3952. R-l asks what dictionary supplement to use.  If none is specified, it opens a
  3953. "UdSupplement" file.  R-l loads an existing supplement file, if one exists.
  3954. For every word not found in the dictionary during spell-checking, R-l adds
  3955. the word to the supplement if it is not already there.  The words are added
  3956. in alphabetical order as a stacked list, with one word on each line.  Spell-
  3957. checking continues until end-of-file or abort with Amiga-ESC.
  3958.  
  3959. UdSupplement may be used as a supplemental dictionary and can be merged with
  3960. dict.A-dict.Z.  Supplemental dictionaries are not compressed; they are
  3961. readable files that can be edited.  This makes them slower to use in spell-
  3962. checking and less space efficient to store, but easier to modify, and
  3963. different supplements may be maintained for different purposes.  (See R-c,
  3964. Spell Check.)
  3965.  
  3966. 1.46.5 Merge Supplement with Dictionary (R-d)
  3967.  
  3968. R-d merges a stacked list of words (dictionary supplement) in curFile with
  3969. the dictionary files dict.A-dict.Z.  Dict.A-dict.Z must be in the current
  3970. directory.  The words should be in a stacked list with one word on each line.
  3971. The list should be in at least first-letter alphabetical order, for best
  3972. speed.  (Use Check & Collect (R-l) to create the list, and it is created in
  3973. alphabetical order.)
  3974.  
  3975. Words already in dict.A-dict.Z are not added by R-d.  Before using R-d, make
  3976. a backup copy of dict.A-dict.Z for safety.  Also before using R-d, edit the
  3977. list of words, removing any that should not be merged with the dictionary.
  3978. But if words are added by R-d which need to be removed later on, use Del From
  3979. Dict (R-e).  After dict.A-dict.Z have been updated, run UdBuild to rebuild
  3980. the working dictionary.
  3981.  
  3982. 1.46.6 Delete from Dictionary (R-e)
  3983.  
  3984. R-e deletes a stacked list of words in curFile from the dictionary files
  3985. dict.A-dict.Z.  Dict.A-dict.Z must be in the current directory.  For best
  3986. speed, the words should be in first-letter alphabetical order.  Use R-e to
  3987. remove words mistakenly added using R-d.
  3988.  
  3989. 1.46.7 Free Speller (R-f)
  3990.  
  3991. R-f removes the table and working dictionary from Uedit's memory.  If Udict
  3992. was being accessed on disk, it closes the Udict file.
  3993.  
  3994. 1.46.8 Dict.A-Dict.Z
  3995.  
  3996. Dict.A through dict.Z are readable, editable dictionary files.  They have
  3997. over 40,000 words in them.  UdBuild reads dict.A-dict.Z and builds a working
  3998. dictionary and dictionary table.
  3999.  
  4000. In dict.A through dict.Z, words beginning with A must be in dict.A; words
  4001. beginning with B in dict.B, and so on.  Words must be in strict alphabetical
  4002. order.  They must be 32 characters or less in length.  Only the letters A-Z
  4003. and the apostrophe (') are allowed in words.  Upper and lower do not matter;
  4004. case is ignored.  Words beginning with apostrophe (') must be put at the
  4005. front of dict.A in alphabetical order.  Hyphenated words must be entered as
  4006. separate words.
  4007.  
  4008. 1.46.9 Udict and Udtable
  4009.  
  4010. Udict and Udtable are the default working dictionary and table names.  The
  4011. speller programs (Uspell, Ufind, and UdBuild) can accept different working
  4012. dictionary and table names, if the -d and -t flags are used.  Uedit can use
  4013. different names for these also; but the Load Speller (R-u) command would have
  4014. to be customized in order to accept different dictionary and table names.
  4015. (See the Config!S file.)
  4016.  
  4017. A given working dictionary and table go together.  Uedit, Uspell and Ufind
  4018. may not work correctly, if a table from one UdBuild session is used with a
  4019. working dictionary from another.
  4020.  
  4021. When new words are added to dict.A-dict.Z and the working dictionary is
  4022. rebuilt with UdBuild, the size of Udtable may not increase much or at all due
  4023. to the new words, because Udtable contains a table of 3-letter prefixes and
  4024. only so many of these are used in words.  Udict does grow when words are
  4025. added, however, and the maximum size for a working dictionary is over a
  4026. billion bytes or several hundred million words.
  4027.  
  4028. 1.46.10 UdBuild
  4029.  
  4030. UdBuild reads dict.A-dict.Z and creates a dictionary table and working
  4031. dictionary.  To run UdBuild, in CLI type:  UdBuild
  4032.  
  4033. If dict.A and dict.Z are not in the current directory, you may specify the
  4034. directory they are in by typing:  UdBuild MySpellDir
  4035.  
  4036. To create a working dictionary and table using different names, type:
  4037.     UdBuild MySpellDir -dMyUdict -tMyUdtable
  4038.  
  4039. Building a dictionary takes several minutes.  Messages indicate which file
  4040. (dict.A-dict.Z) is being processed.  UdBuild errors that may be reported are:
  4041.  
  4042. * Word too long.  Words must be 32 characters or less.  If an over-long word
  4043.     is found, it is discarded and processing continues.
  4044. * Words not in alphabetical order.  In this event, words are skipped until
  4045.     one is found that restores alphabetical ordering.
  4046. * Illegal character in dict.A-Z.  Bad characters are skipped over. 
  4047. * No more room to write the dictionary or table.
  4048.  
  4049. Processing continues, despite errors, so that all error messages are
  4050. reported.  If errors are found, edit the faulty dict.A-dict.Z files and run
  4051. UdBuild again.
  4052.  
  4053. 1.46.11 Uspell
  4054.  
  4055. Uspell reads a text file and spell-checks the words in it.  It outputs the
  4056. words that are not in the dictionary.  If -oOutputFile is used, it outputs
  4057. the bad words to OutputFile, searching it first to see if the word has
  4058. already been added; thus, Uspell can create and update a dictionary
  4059. supplement.  (Note:  The words are not added in alphabetical order.  The list
  4060. may be alphabetized by using Sort Lines (SA-s) on it in Uedit.)
  4061.  
  4062. Uspell looks for Udict and Udtable in the current directory.  Using the -t
  4063. and -d flags, a different table, working dictionary, and directory may be
  4064. specified.  Using all options, running Uspell looks like this:
  4065.     Uspell MyDocument -oRAM:OutputFile  -dRAM:MyDictionary -tDF1:MyTable
  4066.  
  4067. For Uspell to work quickly, Udict should be copied to RAM:, because Uspell
  4068. accesses it randomly.  Uspell reads Udtable only once at startup, so Udtable
  4069. may be on disk.
  4070.  
  4071. Bad words are stored in the output file only once.  The output file must be
  4072. searched before each new word is added.  This makes performance slow, if the
  4073. output file is on disk and has a number of words in it.  The output file
  4074. should be copied to or created in RAM: to get better speed, if an output file
  4075. is used.
  4076.  
  4077. 1.46.12 Ufind
  4078.  
  4079. Ufind finds words in the working dictionary using wildcards.  It looks for
  4080. Udict and Udtable in the current directory.  The wildcards are "*" and "?"
  4081. for multiple and single characters, respectively.  Example:  To find words
  4082. ending with "ment" or "mint" type:
  4083.         Ufind *m?nt
  4084.  
  4085. A different working dictionary and table may be specified by using the -d and
  4086. -t flags.  An output file may be specified by using the -o flag.  Using all
  4087. options, using Ufind would look like this:
  4088.         Ufind *mask* -tMyTable -dMyDictionary -oMyOutput
  4089.  
  4090. If Udict is in RAM:, lookups with Ufind are a little faster, but not that
  4091. much because Ufind reads the dictionary serially; it works fairly well even
  4092. with Udict on disk.  Ufind reads Udtable only once at startup, so Udtable may
  4093. also be on disk.
  4094.  
  4095. 1.47 Hyper Text
  4096.  
  4097. A Uedit hyper text facility consists of a binary lookup table and a text file
  4098. that is organized to be used as a hyper text file.  The lookup table is built
  4099. with the UHC (Uedit Hyper Create) program.  As you will see, it is quite easy
  4100. to create a custom hyper text facility.
  4101.  
  4102. A sample hyper text facility is provided on the Uedit disk.  To use it,
  4103. HyperSample and HyperSample.tbl must be in S: or the current directory.  You
  4104. must open hyper text using Open HT (R-gadget3).  Then use Click Hyper Word
  4105. (R-buttonDown) or Input Hyper Word (R-gadget1) to select hyper word and bring
  4106. up the the hyper text window.  When completely finished using hyper text,
  4107. close it with Close HT (R-gadget4).
  4108.  
  4109. While in the hyper text window, use the following commands:
  4110.     ESC:            close hyper text window
  4111.     buttonDown:     scroll or place cursor
  4112.     arrow keys:     move cursor and scroll
  4113.     R-buttonDown:   look up word that is clicked
  4114.     Return          look up the cursor word
  4115.     f1:             go to beginning of lookup table
  4116.     f2:             go to parent of current hyper word
  4117.     f3:             go to child of current hyper word
  4118.     f4:             go to next sibling of current hyper word
  4119.     f5:             go to previous sibling of current hyper word
  4120.     f6:             step back through last 20 hyper words looked up
  4121.     f7:             get hyper word input and look it up
  4122.     f8:             go forward to next hyper word in lookup table
  4123.     f9:             go backward to previous hyper word in lookup table
  4124.  
  4125. 1.47.1 Open HT (R-gadget3)
  4126.  
  4127. R-gadget3 loads in the sample hyper text file, HyperSample, and its lookup
  4128. table, HyperSample.tbl.  (These must be in the current directory, unless you
  4129. customize this command to make it look elsewhere for them.)
  4130.  
  4131. 1.47.2 Click Hyper Word (R-buttonDown)
  4132.  
  4133. R-buttonDown opens the hyper text window and looks up the word that was
  4134. clicked.  If it happens to be a hyper word, its text, if any, is displayed.
  4135. A hyper phrase (2 or more words) can be click-selected, if it is enclosed in
  4136. angle brackets <>.  Use ESC to close the hyper text window.
  4137.  
  4138. 1.47.3 Input Hyper Word (R-gadget1)
  4139.  
  4140. R-gadget1 asks for a hyper word input.  Type in a word or phrase and press
  4141. ESC.  The hyper text window opens and displays the hyper text, if any, for
  4142. that word.  To close the hyper text window, press ESC.
  4143.  
  4144. 1.47.4 Close HT (R-gadget4)
  4145.  
  4146. R-gadget4 closes the hyper text facility, freeing its memory.
  4147.  
  4148. 1.47.5 Hyper Words
  4149.  
  4150. A hyper word is any word (or phrase) for which you would like to be able to
  4151. look up help information.  The first 17 characters of a hyper word (or
  4152. phrase) are stored in a lookup table along with the byte offset into the
  4153. hyper text file where the word is defined.  Single words in any buffer can be
  4154. click-selected and looked up instantly.  Hyper phrases (2 or more words) can
  4155. be click-selected, if they are enclosed in angle brackets <>.  (See Click
  4156. Hyper Word (R-buttonDown) and Input Hyper Word (R-gadget1).)
  4157.  
  4158. 1.47.6 Hyper Text Files
  4159.  
  4160. A sample hyper text file and lookup table are provided on the Uedit disk.
  4161. The text file is HyperSample and its lookup table is HyperSample.tbl.
  4162. HyperSample contains help for the standard Uedit commands and hyper text.
  4163. Load HyperSample into Uedit and look it over, as you read these sections
  4164. about hyper text.
  4165.  
  4166. A hyper text file is a text file consisting of sections defining hyper words.
  4167. Up to 65535 hyper words may be defined in a hyper text file.  A section
  4168. begins with a formfeed (ASCII 12).  Next is the Parent Line containing the
  4169. <parent hyper word> in angle brackets.  (The parent hyper word must be
  4170. defined before its children are.)  Next is the Word Line with the new <hyper
  4171. word> being defined; the new <hyper word> must be at the start of its line in
  4172. angle brackets.  Other <related hyper words> or text may follow on the Word
  4173. Line.  Below the Word Line is any amount of text, which may contain hyper
  4174. words with or without angle brackets.  A formfeed (ASCII 12) beginning the
  4175. next section (or end of file) marks the end of the current section.  Sections
  4176. should be brief, 10 or 20 lines, but no size limit is imposed.
  4177.  
  4178. Section outline:
  4179. FORMFEED                                                ((start of section))
  4180. <parent hyper word>                                     ((Parent Line))
  4181. <new hyper word>  <related word> <related word> ...     ((Word Line))
  4182. text.....................................
  4183. text.....................................
  4184. text.....................................
  4185. FORMFEED                                                ((next section))
  4186.  
  4187. The very first section in a hyper text file has an empty Parent Line, because
  4188. it has no parent.  All other sections must have a <parent hyper word> in
  4189. their Parent Line.  Hyper phrases (2 or more words) that are included in the
  4190. text area should be enclosed in angle brackets <>, if they are to be
  4191. selectable.  Single hyper words do not need brackets in order to be
  4192. selectable.  Formfeeds must not be used in the text area, because a formfeed
  4193. marks the start of a new section.
  4194.  
  4195. 1.47.7 Parent, Child, Sibling
  4196.  
  4197. Each hyper word has a parent.  Only the very first hyper word has no parent,
  4198. because it is the parent, grandparent, etc, of all other hyper words.  Each
  4199. hyper word (except the very first) may have siblings who share the same
  4200. parent.  Each hyper word may have children.  A parent must exist before its
  4201. children are defined, or else UHC cannot build the lookup table.  The
  4202. organization of a hyper text file is very much like that of a manual or text
  4203. book:  First you define the children of the most recent hyper word before
  4204. going on to define its siblings, just as in a reference manual you cover the
  4205. subsections of the current section before starting on the next main section.
  4206. (See UHC, 1.47.10.)
  4207.  
  4208. 1.47.8 Uniqueness
  4209.  
  4210. Upper/lower case is ignored in hyper words.  But spaces in hyper phrases do
  4211. matter; use just one space between words in a hyper phrase.  A hyper word
  4212. cannot use the same spelling as its parent, child, or sibling.  Other than
  4213. that, hyper words do not have to be unique.
  4214.  
  4215. Technical info:  Associated with each hyper word is its index in the lookup
  4216. table.  When calling the hyper() CL function to do a lookup, you may include
  4217. both a hyper word and an index argument.  If the hyper word is not unique,
  4218. the index helps in locating the right incarnation of the word.  Example:
  4219. Suppose Help has children Cursor and Scroll.  Cursor and Scroll each have a
  4220. child Commands.  The child (Commands) of Cursor can be found if you call
  4221. hyper(), passing it the hyper word "Commands" and the table index of Cursor
  4222. along with a flag value of 2.  Flag=2 causes a lookup algorithm to be used.
  4223. Flag=1 would probably also find the right Commands (the one that is a child
  4224. of Cursor).
  4225.  
  4226. 1.47.9 Lookup Table
  4227.  
  4228. After a hyper text file has been written using Uedit, a binary lookup table
  4229. is built for it using the UHC program (Uedit Hyper Create).  Each time you
  4230. modify a hyper text file, you must rebuild its lookup table, because the
  4231. table stores byte offsets to sections in the text file.
  4232.  
  4233. Technical info:  UHC gets the following information for each hyper word and
  4234. stores it in the binary lookup table:  the first 17 characters of the hyper
  4235. word (or phrase); byte offset to its section in the hyper text file; parent's
  4236. index; child's index (if any); next sibling's index (if any); previous
  4237. sibling's index (if any); level or generation.  The index is simply the entry
  4238. number in the binary lookup table.  There may be up to 65535 hyper word
  4239. entries.  The first hyper word has level 0; its children have level 1; their
  4240. children have level 2; and so on.  (See hyper() in 3.4 concerning the various
  4241. lookup methods and related info.)
  4242.  
  4243. 1.47.10 UHC (Uedit Hyper Create)
  4244.  
  4245. The UHC program creates a binary lookup table for a hyper text file.  The
  4246. hyper text file must consist of sections as described earlier.  For example,
  4247. to use UHC to rebuild the lookup table for HyperSample, type the following in
  4248. CLI:
  4249.     UHC HyperSample HyperSample.tbl
  4250.  
  4251. After you have created a custom hyper text file, run UHC to create its lookup
  4252. table.  Each time you modify the hyper text file, you must again run UHC to
  4253. rebuild its lookup table.
  4254.  
  4255. UHC reports any error that it finds.  A common error is failing to define the
  4256. parent hyper word before defining its child, or misspelling the parent hyper
  4257. word.  UHC reports the hyper text file line number of the error.
  4258.  
  4259. 1.47.11 Creating a Custom Hyper Text Facility
  4260.  
  4261. Only 3 simple steps are involved in creating a custom hyper text facility:
  4262. (1) Create your custom hyper text file using Uedit.  Load HyperSample into
  4263. Uedit and use it as an example.  (2) Save your hyper text file to disk and
  4264. run UHC to create a lookup table for it.  Correct the errors UHC reports
  4265. until you succeed in building the lookup table.  (3) Load Config!H into Uedit
  4266. and customize the R-gadget3 (Open HT) command.  Make it load your hyper text
  4267. file and lookup table instead of HyperSample and HyperSample.tbl.  Put the
  4268. cursor above the command and press f6 to compile it.  Select Save Data (A-f6)
  4269. to save the modified configuration for permanent use.
  4270.  
  4271. That's all there is to it.  Now you can use your custom hyper text facility.
  4272. Open hyper text using R-gadget3.  You can use the other hyper text commands
  4273. just as they are to access your new hyper text facility.
  4274.  
  4275. 1.48 Grep
  4276.  
  4277. With grep you can search for patterns in the text and optionally clear or
  4278. replace or rearrange parts or all of the matched area.  Being slower and not
  4279. as simple, grep should only be used when the search string is too complex for
  4280. the faster search method which uses simple wildcards (? and *) or when the
  4281. replace operation you need cannot be done using the simple Search and Replace
  4282. commands (f9 and f10).
  4283.  
  4284. Uedit's grep uses a superset of the standard symbols for pattern matching.
  4285. Also other greps usually require using symbols like \f, \r, and \n for
  4286. formfeed, return, and newline, but with Uedit's grep you can simply type
  4287. control characters into the search and replace strings.  Grep searching may
  4288. be aborted with Amiga-ESC.
  4289.  
  4290. 1.48.1 Set Grep (L-f7)
  4291.  
  4292. In a grep string, the first character is taken as the delimiter.  It delimits
  4293. the replace string, if any, from the search string.  A trailing delimiter is
  4294. optional.  In the following example, the search string is "abc", the replace
  4295. string is "def", and slash (/) is the delimiter:  /abc/def/
  4296.  
  4297. L-f7 displays the existing grep search and replace strings separated by
  4298. delimiters.  The cursor is automatically placed at the beginning of the
  4299. search string.  Type in the desired search and replace strings and terminate
  4300. the input with pmESC.  When you terminate the input a search forward is done.
  4301.  
  4302. Grep search and replace strings may be up to 63 characters in length, not
  4303. counting the delimiters.  To embed a delimiter in a search or replace string,
  4304. put a backslash (\) before it.  For example, the following grep string
  4305. searches for "abc/":  /abc\//
  4306.  
  4307. You can use the delimiter to define or cancel search and replace strings:
  4308.     /       cancel existing search and replace strings
  4309.     ///     keep existing search string; cancel existing replace string
  4310.     /abc/   input search string abc; keep existing replace string
  4311.     /abc//  input search string abc; cancel existing replace string
  4312.     //def/  keep existing search string; input replace string def
  4313.  
  4314. The search and replace strings may use bracketed Regular Expressions (RE)
  4315. \(..\) and special symbols for pattern matching.  These will be discussed
  4316. later on.  (See Regular Expressions, Symbols, and Examples, 1.48.6.)
  4317.  
  4318. Case sensitivity:  If case sensitivity is Off, upper and lower case are
  4319. treated equally in grep searches just as they are in ordinary searches.  If
  4320. case sensitivity is turned On, upper and lower case are not the same.  (See
  4321. Case Sensitivity (C-8).)
  4322.  
  4323. 1.48.2 Grep Fwd (L-f9)
  4324.  
  4325. L-f9 does a grep search forward.  If the search fails, "Search failed" is
  4326. reported.  If the search is successful, the matched area is colored as an
  4327. invert region and the cursor rests at the start of the matched area.
  4328.  
  4329. 1.48.3 Grep Bkwd (R-f9)
  4330.  
  4331. R-f9 does a grep search backward.  If the search fails, "Search failed" is
  4332. reported.  If the search is successful, the matched area is colored as an
  4333. invert region and the cursor rests at the end of the matched area.
  4334.  
  4335. 1.48.4 Grep Search & Replace Fwd (L-f10)
  4336.  
  4337. L-f10 does a grep search forward.  If successful, it replaces the matched
  4338. area with the replace text.  If no replace string is defined, the matched
  4339. area is cleared.
  4340.  
  4341. 1.48.5 Grep Search & Replace Bkwd (R-f10)
  4342.  
  4343. L-f10 does a grep search backward.  If successful, it replaces the matched
  4344. area with the replace text.  If no replace string is defined, the matched
  4345. area is cleared.
  4346.  
  4347. 1.48.6 Regular Expressions, Symbols, and Examples
  4348.  
  4349. A regular expression (RE) defines a set of one or more strings of characters.
  4350. A regular expression is said to match any string it defines.  A grep search
  4351. string is a regular expression and may contain embedded bracketed REs \(...\)
  4352. as well.  The following standard symbols are special when used within regular
  4353. expressions:
  4354.         Special symbol   Function
  4355.         --------------   --------
  4356.         .                (period) match any single character except eol or formfeed
  4357.         [abc] or [a-c]   define a character class that matches a b or c
  4358.         [a-x]            define a character class that matches a to x
  4359.         [^abc] or [^a-c] define a class matching anything but a b or c
  4360.         *                (asterisk) match 0 or more occurrences of a match of the
  4361.                             preceding character or RE
  4362.         ^                (carat) force a match to start of line
  4363.         \                to quote special characters
  4364.         \(abc\)          match what abc matches (a bracketed RE)
  4365.         \1 to \9         represents the 1st (to 9th) matched bracketed RE
  4366.                             in the search string
  4367.  
  4368. To include a special symbol or delimiter literally in a search string,
  4369. precede it with a backslash (\).  In Uedit, control characters such as
  4370. formfeed, newline, tab, and carriage return may be typed into buffers, so it
  4371. isn't necessary to use special symbols for them in search strings.  For
  4372. instance, to force a match to end of line, just type an eol (ASCII 10) into
  4373. the search string; similarly, for tab, formfeed, carriage return, and most
  4374. other control characters, just type them into the search string.  (\r may be
  4375. used for carriage return and \n for newline, if you wish.)
  4376.  
  4377. Uedit uses an enhanced set of special symbols, and the following additional
  4378. symbols are special when used within regular expressions:
  4379.         Special symbol   Function
  4380.         --------------   --------
  4381.         \n or ASCII 10   force a match to end of line
  4382.         \r or ASCII 13   match to a carriage return
  4383.         :c               match to any control character
  4384.         :@               match to any control character except LF or  FF
  4385.         :w               match to whitespace (space or tab)
  4386.         :b               match to a backspace (ASCII 8)
  4387.         :!               match to ASCII 0-31 or 128-255 except LF or FF
  4388.         :?               match to any character, including LF and FF
  4389.         :l               match to any lower case alpha
  4390.         :u               match to any upper case alpha
  4391.         :A               match to any alpha (upper/lower case) or apostrophe
  4392.         :a               match to any alpha (upper/lower case)
  4393.         :N               match any alpha (upper/lower) or digit or apostrophe
  4394.         :n               match any alpha (upper/lower) or digit
  4395.         :d or :#         match any digit
  4396.         :o               match any octal digit (0-7)
  4397.         :x or :h         match any hex digit (0-9 A-F or a-f)
  4398.         |                OR, divides 2 or more alternative search strings
  4399.                             (when used inside an RE it divides that RE only)
  4400.         :s               force a match to start of file
  4401.         :e               force a match end of file
  4402.         \<               force a match to start of word
  4403.         \>               force a match to end of word
  4404.         :<               previous character
  4405.         :>               next character
  4406.  
  4407. The :< and :> symbols let you test the previous or next character to see
  4408. whether it satisfies a given condition such as belonging to a set [].  If :<
  4409. is used at the start of a search string, the character is not selected but
  4410. you can test it.  If :> is used at the end of a search string, the character
  4411. again is not selected but you can test it.  If used in the middle of a search
  4412. string, :< enables you to back up and perform another test on the previous
  4413. character.  Examples:
  4414.     /:<[a-z]xyz/            Selects xyz only if the char before it is a-z.
  4415.     /abc[a-z]:<[^tx]def/    Selects abc?def; ? is any of a-z but not t or x.
  4416.     /abc:>[a-z]/            Selects abc only if the character after it is a-z.
  4417.  
  4418. In replace strings, the following symbols are special:
  4419.         Special symbol   Function
  4420.         --------------   --------
  4421.         &                stands for the entire matched text from the search
  4422.         \1 to \9         represents the 1st (to 9th) matched RE from the search
  4423.  
  4424. The OR (|) symbol and RE numbering:  Ordinarily \1...\9 represent the matched
  4425. area of the 1st through 9th REs, numbering the REs in the search string from
  4426. left to right.  If referenced in the replace string, \1...\9 have the same
  4427. meaning.  Example:
  4428.         /\(abc\)def\(ghi\)\1/\2\1/
  4429. This matches abcdefghiabc and replaces it with ghiabc.  Another example:
  4430.         /\(now\) is the time/&, \1/
  4431. This matches "now is the time" and replaces it with "now is the time, now".
  4432. Note that the ampersand (&) in the replace string refers to the entire
  4433. matched area.
  4434.  
  4435. But when the OR (|) is used in a search string, it may change how REs are
  4436. numbered.  For instance, if there is one RE on each side of an OR (|), both
  4437. REs are assigned the same RE number because only one of them is ever matched.
  4438. An OR (|) divides only the RE it is in; if in the outer search string, it
  4439. divides the outer search string; if inside a bracketed RE, it divides only
  4440. that RE.  Multiple ORs may be used within the same RE.
  4441.  
  4442. In the following example, you can see how RE numbers (1-9) are assigned when
  4443. the OR (|) is used.  For clarity, RE brackets \( and \) have been shortened
  4444. to ( and ), and no text was used in the search string.  The numbers on the
  4445. second line are the RE number of the RE that is beginning '(', or ending ')',
  4446. or current '|'; RE #0 refers to the outer search string:
  4447.              / ( ( ) | ( ) ( ( ) ( ) | ( ) ) ( ) | ( ) ) ( ) | ( ) /
  4448.                1 2 2 1 2 2 3 4 4 5 5 3 4 4 3 6 6 1 2 2 1 7 7 0 1 1
  4449.  
  4450. In the above skeletal example, notice how RE numbers are reused following an
  4451. OR.  Study the example carefully to understand how numbers are assigned to
  4452. REs.  The way in which REs are numbered is important, if you use the \1...\9
  4453. symbols in a search or replace string.  The numbering may be tricky if ORs
  4454. are used, but it is monotonically increasing when OR is not used.
  4455.  
  4456. When OR is used, a particular match may result in a certain RE's not being
  4457. matched.  If an unmatched RE number appears in a replace string, it is
  4458. ignored when the replace is done.  Example:
  4459.     /\(abc\)x|y\(def\)z\(ghi\)/\2\1/
  4460.     If abcx is matched:  \1 is abc, \2 is undefined.  The replace text is abc.
  4461.     If ydefzghi is matched:  \1 is def, \2 is ghi.  The replace text is ghidef.
  4462.  
  4463. The backslash (\):  If a backslash precedes a character, the character is
  4464. taken literally, provided the backslash and character do not make up a
  4465. special symbol such as \(, \), or \1...\9.  Two backslashes \\ embed a single
  4466. backslash in a search or replace string.  Backslash followed by a delimiter
  4467. character embeds the character literally.
  4468.  
  4469. Grep string examples:  (Note that when the asterisk (*) is used, forward
  4470. searching selects the longest match, but backward searching selects the
  4471. shortest match.)
  4472.  
  4473.     String              Match
  4474.     ------              -----
  4475.     /.alk/              talk, walk, balk
  4476.     /abc\/def/          abc/def
  4477.     /[bB]ill/           bill or Bill
  4478.     /t[aeiou].k/        talk, took, teak, tank
  4479.     /number [03-5]/     number 0, number 3, number 4, number 5
  4480.     /[^a-zA-Z]/         any character not in a-z or A-Z
  4481.     /ab*c/              ac, abc, abbc, abbbc
  4482.     /ab.*c/             longest string beginning with ab and ending with c
  4483.                         abc, abxc, ab495c, ab 700 x c
  4484.     /t.*ing/            ting, thing, thought of going
  4485.     /[a-z A-Z]*/        longest string consisting of letters & spaces
  4486.     /(.*)/              longest string bounded by ( and ):
  4487.                         (this) and (that)
  4488.     /([^)]*)/           shortest string bounded by ( and ):
  4489.                         (this), (this and that)
  4490.     /^This/             line beginning with This
  4491.     /stop\./            stop.
  4492.     /^[0-9][0-9]*\./    any 1 or more digit number at the beginning of a line
  4493.                         and followed by a period
  4494.     /\\/                \
  4495.     /\*/                *
  4496.     /\[0\]/             [0]
  4497.     /and\/or/           and/or
  4498.     /Th.*is/            longest string beginning with "Th"
  4499.                         and ending with "is"
  4500.     /\(abc\)/           what /abc/ would match
  4501.     /a\(b*\)c/          what /ab*c/ or /a\(b\)*c/ would match
  4502.     /:d:d*/             any 1 or more digit number
  4503.     /[0-9][0-9]*/       any 1 or more digit number
  4504.     /0[xX]:x:x*/        any hexadecimal number
  4505.     /this|that/         this or that
  4506.     /\<con/             words beginning with con
  4507.     /ion\>/             words ending with ion
  4508.     /hero\(es\)*/       hero or heroes
  4509.     /Help!*/            Help, Help!, Help!!
  4510.     /Help!!*/           Help!, Help!!, Help!!!
  4511.     /abc\(def|ghi\)/    abcdef or abcghi
  4512.  
  4513.  
  4514. Advanced examples:
  4515.     /^\(.*\n\)\1/\1/    finds pairs of identical lines and deletes one of them
  4516.     /find me/& first/   changes "find me" to "find me first"
  4517.     /[0-9][0-9]*/nnn&nnn/   brackets any 1 or more digit number with nnn
  4518.  
  4519.  
  4520. 1.49  Folds
  4521.  
  4522. To fold a file means to "hide detail", creating a sort of outline consisting
  4523. only of the desired text lines, such as headings (in documents) or function
  4524. names (in program modules).  When curFile is folded, the resulting text is
  4525. put into a new file buffer using curFile's name with a ".fold" extension.
  4526.  
  4527. Folding is line-oriented, for the most part.  The folding process consists of
  4528. examining each line of text in curFile, and applying one or more tests in
  4529. order to see whether to skip (fold) the line or keep it, putting it into the
  4530. curFile.fold buffer.
  4531.  
  4532. 1.49.1  Set Fold (L-\)
  4533.  
  4534. L-\ displays the current testing steps and lets you modify them.  Up to 16
  4535. testing steps can be applied in the folding process.
  4536.  
  4537. Each testing step has associated with it the following:
  4538.     Step number (1 to 16).
  4539.     Description of the testing option F used in the step.  (See the table below.)
  4540.     X value; X is a number, if indentation or line-length is used by test F,
  4541.         and X is a text string for the other tests.
  4542.     SKA value; 0=Skip, 1=Keep, 2=And.
  4543.  
  4544. The testing options F are the following:
  4545. 1   line is blank                       (X ignored)
  4546. 2   indentation = X
  4547. 3   indentation < X
  4548. 4   indentation > X
  4549. 5   line-length = X
  4550. 6   line-length < X
  4551. 7   line-length > X
  4552. 8   1-4 character string X (eg, "x" or "abcd") is in the line
  4553. 9   1-4 character string X is at start-of-line
  4554. 10  1-4 character string X is at end-of-line
  4555. 11  character in range X (eg, "AZ" or "09") is in the line
  4556. 12  character in range X is at start-of-line
  4557. 13  character in range X is at end-of-line
  4558. 14  rgn bounded by quotes or brackets in X (eg, "\"\"" or "[]") is in line
  4559. 15  rgn bounded by quotes or brackets in X may be in multi-lines
  4560.  
  4561. L-\ displays the currently existing testing steps and the testing options F
  4562. that testing steps may use.  The testing steps are numbered 1 to 16.  Step
  4563. numbers may be skipped; that is, you may define steps 2 and 4, leaving steps
  4564. 1 and 3 undefined and available for future changes.
  4565.  
  4566. Each testing step that exists uses a testing option F (1 to 15), from the
  4567. table above.  To remove testing step T, specify the step number T and specify
  4568. -1 for the testing option.  Alternatively, you can define step T again and
  4569. the new definition supercedes the old one.
  4570.  
  4571. Each testing step also uses an X value (text string or indentation or line-
  4572. length, depending on the testing option F) and an SKA value.  (See the table
  4573. above.)
  4574.  
  4575. SKA is used ONLY if the test succeeds:  That is, the line is a blank line (if
  4576. F=1) or the line's indentation is > X (if F=4), and so on.  The line is
  4577. simply skipped by default (does not end up in curFile.fold), if none of the
  4578. testing steps succeeds.
  4579.  
  4580. SKA means SKIP/KEEP/AND.  Assuming that a testing step succeeds, SKIP means
  4581. to skip the line; KEEP means to keep it - that is, to put it into the
  4582. curFile.fold buffer; AND means to AND the current testing step with the next
  4583. one.  Both AND and OR behavior may be used in conjunction with the testing
  4584. steps:
  4585.  
  4586. OR:  The testing steps (which exist) are performed on each line of text in
  4587. curFile, starting with step 1.  The serial order is like ORing the sequence
  4588. of tests.  If the current test succeeds and SKA=SKIP or KEEP, the line is
  4589. skipped or kept (put into curFile.fold) accordingly.  No other tests are
  4590. tried on that line of text.  If the current test fails, the next testing step
  4591. is tried.  This is OR behavior.
  4592.  
  4593. AND:  If SKA=AND, the current testing step is ANDed with the next testing
  4594. step.  If the current test fails, the next step and all subsequent ones that
  4595. were ANDed with it are bypassed.  If the current test succeeds, the next test
  4596. is tried; and if it also succeeds, then its SKA dictates the action to be
  4597. taken (SKIP or KEEP the line, or AND with the next step).
  4598.  
  4599. Order of tests:  The order in which the tests are performed is critical.
  4600. Also whether SKA is SKIP or KEEP makes a big difference, obviously.  If no
  4601. testing step uses SKA=KEEP, no lines are kept and curFile.fold is empty.
  4602. When curFile.fold does not look as you had hoped, press L-\ and look at the
  4603. current testing steps.  Try these questions:
  4604.     1) Should test A come AFTER test B instead of before it?
  4605.     2) Is test A SKIPping lines before test B has a chance to KEEP them?
  4606.     3) Should a test be redefined to KEEP instead of SKIP or vice versa?
  4607.     4) Does at least one test use KEEP?  (If not, no lines are kept!)
  4608.     5) Does the last test use SKIP or AND?  (If so, it achieves nothing.)
  4609.  
  4610. Folding can look for single or multi-line regions enclosed in single-
  4611. character brackets such as quotes or parens.  It does not look for multi-line
  4612. regions enclosed in 2-character brackets, such as the comment brackets of the
  4613. C (/* and */) and Pascal programming languages.  However, using slashes as
  4614. brackets "//" will work in C program modules, if "/" is not used anywhere
  4615. except in comment brackets.  (See tests F=14 and F=15 in the F table above.)
  4616.  
  4617. Blank lines:  If F=1 (line is blank) and SKA=KEEP in a testing step, this
  4618. specifies that blank lines be kept.  This is recommended for readability,
  4619. because if several blank lines are in series, only one blank line is kept.
  4620.  
  4621. Default testing steps:  If no testing steps have been defined, by default
  4622. Uedit defines two steps:  1) keep blank lines, and 2) keep lines with no
  4623. indentation.  Folding a program source module using the default tests may
  4624. yield a fair outline of the module.  However, the default tests aren't useful
  4625. for folding most documents, because they keep all the unindented detail and
  4626. skip all the indented section headers.
  4627.  
  4628. 1.49.2  Fold curFile (R-\)
  4629.  
  4630. R-\ folds curFile using the testing steps that are currently in use.  The
  4631. folded text is put into a new file buffer named curFile.fold.  Note that
  4632. multiple (or nested) folding is possible, by folding curFile.fold, then
  4633. curFile.fold.fold, and so on, using different sets of folding tests.  R-\
  4634. asks if you want to include line numbers.  If you select line numbers, you
  4635. can use the Goto Source (A-\) command below.  (See Set Fold (L-\).)
  4636.  
  4637. 1.49.3  Goto Source (A-\)
  4638.  
  4639. A-\ works as follows:  First, you must have used the line numbers option when
  4640. folding the source file.  Put the cursor in any line.  (They are all
  4641. numbered.)  A-\ will then take you to that line in the source file.
  4642.  
  4643.  
  4644. Part2 & Part22:::
  4645.  
  4646. Part 2.  Getting More out of Uedit
  4647.  
  4648. 2.1  CLI Command Line
  4649.  
  4650. A number of command-line flags may be used, when starting Uedit in CLI.  The
  4651. flags may be upper or lower case.  Here is an example using all of the flag
  4652. options:
  4653.  
  4654. run UE -A0xffff0000 -B11 -LmyLearn -K13 -CmyConfig -DmyData -SmyState files....
  4655.  
  4656. -A flag: set userGlobalA to value 0xffff0000.
  4657. -B flag: set userGlobalB to value 11.
  4658. -S flag: load state file "myState" (default is "uestate")
  4659. -L flag: run the learned sequence ("myLearn"), if the file exists.
  4660. -K flag: run key command (macroNum) 13, if the command exists.
  4661. -C flag: load and compile config file "myConfig" and its A-Z segments, if it exists.
  4662. -D flag: load data file "myData"; or, if -C is used, name the data "myData" in Uedit.
  4663.  
  4664. The -C and -D flags are acted upon first.  -CmyConfig causes myConfig and its
  4665. A-Z segments, if any, to be loaded and compiled.  If -C has no file name
  4666. following it, the standard config file, Config!, is loaded and compiled.
  4667. When -DmyData is used with -C, myData becomes the data file name that will be
  4668. used when you save the data during the edit session.  If -DmyData is used
  4669. without the -C flag, myData is loaded in instead of the standard data file,
  4670. Data!.
  4671.  
  4672. The A, B, L, S, & K flags are acted upon after -C and -D have been processed.
  4673. -A and -B set the values of userGlobalA and userGlobalB, respectively, which
  4674. are CL integer variables.
  4675.  
  4676. The sequence of events at startup is as follows:
  4677.         Read the flags and set the data file name, if -D is used.
  4678.         Load and compile the config, if -C is used; if it is not, load the data file.
  4679.  
  4680.     After the config has been compiled or the data file loaded in:
  4681.         If -A or -B was used, set the UserGlobal to the specified value.
  4682.         Load in the files specified for editing, if any.
  4683.         Load the state file specified, if any.
  4684.         Run the learned sequence, if -L was used.
  4685.         Run the key command, if -K was used.
  4686.  
  4687. Note that the files are loaded in before -LlearnedSeq and -KkeyCmd are
  4688. processed.  Thus, you can cause files to be loaded in and action taken upon
  4689. them, using a learned sequence or key command or both.  The UserGlobalA/B
  4690. values are set before -Llearnseq is run or -Kkeycommand is run, so the user
  4691. globals can affect the learned sequence or key command, if desired.
  4692.  
  4693. The above flags must come before any file names in the CLI command line.  The
  4694. learned sequence and key command that are named should exist, although no
  4695. harm is done if they do not.  Example:  95 is the MacroNum of the Help key.
  4696. "Run Ue -k95" runs the Help key automatically just after Uedit comes up.
  4697. (See Keys and MacroNums, 2.31.)
  4698.  
  4699. Common example:  Run Ue -c -dS:Data! file1 file2 ...
  4700.  
  4701. This loads and compiles the standard configuration, Config! and its A-Z
  4702. segments; Uedit looks for Config! first in the current directory and, if not
  4703. there, in S:.  After it compiles Config! and its A-Z segments, it asks if you
  4704. want to save the new data.  The -d flag tells it that the data file is
  4705. S:Data!.  Selecting Yes on the "Save new data?"  question causes Uedit to
  4706. save the newly compiled configuration as the file S:Data!.  (Without the "-
  4707. dS:Data!", Uedit saves Data! in the current directory by default, when you
  4708. select Yes on the "Save new data?" question.)
  4709.  
  4710. 2.2 More About Primitive Mode
  4711.  
  4712. Primitive Mode is what Uedit is, when you take away its commands and are left
  4713. with the bare bones of typing, single-character deletes, and cursor
  4714. movements.  Normal editing commands, such as Delete Line (C-d) or placing the
  4715. cursor with the left mouse button, do not work in Primitive Mode.  PM
  4716. originated because a way was needed for the user to "bootstrap" Uedit into
  4717. existence, if no config file happened to be available.
  4718.  
  4719. Primitive Mode is invoked by either of two CL functions, inputString() or
  4720. inputNum().  It is not necessary to use PM for text and number inputs.
  4721. Custom input routines could be written in the CL that let you use all of the
  4722. editing commands during string and number inputs.  EditBuf() could be used in
  4723. place of inputString() or inputNum() in such a routine, but a certain amount
  4724. of coding would be required because editBuf() "falls through" to the next
  4725. function, whereas inputString() and inputNum() keep accepting inputs until
  4726. pmEsc is input.  Another approach would be to use the single-input function
  4727. getKeyVal() and a split window; in the input routine, characters that you
  4728. input would be typed in using typeChar() and keys that you input would be run
  4729. using runKey().  When only a single character or key input is required,
  4730. getKeyVal(), getChar(), and getKey() are more user friendly than either
  4731. Primitive Mode or editBuf(), because Primitive Mode has to be terminated by
  4732. inputting pmEsc or a mouse click and a routine using editBuf() would require
  4733. some method of terminating input as well.
  4734.  
  4735. Primitive Mode is convenient to use for string and number inputs, however,
  4736. for a number of reasons:  InputString() and inputNum() "hang up" until the
  4737. user is finished inputting, whereas editBuf() does not.  PM allows direct
  4738. typing of control characters, handles the display by itself, and only
  4739. consumes as many lines in the window as are typed in.  Nonetheless, if you so
  4740. desire, the use of PM could be eliminated by replacing all occurrences of
  4741. inputString() and inputNum() in the standard config with a different method
  4742. of collecting string and number inputs.  (See the CL input functions in 3.4.)
  4743.  
  4744. 2.3 Config, Data, and Customizing
  4745.  
  4746. A config is a readable, editable source file that is the source of the
  4747. default values and command definitions that Uedit is to use.  A config has a
  4748. root file (segment), such as MyConfig, and may use up to 26 extension files
  4749. (segments), MyConfigA through MyConfigZ.  (See Config Segments, 2.5.)
  4750.  
  4751. Uedit can compile a whole configuration at startup or during an edit session
  4752. you can compile individual commands or the config defaults.  When Uedit is
  4753. compiling, it compiles only the parts that are enclosed in angle brackets
  4754. "<...>".  Anything outside the angle brackets is ignored.  When compiling a
  4755. config at startup, Uedit pulls in and compiles each of the config's segments,
  4756. if any exist, automatically.
  4757.  
  4758. The first thing in the root segment of a configuration must be a list of
  4759. defaults, which are flags and numerical settings enclosed in angle brackets.
  4760. Following the defaults in the root segment, any number of command definitions
  4761. may appear, in any order.  There may be up to 26 additional config segments,
  4762. ending with the letters A-Z.  Command definitions are written in CL and are
  4763. enclosed in angle brackets.  The smallest possible config would contain, as a
  4764. minimum, a list of default values like those at the beginning of Config!.
  4765. (See Config Defaults, 2.4.)
  4766.  
  4767. The standard configuration provided with Uedit is Config!, and it uses the
  4768. following segments:  Config!H (hyper text, grep, bookmarks), Config!M
  4769. (miscellaneous), Config!P (printing, paging), Config!R (Rexx), Config!S
  4770. (spelling, split windows), and Config!Z (new or modified commands, if it
  4771. exists).
  4772.  
  4773. A data file is the compiled, binary image of a config.  When a config is
  4774. compiled by Uedit, first it reads the default values and then it reads the
  4775. command definitions, compiling them into binary pcode.  It is in this binary
  4776. form that Uedit's "data" is stored on disk as a data file, such as MyData or
  4777. Data!.  Data files contain the version number of the Uedit program that
  4778. created them and they cannot be used with other versions of Uedit.
  4779.  
  4780. Uedit's "data" at any given time consists of all commands and values it is
  4781. currently using.  The numerical and flag values, such as lineLength,
  4782. wordWrap, margins, and colors, defined originally in the config's defaults,
  4783. are part of Uedit's "data".  If you make changes to the "data" during an edit
  4784. session, such as by compiling a new command or swapping keys or changing
  4785. colors or lineLength, you can save the data to disk by using Save Data (A-
  4786. f6), and your custom modifications are preserved for future use.
  4787.  
  4788. The standard data file is Data!.  Data! can be recreated anytime by compiling
  4789. Config!.  Uedit loads Data! automatically at startup, unless told to do
  4790. otherwise by the command-line flags or unless it cannot find Data!.  If it
  4791. cannot find the data file, it loads in Config! automatically and compiles it.
  4792. (See CLI Command Line, 2.1.)
  4793.  
  4794. By writing a custom config or by modifying the standard config, you can
  4795. customize Uedit completely, creating a special work environment or emulating
  4796. a favorite editor or wordprocessor.  To make Uedit compile the new config at
  4797. startup, in CLI type:
  4798.         Run UE -cMyConfig -dMyData
  4799.  
  4800. When Uedit finishes compiling MyConfig and asks whether to save the data,
  4801. answering Yes saves the data as MyData.  Afterward, to start Uedit up using
  4802. MyData, type:
  4803.         Run UE -dMyData
  4804.  
  4805. Any amount of customizing is possible during edit sessions, without needing
  4806. to close the files you are editing.  The changes can be saved by using Save
  4807. Data (A-f6).  But if at some future time you recompile MyConfig, you regain
  4808. the old defaults and commands that are in MyConfig, and these do not include
  4809. the changes that were saved in MyData during edit sessions.  It is better to
  4810. customize Uedit by editing MyConfig, putting in the desired default values
  4811. and commands, recompiling it, and saving the data as MyData.  Then MyData can
  4812. be reproduced correctly anytime by recompiling MyConfig.
  4813.  
  4814. When Uedit is doing a startup-compile, it can be interrupted using Amiga-ESC.
  4815. Or if the compiler finds an error, it stops at the error point.  In either
  4816. case, make the necessary corrections, put the cursor on or before the left
  4817. angle bracket "<" of the command you want to resume compiling with, and press
  4818. ESC to resume compiling.  If instead you press Amiga-ESC a second time, Uedit
  4819. asks if you want to quit.  If the current config segment has been modified,
  4820. it asks if you want to save the changes before it quits.  (See Compile
  4821. Errors, 2.27.  See Config Segments, 2.5.  See Building Key-Help for Teach
  4822. Keys, 2.11.)
  4823.  
  4824. It is a good idea to define a cursor-movement and scrolling command, such as
  4825. the mouse button (normal-buttonDown) command, first thing in your config,
  4826. right after the config's defaults.  This way, if an error is found during a
  4827. startup-compile, you are not stuck using the less convenient cursor movement
  4828. abilities of Primitive Mode.  (See Config!.  See Primitive Mode, 1.7.)
  4829.  
  4830. 2.4 Config Defaults
  4831.  
  4832. The first thing in the root segment of a config must be a list of default
  4833. values and flag settings.  In editing the defaults, the order in which the
  4834. defaults appear must not be changed.  The angle brackets "<>" must be
  4835. preserved.  Do not use angle brackets anywhere in configs, except to enclose
  4836. defaults or commands.  You may keep two versions of any default or command
  4837. and "comment out" one of them by putting two dots "..<" in front of its left
  4838. angle bracket.
  4839.  
  4840. If you edit a config's defaults and want Uedit to pick up on the changes,
  4841. select Cfg Defalts (AC-f6); Uedit compiles the defaults and closes and
  4842. reopens its window using the new defaults.  If a bad default is found, the
  4843. screen flashes and the cursor stops on the error.
  4844.  
  4845. The following are the defaults which are in Config!.  Unless told otherwise,
  4846. 0 means "No" and 1 means "Yes".  If an integer value is required, it may be a
  4847. positive, zero, or negative 4-byte integer in either decimal or hexadecimal:
  4848.  
  4849. <1>     Make Key-Help file during this compile.  (For "TEACH KEYS" in menu.)
  4850. <S:Key-Help>  Name of Key-Help file to create or look for.  19 chars max.
  4851. <1>     Show cursor during compile of this configuration.  Slower, if show.
  4852. <RAM:uejunk>  Name for temporary file when one is needed.  19 chars max.
  4853. <clean> Font name (19 chars max).
  4854. <8>     Font pixel height ( >= 8).
  4855. <27>    Primitive Mode (pmESC) terminator character.
  4856.  
  4857. <0>     User global flag A.  Any integer value.
  4858. <0>     User global flag B.  Any integer value.
  4859. <0>     Columnar display mode
  4860. <0>     Cram display mode
  4861. <0>     Show page-row-column
  4862.  
  4863. <0>     Mark gadgets
  4864. <0>     Interlace/bitplanes. 0-3.
  4865. <1>     Show invisibles
  4866. <1>     Show busies
  4867. <0>     Teach keys mode
  4868.  
  4869. <35>    Maximum files to edit.  1-100.
  4870. <0>     Make icons
  4871. <0>     Search/grep case-sensitivity flag
  4872. <?>     Search single wildcard.      Printable character.
  4873. <$>     Search either-or delimiter.  Printable character.
  4874.  
  4875. <*>     Search multi wildcard.       Printable character.
  4876. <~>     Search all-but delimiter.     Printable character.
  4877. <0>     White allowed under single wildcard: 0=no, 1=space/tab, 2=any white.
  4878. <0>     White allowed under multi wildcard: 0=no, 1=space/tab, 2=any white.
  4879. <75>    Percent offset for submenus.  0-100 percent.
  4880.  
  4881. <0>     RESERVED  (l)
  4882. <0>     RESERVED  (m)
  4883. <0>     Speak requester alerts
  4884. <0>     Speak messages
  4885. <0>     Print tabs (if 0, tabs are converted to spaces during print)
  4886.  
  4887. <1>     Smart tabs (don't convert tabs if inside quotes)
  4888. <1>     Screen type, 0=Workbench type, 1= Custom type
  4889. <0>     Use printable keys for typing, disabling any commands on them.
  4890. <0>     Printer selection.  0=par:, 1=ser:, 2=prt:, 3=prt: (raw).
  4891. <100>    Idle-time (tenths of seconds) after which time idle cmd is run. 1-32767
  4892.  
  4893. <0>     Hide display.
  4894. <1>     Scroll type: 0 = show colors, 1 = faster
  4895. <0>     Trap menus to use menu mouse button as a key
  4896. <640>   Screen width in pixels (640-1064)
  4897. <200>   Screen height in pixels (gets auto-doubled for LACE) (200-1064)
  4898.  
  4899. <0>     Task priority when in tiny window (-128 to 127)
  4900. <0>     Reserved    (capsLock)
  4901. <0>     Reserved    (clickTime)
  4902. <0>     User global flag C.  Any integer value.
  4903. <1>     User global flag D.  Any integer value.
  4904.  
  4905. <0>     Put in tabs, not spaces, when tab key pressed.
  4906. <1>     Autoindent mode
  4907. <0>     Overstrike mode
  4908. <0>     Autobackup mode
  4909. <0>     RESERVED  (r)
  4910.  
  4911. <1>     Wordwrap mode
  4912. <0>     Rightjustify mode
  4913. <1>     Map illegal chars (ASCII 0-3) to table values.  (See table below.)
  4914. <0>     RESERVED  (c)
  4915. <0>     User local flag A
  4916.  
  4917. <0>     User local flag B
  4918. <4>     Tab ruler to use.    0-4.  (See ruler tables below.)
  4919. <77>    Line-length.  1-9999.
  4920. <5>     Split window size in lines.  2-100, up to max lines in window.
  4921. <0>     Left margin.    0-255.
  4922.  
  4923. <0>     top margin.     0-255.
  4924. <1>     bottom margin.  0-255.
  4925. <66>    lines/page.     1-255.
  4926. <10>    End-of-line char.  10 = Newline, 13 = Carriage Return.
  4927.  
  4928. These are the 5 TAB rulers.  There can be up to 32 column-entries in each tab
  4929. ruler.  The highest column is 255.  The lowest is 2.  In Uedit, to change
  4930. tab rulers, select "Tab ruler".  To see the settings, select "See ruler".
  4931. To adjust the tabs, select "Set ruler".
  4932. <7 13 19 25 31>     Tab ruler 0.
  4933. <9 17 25 33 41 49>  Tab ruler 1.
  4934. <11 21 31 41 51 61
  4935. 71 81>              Tab ruler 2.
  4936. <>                  Tab ruler 3.
  4937. <5 9 13 17 21 25 29
  4938. 33 37 41 45 49 53 57
  4939. 61 65 69 73 77 81 > Tab ruler 4.
  4940.  
  4941. Uedit uses ASCII characters 0-3 internally for markers.  Files cannot
  4942. legally contain these characters.  If the above "Map illegal chars" flag
  4943. is not set, any illegal characters (ASCII 0-3) are replaced by "@" upon
  4944. loading the file.  If "Map illegal chars" is set, illegal chars are mapped
  4945. to the "safe" chars given below upon loading the file.  Upon saving the
  4946. file, the chars are remapped back into their old ASCII 0-3 values:
  4947. <128>    map ASCII 0  Values must be 128-255.
  4948. <129>    map ASCII 1
  4949. <130>    map ASCII 2
  4950. <131>    map ASCII 3
  4951.  
  4952. Printable key arrays:  DON'T TOUCH, unless you know what you are doing!
  4953. These are 4 translation tables which convert raw keystrokes into printable
  4954. characters.  (See Rom Kernal Manual, Volume 1, page 3-81.)  There must be 64
  4955. characters in each row of these tables.  Use OVERSTRIKE typing mode when
  4956. modifying these 4 tables, in order to avoid trouble:
  4957. Normal and SHIFT keys:
  4958. Unused -->     U             U    EUROPE--> EE   U          U
  4959. <`1234567890-=\ 0qwertyuiop[] 123asdfghjkl;'  456 zxcvbnm,./ .789>
  4960. <~!@#$%^&*()_+| 0QWERTYUIOP{} 123ASDFGHJKL:"  456 ZXCVBNM<>? .789> .."
  4961. ALT and SHIFT+ALT keys:  (Put foreign letters in these 2 arrays.)
  4962. Keypad keys --> K           KKKKKK              KKK             KKKK     "
  4963. <`¹²³¢¼½¾·«»-=\  å°©®þ¤µ¡ø¶      æßð     £;'      ±×窺­¸,./     > ..
  4964. <~!@#$%^&*()_+|  Å°©®Þ¥µ¦Ø¶      Æ§Ð     £;'      ¬×Ǫº¯¸,./     > .."
  4965.  
  4966. Colors:  (values must be 0-3, corresponding to RGB color register numbers)
  4967.                                 fg        bg
  4968.     ((local colors for buffers))
  4969.     0  normal text              <1>      <0>
  4970.     1  cursor                    <1>      <2>
  4971.     2  hilite                    <1>      <3>
  4972.     3  cursor+hilite            <3>      <1>
  4973.     4  inverse                  <0>      <1>
  4974.     5  cursor+inverse            <0>      <2>
  4975.     6  hilite+inverse            <3>      <1>
  4976.     7  cursor+hilite+inverse    <0>      <3>
  4977.     ((screen colors))
  4978.     8  title bar                <1>      <3>
  4979.     9  msg line                 <2>      <0>
  4980.     10 menus                    <1>      <3>
  4981.     11 tab ruler                <1>      <2>
  4982.     12 requester                <1>      <2>
  4983.     13 formfeed                 <1>      <2>
  4984.     14 spare1                    <0>      <1>
  4985.     15 spare2                    <0>      <2>
  4986.  
  4987. RGB colors:  (Range is 0-15.)
  4988. Red     Green    Blue
  4989. <0>     <5>     <10>    Register 0
  4990. <15>    <15>    <15>    Register 1
  4991. <15>    <9>     <0>     Register 2
  4992. <0>     <9>     <15>    Register 3
  4993.  
  4994. Gadget Names in the message line.  19 chars max:
  4995. <Next File/MARK>        Name for gadget 1
  4996. <Prev File/MARK>        Name for gadget 2
  4997. <Down/SET MARK>         Name for gadget 3
  4998. <Up/INIT MARKS>         Name for gadget 4
  4999.  
  5000. 2.5  Config Segments
  5001.  
  5002. When Uedit compiles a config at startup, after it has compiled the root
  5003. segment (such as Config! or MyConfig), it loads and compiles its segments.
  5004. Config segments must be in the same directory as the root segment.  Example:
  5005.             MyConfig
  5006.             MyConfigA .. if it exists
  5007.             MyConfigB .. if it exists
  5008.             ...
  5009.             MyConfigZ .. if it exists
  5010.  
  5011. When an error is found during a startup-compile, the cursor stops on the
  5012. error in the current segment; for example, MyConfigD.  Correct the error, put
  5013. the cursor on or before the beginning angle bracket "<" of the command that
  5014. had the error, and press ESC to resume the compiling.
  5015.  
  5016. Note:  Suppose an error is found in MyConfigD or you interrupt the startup-
  5017. compile using Amiga-ESC; if you load in MyConfigC and resume compiling by
  5018. pressing ESC, Uedit does not load in MyConfigD again when it has finished
  5019. compiling MyConfigC.  It instead looks for MyConfigE, because it loaded
  5020. MyConfigD earlier.
  5021.  
  5022. You may selectively compile various config segments using either of two
  5023. approaches:  (1) Rename or remove those segments that you do not want Uedit
  5024. to find; or (2) press Amiga-ESC while Uedit is loading the segment you want
  5025. to skip; this aborts the loading and causes Uedit to load the next segment.
  5026.  
  5027. 2.6 Partial Data Files
  5028.  
  5029. A data file contains all of the current commands and default settings and
  5030. values for a particular configuration of Uedit.  A partial data file merely
  5031. stores one or more commands.  The advantage of partial data files is that
  5032. blocks of commands may be kept off-line and pulled in as needed.  When key
  5033. commands are read in from a partial data file, they replace the old commands
  5034. on the same keys.  Keys may be read in individually or in blocks.  (See
  5035. saveKeys() and loadKeys() in 3.4.)
  5036.  
  5037. Blank, unused keys may be stored in partial data files also.  When blank keys
  5038. are loaded in, they wipe out their existing counterparts.  Thus a partial
  5039. data file, when loaded in, can cleanly replace an existing set of commands or
  5040. bring on-line a new block of commands.  Partial data files have the Uedit
  5041. version number in them, just as data files do, so they may only be used with
  5042. the version of Uedit that created them.
  5043.  
  5044. Compile the following examples, to learn how to use partial data files.  To
  5045. create different partial data files, change the "pData" file name.  (See
  5046. PreKey, 2.32.)
  5047.  
  5048. This PreKey command saves to the pData file every key that is pressed, until
  5049. you press SAC-ESC, which kills the PreKey command:
  5050.  
  5051. <PreKey: if (eqNum(MacroNum,shftAltCtl-esc)) killKey(PreKey) .. escape hatch
  5052.          putMsg("Saving every key pressed - press ShftAltCtl-ESC to quit")
  5053.          saveKeys("pData",MacroNum,0)
  5054.          equateNum(MacroNum,0)
  5055.          equateNum(InputChar,0) >
  5056.  
  5057. This PreKey command loads in every key that is pressed, if it is in the pData
  5058. file, until you press SAC-ESC, which kills the preKey command:
  5059.  
  5060. <PreKey: if (eqNum(MacroNum,shftAltCtl-esc)) killKey(PreKey) .. escape hatch
  5061.          putMsg("Loading every key pressed - press ShftAltCtl-ESC to quit")
  5062.          loadKeys("pData",MacroNum,0)
  5063.          equateNum(MacroNum,0)
  5064.          equateNum(InputChar,0) >
  5065.  
  5066. The same key may be stored repeatedly, although this is not recommended.
  5067. Each key command is added to the end of the file.  When keys are read in, the
  5068. last copy of each key is used.  No harm is done by storing the same key
  5069. repeatedly, but it makes the file bigger.  Once you are straight on which
  5070. keys you want to store, create a fresh partial data file from scratch that
  5071. does not have duplicates in it.
  5072.  
  5073. Saving keys one at a time is efficient.  Loading is more efficient if all
  5074. keys are loaded in together.  You can load them all in by using
  5075. loadKeys("pData",1,1199), where 1 is the lowest allowed MacroNum and 1199 is
  5076. the highest MacroNum.  Loading the keys in this way does not erase any keys
  5077. in memory that are not represented in the partial data file.  (See Keys and
  5078. MacroNums, 2.31.)
  5079.  
  5080. To save every key command in Uedit, including all of the (many) blank, unused
  5081. keys, use saveKeys("pData",1,1199).  To save just the keys that actually have
  5082. commands, you could use:  do (n54,1,1199) if (inUse(n54))
  5083. saveKeys("pData",n54,0).  But this would take forever to run, because each
  5084. time the saveKeys() function is called, the pData file is opened, appended
  5085. to, and closed; it would be better to save contiguous blocks of keys.
  5086.  
  5087. 2.7 Editing Tricks
  5088.  
  5089. It wouldn't be possible to list every editing trick you will think of once
  5090. you are an experienced user of Uedit.  However, it is hoped that this section
  5091. will get you started looking for the easy way out of drudge work and on the
  5092. road to getting the most out of this program.
  5093.  
  5094. If you are not yet ready to bother with the command language, even though the
  5095. CL examples here are quite brief and simple, just skip over any examples that
  5096. use the CL.  Pay particular attention to the Learn Mode examples.  Learn Mode
  5097. is simple to use, requires no familiarity with the CL, and offers such power
  5098. and convenience that it rivals the command language in the potential benefits
  5099. it affords the user:
  5100.  
  5101. *** Saving learned sequences can be useful.  The Learn menu selection Load &
  5102. Run (C-7) loads and runs a learned sequence stored on disk.
  5103.  
  5104. Example:  Select Start Learn (C-s).  Press C-downArrow, which scrolls to end
  5105. of curFile.  Click the mouse button low in the window, placing the cursor at
  5106. the end of curFile.  Press Return 2 or 3 times and type a letter ending with
  5107. your name, address, and phone number.  Select Run Learn (C-r) to end Learn
  5108. Mode.  Select Save Learn (C-5) and type in "nameaddr" and ESC.
  5109.  
  5110. Put the cursor anywhere in any file and press C-r to run the learned
  5111. sequence.  Your letter ending is inserted at the end of curFile.  When the
  5112. learned sequence is not the current one stored in Uedit's memory, use Load &
  5113. Run (C-7) to load it in and run it.
  5114.  
  5115. *** To make the previous example more automatic, type in the following
  5116. command, put the cursor above it, and press f6 to compile it.  Press SA-1 to
  5117. try it out:
  5118.      <shftAlt-1: if (loadLearn("nameaddr")) runLearn >
  5119.  
  5120. *** Normally to input a search string, you would select Set Search (f7),
  5121. which uses Primitive Mode.  But Primitive Mode is primitive and does not let
  5122. you paste in a search string like you can in normal edit mode.
  5123.  
  5124. In such cases, select Edit Buffer (SA-f6), type in 49 and ESC.  Buffer 49 is
  5125. used for Search string input, in the standard config.  Delete whatever is in
  5126. buffer 49 and paste in the search string.  This does not tell Uedit what the
  5127. new search string is, however.  Press S-f7 and ESC.  The S-f7 command does
  5128. not erase buffer 49 like f7 does, but like f7 it calls the setSearch(buf49)
  5129. CL function, which informs Uedit of the search text.  Now you can search
  5130. using the search string that you pasted into buffer 49.
  5131.  
  5132. *** Referring to the previous example, you may have a frequent need to paste
  5133. in search strings.  Select Search Buf (L-2) in the Split Windows menu.  This
  5134. opens a split window with buffer 49 in it.  When you need to edit-in a new
  5135. search string, activate the split window by clicking the mouse in it, and put
  5136. in the search string.  Press S-f7, when you are ready to inform Uedit of this
  5137. new search string.
  5138.  
  5139. *** Suppose you need to search for occurrences of the ESC character.  ESC is
  5140. the pmEsc (Primitive Mode terminator) character, so you cannot type an ESC
  5141. into a search string using Set Search (f7), because f7 uses primitive mode
  5142. and ESC would terminate it.
  5143.  
  5144. But you can temporarily change pmEsc to the Return key.  Press ESC, and it
  5145. asks for the new pmEsc character; press Return.  Now select Set Search (f7)
  5146. and type in the desired search string, including an ESC character, as needed.
  5147. Press Return to terminate Primitive Mode.  Press ESC twice and it restores
  5148. pmEsc to the ESC character.
  5149.  
  5150. *** To input control characters when in normal edit mode, you must use the
  5151. Input Control Character (C-c) command.  Press C-c and the next letter you
  5152. type is inserted as a control character at the cursor.  But in Primitive Mode
  5153. you can type in control characters directly.  If you need to search for
  5154. carriage returns (ASCII 13), select Set Search (f7) and press Ctrl-m and ESC.
  5155. If you need to search for formfeeds (ASCII 12), use Ctrl-l.
  5156.  
  5157. *** Uedit opens a NoName buffer when you close the last file buffer.  If a
  5158. NoName file exists, it loads the NoName file.  If you start Uedit without
  5159. naming any files to load in, it loads in a NoName file by default, if one
  5160. exists.  Otherwise it just opens a NoName file buffer.
  5161.  
  5162. It may be convenient to keep a list of "things to do" and a window full of
  5163. directory and file names in a NoName file in each work directory.  Then you
  5164. can click-load files as needed, and you can change the click-loading
  5165. directory name anytime by Ctrl-clicking directory names, such as "df0:" and
  5166. "dh0:myDirectory/", in the Noname file.
  5167.  
  5168. Buffer 38 is named S:Directories and it contains a list of directories.  To
  5169. see the Directory List in buffer 38, Ctrl-click the mouse in whitespace in
  5170. curFile.  This opens a split window showing buffer 38.  The current click-
  5171. loading directory is hilited in buffer 38.  To select a new click-loading
  5172. directory in buffer 38, Ctrl-click the directory name.  To make Uedit's
  5173. current directory (the one you started Uedit in) the default click-loading
  5174. directory, Ctrl-click in whitespace in buffer 38 or in curFile.  To make the
  5175. split window disappear, click the mouse normally.
  5176.  
  5177. When you Ctrl-click a directory name in any buffer, if it is not already
  5178. stored in buffer 38, it is added to the list and it becomes the new click-
  5179. loading directory.  Note that you can save buffer 38 to disk, as the file
  5180. S:Directories, by using F3 when the Directories split window is open; after
  5181. that when running Uedit, S:Directories is loaded from disk automatically the
  5182. first time a directory name is called for.
  5183.  
  5184. *** Suppose that you need to edit 10 or even 1000 files, doing the same
  5185. search, replace, and editing operations on each file.  You could get a
  5186. directory listing and click-load them one by one and run a learned sequence
  5187. on each one.  But you'd have to sit there and do it.  Uedit can do the whole
  5188. operation automatically.  Get a directory list or make a list with the file
  5189. names in it, stacked vertically, as follows:
  5190.  
  5191. File1
  5192. File2
  5193. File3
  5194. ....
  5195.  
  5196. The list may have hundreds or even thousands of file names in it.  If the
  5197. file name list is not in buffer 0, it is a good idea to select Swap Buf #0
  5198. (A-w), which makes it the "home" buffer.  Click-load the first file, File1.
  5199. Select Start Learn (C-s).  Do the desired search and replace and other
  5200. editing steps.  Select Auto Close (S-f3), which saves the file, if it has
  5201. been modified, and closes it.  Uedit returns to the "home" buffer with the
  5202. file list in it.  Press downArrow to scroll the display up one line.  Click-
  5203. load File2; click the file name near the left border, so that any short names
  5204. in the list won't be missed when their turn comes.  Select Run Learn (C-r) to
  5205. end Learn Mode.
  5206.  
  5207. Press C-r (Run Learn) to see how it works.  If it works as planned, select
  5208. Command Multiplier (C-m) and set the command multiplier to the number of
  5209. remaining files in the stacked list.  Press C-r.  The files will be processed
  5210. automatically.
  5211.  
  5212. *** The getStackSize() CL function gets the number of entries in the buffer
  5213. stack, the number stack, and the file-saving stack.  The delay() CL function
  5214. causes a delay of a specified amount of time.  During delay(), Uedit
  5215. processes spooled prints and file-saves.  Thus, getStackSize() and delay()
  5216. may be used together in order to polish off the spooled file-saves.  The
  5217. following command could be included in a learned sequence, in order to clean
  5218. up the spooled file-saves during each running of the sequence:
  5219.  
  5220.     <normal-esc:
  5221.         while (getStackSize(n54,n54,n53) & !eqNum(n53,0)) delay(5) >
  5222.  
  5223. As an example of where this command might be useful, suppose that you want to
  5224. create a learned sequence that saves a hilite region as a "Junk" file and
  5225. uses AmigaDOS to print the Junk file using some kind of filter program.
  5226. (Such a need arose in preparing this manual.)  If Junk is saved to disk, the
  5227. AmigaDOS program gets executed while Junk is still "in use" in the file-save
  5228. queue or the save has not begun yet, so the filter program cannot process the
  5229. most recently saved Junk file.  However, the above command would force the
  5230. file-save to complete first, and the latest Junk file would be available for
  5231. the filter program to process.
  5232.  
  5233. *** The cycle counter (SA-c) can be very useful.  To find out how many words
  5234. are in curFile, put the cursor at the start of curFile.  Press SA-c and press
  5235. kp6 (Cursor Word Right).  The cycle counter runs kp6, moving the cursor word-
  5236. right, until it reaches end of file.  It then reports the number of successes
  5237. in the message line, which is the number of words in the file.  (It is a
  5238. rough word count, because it relies on what Uedit considers to be a "word"
  5239. character.  These characters are a-z, A-Z, 0-9, the apostrophe "'", and any
  5240. character whose ASCII value is 128-255.)
  5241.  
  5242. To count the number of lines from the cursor line to end-of-file, use kp2
  5243. instead of kp6.  The cycle counter is also useful with Search (f9) or Search
  5244. and Replace (f10).  It reports the number of successful searches.
  5245.  
  5246. *** The cycle counter (SA-c) can be used in place of Command Multiplier (C-m)
  5247. when running learned sequences (C-r), provided the last step in the learned
  5248. sequence "fails" at some point.  The "failed" (False) return is what stops
  5249. the cycle counter command.  For example, if the last step in the learned
  5250. sequence is cursor-word-right, it will fail at eof.  But in many learned
  5251. sequences, the last step may not give a False return.  Or, conversely, it may
  5252. always give a False return and therefore cannot be used with the cycle
  5253. counter.  If the cycle counter does not quit due to a "fail" as expected,
  5254. abort it with Amiga-ESC.  If it runs only once and quits, the learned
  5255. sequence must be returning a False in all cases, so you must use Command
  5256. Multiplier (C-m) instead of the cycle counter.
  5257.  
  5258. *** To run an Amiga utility or other program while working in Uedit, select
  5259. AmigaDOS (C-y) and type "run MyProg", where MyProg is the utility you wish to
  5260. run.  Since Uedit sleeps inbetween inputs, the utility runs about as fast as
  5261. if Uedit were not running.  If a utility is needed frequently, use Learn Mode
  5262. to store the above procedure and invoke it at will using Run Learn (C-r).  Or
  5263. create a special command to run the utility, as follows:
  5264.     <shftAlt-2:  execute(" ","Run MyProg") >
  5265.  
  5266. *** Suppose that you need to bracket section titles in a file with control
  5267. codes that make it print in boldface.  Put the cursor in a line that you want
  5268. printed in boldface.  Select Start Learn (C-s).  Press A-kp4, moving the
  5269. cursor to start-of-line.  Press kp1, marking it as start-of-hilite.  Press A-
  5270. kp6, moving the cursor to end-of-line.  Press kp3, marking it as end-of-
  5271. hilite.  Select Bracket Hilite (L-p) and type "b" for boldface.  Select Run
  5272. Learn (C-r) to end Learn Mode.
  5273.  
  5274. Now select Swap MouseUp (A-m) and press C-r; this swaps the Run Learn key
  5275. with the mouse's buttonUp command.  Scroll through the file, using the arrow
  5276. keys, looking for section titles, or search for them using Search.  To
  5277. boldface each section title, click the mouse in it.
  5278.  
  5279. When finished, select Swap MouseUp and press C-r again, unswapping the Run
  5280. Learn key, so that you can once again use the mouse for scrolling.
  5281.  
  5282. *** Suppose that you need to collect scattered words into a list.  Put the
  5283. cursor in the middle of a word.  Press C-s to start Learn Mode.  Press kp6
  5284. (Word Right), kp7 (Delete Word Left), and kp0 (Undo Scratch Deletes).  Press
  5285. C-w (swapping to buffer 41), press kp0 to insert the copied word, and press
  5286. Return.  Press C-w, to swap back to the original file.  Press C-r to
  5287. terminate Learn Mode.
  5288.  
  5289. Select Swap MouseUp (A-m) and press C-r.  This swaps the Run Learn key with
  5290. the mouse's buttonUp command.  Now you can go through various files clicking
  5291. words and they are added to the list in buffer 41.
  5292.  
  5293. When finished, select Swap MouseUp and press C-r again, to reverse the swap.
  5294.  
  5295. *** When using the arithmetic commands (C-0, C--, C-= and C-\) with columns
  5296. of numbers, you can teach Learn Mode to skip the cursor over any adjacent
  5297. columns of numbers, adding just a single column.  This can be done using the
  5298. keypad's cursor-movement keys, but it is probably better to position the
  5299. cursor with the mouse, in this instance.
  5300.  
  5301. To add numbers in a column that is between other columns of numbers, do the
  5302. following:  Press C-s to start Learn Mode.  Use the mouse to place the cursor
  5303. in the top number.  Press C-= to add in the number.  Press downArrow to
  5304. scroll up one line.  Press C-r to end Learn Mode.
  5305.  
  5306. Now each time you press C-r, it adds another number in the column.  When
  5307. finished, put the cursor where the total should go and press C-\ to insert
  5308. the total.
  5309.  
  5310. *** Suppose that you are building a table of contents.  On the right should
  5311. be the page numbers, and on the left would be the chapter or section titles.
  5312. A-5 will right-justify everything from the cursor to end-of-line.  You can
  5313. use Learn Mode to right-justify the page numbers as follows:
  5314.  
  5315. Put the cursor at the end of the line above the table of contents.  Press C-s
  5316. to start Learn Mode.  Press A-kp6, which moves the cursor to end-of-line,
  5317. putting it at the end of the first line in the table of contents to the right
  5318. of a page number.  Press kp4, moving it word-left so that it is on the page
  5319. number.  Press A-5 to right-justify the page number.  Press A-kp6, moving the
  5320. cursor to the end of the current line.  Press C-r to end Learn Mode.
  5321.  
  5322. Press C-r again to try out the sequence.  To cause the right-justification to
  5323. be at any particular column, press C-Return and reset the lineLength
  5324. temporarily.
  5325.  
  5326. *** The Alt-number-row keys are useful for beautifying lines of text.  They
  5327. can right-justify, center, left-justify, match indentations, and so on.  For
  5328. example, you can click-center lines of text as follows:  Select Swap MouseUp
  5329. (A-m) and press A-2, which centers lines of text.  Now any line that you
  5330. click is centered in the window, based on the current lineLength setting.  To
  5331. change the centering, press C-Return and adjust the lineLength.
  5332.  
  5333. *** Paragraph Reformat (C-3) uses the current typing settings.  If leftMargin
  5334. is 0, and if autoIndent is On, it uses autoIndent.  If autoIndent is Off, it
  5335. does not indent the reformatted paragraph.  If leftMargin is non-zero, it
  5336. reformats using leftMargin as the indentation.  If you wish to reformat a
  5337. paragraph at a particular indentation, set leftMargin to the desired column,
  5338. and then reformat using C-3.  If you wish to reformat an indented paragraph
  5339. so that it has no indentation, set leftMargin to 1.
  5340.  
  5341. *** The Join Lines (C-j) key is useful when you need to reformat a badly
  5342. scattered or corrupted paragraph which may even have some blank lines in it.
  5343. Put the cursor in the first line of the paragraph and press C-j as many times
  5344. as needed, in order to get the paragraph onto one long line.  Then press C-3
  5345. to reformat it.
  5346.  
  5347. *** Partial data files may contain a block of commands that you do not want
  5348. to have on-line, unless the need arises.  Suppose that the block of commands
  5349. consists of the Rexx commands.  These are in the Rexx submenu and the command
  5350. definitions are in Config!R.
  5351.  
  5352. First, save all of the Rexx commands to a partial data file called RexxData.
  5353. (See the examples in Partial Data Files, 2.6.)
  5354.  
  5355. The menu definitions in the startup command in a config work as follows:  The
  5356. menu item that serves as a submenu header has to be assigned to an existing
  5357. key, even though you cannot "select" that item because it is a submenu
  5358. header.  This can be useful.  Suppose that the "Rexx" menu item (submenu
  5359. header) were assigned to the following command:
  5360.         <shftAlt-3:  loadKeys("RexxData",1,2000) runKey(startup) >
  5361.  
  5362. The Rexx menu item should be defined like this:  menu("Rexx",4,shftAlt-3)
  5363.  
  5364. Now, if the Rexx commands are not on-line when the menus are built (such as
  5365. at startup or if you toggle the colors), the submenu items cannot appear; but
  5366. the Rexx menu item above does appear, because the SA-3 command exists.
  5367. Selecting Rexx (SA-3) causes the Rexx commands to be loaded in.  It runs the
  5368. Startup command, causing the menus to be rebuilt.  The Rexx submenu items now
  5369. appear.  And the Rexx item (SA-3) cannot be selected any longer, because it
  5370. is now the submenu's header.  (See Customizing the Menus, 2.17.)
  5371.  
  5372. *** The previous example can be refined a step further:  The SA-3 command
  5373. above could use the inUse() CL function to test whether a particular Rexx
  5374. command, such as AC-1, exists or not.  If it does not exist, SA-3 would load
  5375. in the Rexx commands, creating the Rexx submenu as described above.  If AC-1
  5376. does exist, SA-3 would kill all of the Rexx commands using killKey() and
  5377. would call runKey(Startup), rebuilding the menus minus the Rexx submenu once
  5378. again.  In this way, SA-3 toggles the Rexx submenu, and all of its commands,
  5379. into and out of existence.  Note that while you cannot select Rexx (SA-3)
  5380. when the submenu exists, you can still press SA-3 in order to remove the
  5381. submenu.
  5382.  
  5383. Note that other submenus lend themselves to this kind of arrangement as well:
  5384. Obvious candidates are the Spelling, Printing, and Split Windows submenus.
  5385.  
  5386. *** You can cut and paste using 1) scratch deletes and Undo, 2) the hilite
  5387. region, 3) the invert region, and 4) a columnar region, all at the same time.
  5388. Each of these uses a separate buffer to store the copy in.
  5389.  
  5390. If these are not enough buckets, select New File (C-f1) and use a file buffer
  5391. as a holding place, or select Swap Buf #41 (C-w) and use buffer 41 as a
  5392. scratch pad.
  5393.  
  5394. If those are not enough, select Edit Buffer (SA-f6) and use any buffer # up
  5395. to 99.  If you need still more buffers, select Push Buffer (L-w) and push
  5396. some buffers onto the buffer stack.  This frees up their buffer-number slot
  5397. so that it can be reused.  When you need the buffers on the stack, select Pop
  5398. Buffer (R-w) to pop them off.  Use Roll Stack (SA-w) as needed, to rotate the
  5399. stack so that you can pop off the desired buffer.
  5400.  
  5401. *** Suppose that you need to put a box of asterisks around a rectangle of
  5402. text without disturbing the text.  First, make a copy of the columnar region
  5403. of text that is to go inside the box:  Select Col Display, turning on
  5404. columnar display mode.  Press Shift and click the mouse in the upper left
  5405. corner of the text's rectangular region.  Press Alt and click the mouse in
  5406. the lower right corner of the text-rectangle.  This should hilite a columnar
  5407. region.  Select Col Copy (SC-3 or kpDot) to copy this rectangle.
  5408.  
  5409. Create the box of asterisks somewhere in curFile and make it a hilited
  5410. columnar region using the mouse as described above, but do not copy it.  Put
  5411. the cursor outside the rectangle of text you just copied which the box of
  5412. asterisks is to surround; the cursor should be at the upper left corner of
  5413. the text rectangle, but not inside it.
  5414.  
  5415. Select Ovl Hil->Csr (SC-7).  This overlays the box of asterisks onto the
  5416. cursor.  It overwrites the text you copied earlier.  Now put the cursor
  5417. inside the box, in the upper left corner, and select Col Overlay (SC-5).
  5418. This overlays the copied rectangle of text inside the box of asterisks.
  5419.  
  5420. *** Sometimes a serial printer loses data because the serial-line handshaking
  5421. protocol is not agreed upon by the computer and printer.  You may be able to
  5422. prevent the loss of data by using delays in the sending process.  Suppose
  5423. that your serial daisy wheel printer can print 20 chars/second, and you need
  5424. to send a file to the printer at 300 baud (30 chars/second).  A delay of
  5425. about 1 second per line might prevent lost data due to printer buffer
  5426. overflows.
  5427.  
  5428. Press SA-d, and type in 10 and ESC; this sets the delay variable to 1.0
  5429. seconds.  Put the cursor at the start of the first line to be printed.  Press
  5430. C-s to start Learn Mode.  Press kp1, marking the start-of-hilite.  Press kp2,
  5431. moving the cursor down one line.  Press kp3, marking the end-of-hilite.
  5432. Select Print Hilite (C-p).  Press A-d, causing a delay of 1.0 seconds.  Press
  5433. C-r to end Learn Mode.
  5434.  
  5435. Press C-m to set the command multiplier to the number of lines you wish to
  5436. print and press C-r to run the learned sequence.
  5437.  
  5438. If the serial printer still loses characters, crank up the delay to 1.5 or
  5439. 2.0 seconds.  If it still loses characters, it must mean that the serial
  5440. printer has no input buffering.  So instead of printing a line at a time,
  5441. print a word or a character at a time, using a small delay, like 0.1 second.
  5442.  
  5443. *** When working with many files and one file is needed oftener than the
  5444. rest, it is convenient to use Swap Buf #41 (C-w) to switch back and forth
  5445. between the other files and the main one.  A good example is when you have a
  5446. file-name list from which you are occasionally click-loading new files or in
  5447. which you are collecting section titles or a list of notes.  By keeping the
  5448. list in buffer 41, you can see it instantly by pressing C-w, no matter which
  5449. buffer is in the window at the time.  And pressing C-w again switches back to
  5450. the original file.  To make this even more convenient, swap C-w to the ESC
  5451. key using Swap Keys (f5).
  5452.  
  5453. *** There may be a tendency to think that after copying the hilite region you
  5454. should not then hilite another region and clear it with Clear (C-h).  This is
  5455. not so; it is safe to create another hilite region and even to clear it.  As
  5456. long as you do not Cut or Copy a new hilite region or select Free Buffers (A-
  5457. f3), you will not destroy the copy that you made earlier.
  5458.  
  5459. *** When you click the title bar, Uedit switches to tiny window.  You can
  5460. position the tiny window wherever you want.  If you switch to tiny window
  5461. again later on, it is where you last put it.  If you select Save Data (A-f6),
  5462. tiny window's x-y position is saved to disk.  Next time you run Uedit, you
  5463. will not have to reposition the tiny window.
  5464.  
  5465. *** When you need to compare two files, to look for any difference between
  5466. them, use Learn Mode.  Load in the two "identical" files.  Press C-s to start
  5467. Learn Mode.  Press A-downArrow to scroll down a page.  Press F1 to switch
  5468. files.  Press A-downArrow again.  Now press F1 four times.  Press C-r to stop
  5469. learning.
  5470.  
  5471. Now start pressing C-r.  Any difference between the two files, even an extra
  5472. comma or space, will jump out at you.  Using this technique, which
  5473. astronomers call a "blink comparator", you can actually compare files at
  5474. nearly the same speed as file-comparison programs do.
  5475.  
  5476. *** It is possible, and quite straightforward, to do a mail merge using Learn
  5477. Mode.  Without describing each step, it goes roughly as follows:
  5478.  
  5479. Load the customer list and a form letter into Uedit.  Press C-s to start
  5480. learn mode.  Delete a name from the customer list using a scratch delete key
  5481. such as Delete Line (C-d) or A-kp9 (Delete to End-of-Line) and insert it back
  5482. using Undo (kp0), press f1 to switch to the form letter, insert the customer
  5483. name using Undo (kp0), select Print File (AC-p) to print the form letter,
  5484. delete the customer name from the form letter, press f1 to go back to the
  5485. customer list, and move the cursor downward to the next customer in the list.
  5486. Press C-r to end Learn Mode.  Set the command multiplier (C-m) or use the
  5487. cycle counter (SA-c) along with C-r to run the learned sequence as many times
  5488. as needed.  (Technical note:  Hundreds or thousands of deletes in a learned
  5489. sequence like this would fragment the customer list badly and could use up
  5490. all memory.  However, if you select File Size (C-1) in the learned sequence,
  5491. it forces the list to be packed and prevents fragmentation.)
  5492.  
  5493. *** Sometimes it is desirable to use both carriage return (ASCII 13) and
  5494. linefeed (ASCII 10) as the line terminator.  This may be handled in several
  5495. ways:
  5496.  
  5497. Method 1:  Select Start Learn (C-s).  Press C-c (Input Control Character) and
  5498. the letter "m".  This inputs a carriage return.  Press C-c and "j", which
  5499. inserts a linefeed.  Press C-r to end Learn Mode.  Select Swap Keys (f5) and
  5500. press C-r and the Return key.  This swaps the Run Learn key with the Return
  5501. key, so that now when you press Return it types in both a CR and a linefeed.
  5502.  
  5503. Method 2:  Compile the following command for the Return key:
  5504.             <normal-Return: typeChar(13) typeChar(10) >
  5505.  
  5506. Method 3:  Use Search & Replace, searching on linefeed (Return key) and
  5507. replacing with Ctrl-m and linefeed.
  5508.  
  5509. *** In the CL, there is a local flag Favorite which is not used in the
  5510. current standard config, although in earlier versions of Uedit it was used.
  5511. The Favorite flag may be put to use for any purpose where a buffer-local flag
  5512. is needed.  However, Favorite is meant to be used in conjunction with the
  5513. toggle() function as follows:  To turn On/Off the Favorite flag for curFile,
  5514. use flipFlag(curFile,favorite).  Assuming that a number of files have been
  5515. tagged as "favorite", you can toggle to the next favorite file by using
  5516. toggle(favorite).
  5517.  
  5518. *** Rather than setting MaxFiles to a high number, which requires customizing
  5519. the config files to change buffer numbers in its commands, you can store
  5520. files on the buffer stack and access them just as though they were in file
  5521. buffers.
  5522.  
  5523. Load each file and use the cmd below to push the file onto the buffer stack
  5524. (L-w).  You can load as many as memory will hold, and it doesn't use up file
  5525. buffer slots.
  5526.  
  5527. Swap current buffer with stack & roll stack
  5528. <normal-esc:
  5529.     equateNum(n51,99)
  5530.     getStackSize(n51,n52,n53)
  5531.     if (eqNum(n51,0)) {
  5532.         putmsg("buffer stack is empty")
  5533.         returnFalse
  5534.     }
  5535.     equateNum(n54,curfile)
  5536.     ..if (getFlag(curfile,changed)
  5537.     ..    & askYesNo("Save this changed buffer?")
  5538.     ..    ) saveFile(curfile)
  5539.     push(buf99,curfile)
  5540.     rollstack(curfile,1)
  5541.     pop(buf99,buf[n54])
  5542. >
  5543.  
  5544. *** The number stack and the CL can be used in implementing a fake learn
  5545. mode.  Note, however, that due to stack and CL usage, the fake learned
  5546. sequences would not run as fast as real learned sequences.  Regular learn
  5547. mode only stores 200 steps, and the memory cost per key is 14 bytes.  A fake
  5548. learn mode could store an arbitrary number of steps at a cost of only 8 bytes
  5549. per key, up to the limit of memory.  Regular learned sequences cannot be
  5550. edited or reordered.  Fake learned sequences using the stack could be
  5551. reordered or edited, using rollStack(), pop() and push().  PreKey would be
  5552. used for the learning process.  InputChar and macroNum would be stored in 16
  5553. bits each in a number that is pushed onto the stack.  This fake learn mode
  5554. would not store mouseXY, but you could test for macroNums corresponding to
  5555. buttonDown and buttonUp and store mouseXY in a separate entry on the stack.
  5556. Or, since inputChar is never higher than 255, it only needs 8 bits and
  5557. macroNum, whose max is 1199, only needs 11 bits, and that leaves 13 bits in
  5558. which to store the mouse's x-y position.  When running the fake learned
  5559. sequence, values should be popped off, parsed out, pushed back onto the
  5560. stack, and the stack rotated.  For one-shot running of the sequence, just pop
  5561. the numbers off and parse them.  The learned sequence could be stored on disk
  5562. by converting the stack values into ASCII in a buffer and saving the buffer
  5563. to disk.  The following should be used, after parsing inputChar and macroNum
  5564. from a stored value:
  5565.         if (gtNum(inputChar,0)) typeChar(inputChar)
  5566.         else runKey(macroNum)
  5567.  
  5568. Note that the stack is LIFO (last in, first out), so it is necessary to roll
  5569. the stack by minus one before each value is popped off, unless the preKey
  5570. command that loads the stack loads it in reverse order by using rollStack()
  5571. after each push().
  5572.  
  5573. Technical note:  The reason that normal Learn Mode requires 14 bytes per step
  5574. is that it stores Amiga input messages, which include various fields such as
  5575. the mouseXY position.  Learned sequences must run as though they were being
  5576. freshly typed in.
  5577.  
  5578. *** The best source of CL examples is Config!, Config!H, Config!M, Config!P,
  5579. Config!R, Config!S, and Config!Z (if it exists), which contain about 300
  5580. examples that you may use.  When you need to create a custom command, think
  5581. of one in the standard config that works about like the one you need to
  5582. create, and use it as an example.
  5583.  
  5584. *** The Rexx interface in Uedit offers countless possibilities.  For example,
  5585. you can make Uedit load MyFile by sending it the Rexx message "Rx u
  5586. f:MyFile", if Rexx auto-traffic mode is active.  Further messages could cause
  5587. Uedit to edit, save, and close MyFile.  A command using the CL function
  5588. toggle(toTiny) makes Uedit switch to tiny window during its next pause.  When
  5589. in tiny window, Rexx traffic makes Uedit go to its big window.  Thus, Rexx
  5590. messages could make Uedit go to its big window, process a file, and return to
  5591. tiny window.  (See Rexx Interface (2.8) and its examples.)
  5592.  
  5593. *** You may control your printer either by using generic printer codes that
  5594. go to the Amiga print device that you selected with Preferences or by
  5595. embedding raw escape-sequences that your printer recognizes.  (See Printing,
  5596. 1.43.)  If you embed raw escape-sequences for your printer, set Print Select
  5597. (A-p) to 3.  This makes Uedit send the Amiga's codes to the Amiga and all
  5598. other text, including your escape-sequences, straight to the printer.  Here
  5599. are some examples of both methods of controlling your printer:
  5600.  
  5601. To embed a control code to set your printer's left and right margins at
  5602. columns 10 and 70, use a command like the following:
  5603.     <normal-esc: printerCode(curFile,65,10,70) >
  5604.  
  5605. The following embeds the escape-sequence ESCx at the cursor, where ESCx is
  5606. some escape-sequence that your printer needs:
  5607.     <normal-esc: insertChar(curFile,27) insertChar(curFile,"x") >
  5608.  
  5609. The above escape-sequence can be embedded with Learn Mode also:  Press C-s to
  5610. start Learn Mode.  Press C-c (Input Control Character) and ESC, which puts an
  5611. ESC in the text.  Type in the other keys in the sequence; if they are control
  5612. characters, use C-c to input them.  Press C-r to end Learn Mode.
  5613.  
  5614. 2.8 ARexx Interface
  5615.  
  5616. ARexx is the Amiga implementation of the REXX language.  To use Uedit's ARexx
  5617. interface, you must have ARexx and know how to use it.  (ARexx was written by
  5618. William Hawes and is included with new versions of AmigaDOS.)
  5619.  
  5620. If ARexx is up and running, Uedit detects it and messages and replies can be
  5621. sent or received.  When in tiny window, Uedit returns to its big window, if
  5622. it receives something from ARexx.
  5623.  
  5624. Normally, nothing is sent to ARexx by Uedit, unless you initiate it with a
  5625. command.  (Aborting with Amiga-ESC and quitting Uedit are exceptions
  5626. discussed later on.)  If a message or reply is sent to Uedit by an ARexx
  5627. host, Uedit picks up the message or reply in the background.  Then it is up
  5628. to you whether to fetch and use it or not; if you are using autoTraffic mode,
  5629. messages and replies are processed automatically, however.
  5630.  
  5631. The commands supplied with the Uedit-Rexx interface enable you to send and
  5632. receive messages in a variety of ways.  For example, you can send a hilite
  5633. region to ARexx or send a full buffer.  You can receive messages from ARexx
  5634. into a buffer or receive them into curFile at the cursor location.  (At the
  5635. command language level, even greater flexibility is afforded.  See rexxIn()
  5636. and rexxOut() in Part 3.)
  5637.  
  5638. autoTraffic mode fetches and replies to Rexx messages automatically.  When
  5639. autoTraffic mode is turned On, an external program can control Uedit using
  5640. Rexx messages and a command protocol.  Rexx commands from Uedit can control
  5641. external programs as well.  When in tiny window, Uedit returns to the big
  5642. window, if a Rexx message arrives; and if autoTraffic mode is On, Uedit
  5643. immediately acts upon the Rexx message.  It loads in a file or does whatever
  5644. the message tells it to.  (See Rexx autoTraffic Mode, 2.8.11.)
  5645.  
  5646. Port Name:  To send messages to Uedit from ARexx hosts, you will need Uedit's
  5647. ARexx Port Name, which is:  URexx
  5648.  
  5649. File Extension:  Rexx programs can be run from inside Uedit.  Rexx allows for
  5650. a default file-extension that is related to the host program (such as Uedit).
  5651. Uedit's File Extension is the same as its Port Name:  URexx
  5652.  
  5653. You can create a Rexx program for Uedit to use and call it MyProg.URexx.
  5654. Then you can run it from inside Uedit by calling it "MyProg", omitting the
  5655. extension.  Rexx appends Uedit's extension automatically.
  5656.  
  5657. 2.8.1 Using the ARexx Interface
  5658.  
  5659. The original ARexx Command Language interface provided with the standard
  5660. config (in the Config!R file) used raw macroNums and inputChars, which,
  5661. though flexible, were cryptic and unfriendly.  The Rexx CL interface that is
  5662. now provided with the standard config (in Config!R) was written originally by
  5663. Kerry Zimmerman, a Uedit user, and it uses sensible words for desired
  5664. operations.  It is easy to add new words to the word-list.  The currently
  5665. defined words are in the REXXCOMM file:
  5666.     /* REXXCOMM */
  5667.     ask            1063+105 |
  5668.     text        1077+0 |
  5669.     shilite        29+0 |
  5670.     ehilite        31+0 |
  5671.     loadfile    1078+0 |
  5672.     gotoline    1094+110 |
  5673.     up            62+56 |
  5674.     down        30+0 |
  5675.     left        149+0 |
  5676.     right        151+0 |
  5677.     searchfor    1064+111 |
  5678.     einvert        447+51 |
  5679.     sinvert        231+105 445+49 |
  5680.     cut            490+31 |
  5681.     message        1065+112 |
  5682.  
  5683. By editing REXXCOMM, you can easily add new command-words to use in Rexx
  5684. messages to Uedit.  (See Add Command Words to REXXCOMM (AC-0), 2.8.10.)  For
  5685. convenience, a demo.urexx Rexx message to Uedit is also provided.  (See the
  5686. REXXCOMM, demo.urexx, and Config!R files.)  These will be discussed further
  5687. later on.
  5688.  
  5689. When you send an Outgoing Message to Rexx from Uedit, you cannot send another
  5690. until a Reply to your Message has arrived and you have fetched the Reply
  5691. using one of the Rexx fetching commands such as Cursor<-Rexx (AC-6).  When
  5692. you fetch a Reply, Uedit releases the original Message resource, allowing
  5693. another Outgoing Message to be sent.
  5694.  
  5695. When an Incoming Message arrives, Uedit holds onto it until you send a Reply
  5696. to it.  You may fetch the Message over and over, but Uedit does not release
  5697. the Message resource until a Reply to it has been sent.
  5698.  
  5699. If you press Amiga-ESC to abort, Uedit sends a Failed reply to any
  5700. outstanding Rexx message.  If a number of Rexx messages are waiting to be
  5701. picked up, pressing Amiga-ESC repeatedly gives a Failed reply to them one by
  5702. one.
  5703.  
  5704. Most Rexx messages do require a reply.  If no reply is received, the sending
  5705. program may hang up waiting on a reply.  (Non-return messages do not require
  5706. a reply.  See the RXFF_NONRET flag in Rexx Features Supported, 2.8.18.)  Not
  5707. replying to messages that require a reply wastes memory and may cause
  5708. programs to hang expecting a reply.
  5709.  
  5710. When you quit Uedit, it can let go of most Rexx traffic gracefully.  If it
  5711. cannot, it will not let you quit.  When you try to quit:  1) Uedit sends a
  5712. "Something's wrong" Failed reply to each Rexx message it receives.  This lets
  5713. the sender release the message resource.  2) Uedit releases the resource of
  5714. an incoming reply, if one arrives or is on hand that has not been fetched.
  5715. 3) If you have sent an outgoing message and its reply has not arrived yet,
  5716. you cannot quit until the reply arrives.  You do not have to fetch and use
  5717. the reply, but it must arrive so that Uedit can free the resource.  If you
  5718. try to quit and a reply is outstanding, a requester will say "Wait for Rexx
  5719. reply".
  5720.  
  5721. 2.8.2 Edit Rexx Output Buffer (AC-1)
  5722.  
  5723. AC-1 switches you to buffer 62, which is used for Rexx output, so that you
  5724. can type an outgoing Rexx message.  To send the message, use Buf62->Rexx (AC-
  5725. 3).
  5726.  
  5727. 2.8.3 Edit Rexx Input Buffer (AC-2)
  5728.  
  5729. AC-2 switches you to buffer 61, which is used for Rexx input, so that you can
  5730. examine or copy incoming Rexx messages.  To fetch an incoming message into
  5731. buffer 61, use Buf61<-Rexx (AC-4).
  5732.  
  5733. 2.8.4 Send Output Buffer To Rexx (AC-3)
  5734.  
  5735. AC-3 sends to Rexx the contents of buffer 62, the Rexx output buffer.  Once a
  5736. message has been sent, Uedit will not let you send another until a reply to
  5737. the last message has been received and you have fetched the reply.
  5738.  
  5739. 2.8.5 Fetch Rexx Input Into Buffer (AC-4)
  5740.  
  5741. AC-4 fetches a Rexx message or reply that has arrived, putting it into buffer
  5742. 61, the Rexx input buffer.
  5743.  
  5744. 2.8.6 Send Hilite Region To Rexx (AC-5)
  5745.  
  5746. AC-5 sends the hilite region in curFile as a message to Rexx.
  5747.  
  5748. 2.8.7 Fetch Rexx Input At Cursor (AC-6)
  5749.  
  5750. AC-6 fetches a Rexx message or reply that has been received and inserts the
  5751. text at the cursor in curFile.
  5752.  
  5753. 2.8.8 Send OK Reply To Rexx (AC-7)
  5754.  
  5755. AC-7 sends an OK reply to the current message from Rexx that has not been
  5756. replied to yet.  If no message is on hand, nothing is sent.
  5757.  
  5758. 2.8.9 Send OK Reply and Hilited Text to Rexx (AC-8)
  5759.  
  5760. AC-8 sends an OK reply to the current message that has not been replied to
  5761. yet.  If the message used the RXFF_RESULT modifier, indicating that it wants
  5762. a text reply, the hilite region in curFile is sent in the reply.  Most
  5763. messages do not use RXFF_RESULT, however, so text is seldom sent in a reply.
  5764.  
  5765. 2.8.10 Add Command Words to REXXCOMM (AC-0)
  5766.  
  5767. How to send command key and text inputs to Uedit can be understood by looking
  5768. at the demo.urexx file that is provided.  It uses the message command-words
  5769. defined in REXXCOMM.  (See the demo.urexx and REXXCOMM files.)  When
  5770. autoTraffic mode is On, commands can be sent to Uedit with Rexx using the
  5771. command words in REXXCOMM.
  5772.  
  5773. Add Command Words (AC-0) lets you define new command words to be stored in
  5774. REXXCOMM.  First it asks for the command word, followed by ESC.  Then it asks
  5775. you to type the function keys and text that are to be executed in Uedit when
  5776. the command word is used in a Rexx message.  When you are finished typing in
  5777. the command keys and text, press ESC to end the current command-word's
  5778. definition.  When finished defining new command words, press ESC a second
  5779. time.  AC-0 then asks whether you want to save the modified REXXCOMM file.
  5780. If you select Yes, it is saved; if you select No, you can save the modified
  5781. REXXCOMM later on if you wish.  The copy of REXXCOMM in buffer 36 is erased
  5782. by AC-0; this means that autoTraffic mode must reload REXXCOMM next time it
  5783. is needed; thus, if you want the new version of REXXCOMM to be used, you must
  5784. save it to disk.
  5785.  
  5786. In CLI or a shell or in another Rexx host program, the REXXCOMM command words
  5787. can be used in messages to Uedit; the messages contain commands and text for
  5788. Uedit to process in autoTraffic mode.  The commands and text are stored in
  5789. REXXCOMM as pairs of decimal numbers which are macro numbers and ASCII
  5790. character values:  MacroNum+InputChar.  (See InputChar and MacroNum, 2.30.)
  5791.  
  5792. See demo.urexx for an understanding of how to use REXXCOMM's command words in
  5793. messages to Uedit.  The rexxKey command, which handles Rexx traffic in Uedit
  5794. when autoTraffic mode is On, interprets the command words that are in
  5795. incoming messages using the definitions in REXXCOMM and acts upon them.  The
  5796. rexxKey command actually is attached to the virtual-t key when autoTraffic
  5797. mode is Off, and it is swapped to rexxKey when autoTraffic mode is turned On.
  5798.  
  5799. Rexx messages to Uedit may invoke Primitive Mode or a Requester or the Tab
  5800. Ruler.  If any of these is invoked by commands included in a Rexx message, do
  5801. not include their inputs in the command or in a command-word's definition in
  5802. REXXCOMM.  That is, you must type in the inputs they require at runtime when
  5803. Uedit receives and acts upon the Rexx message.
  5804.  
  5805. Mouse inputs are represented as MacroNum+InputChar number pairs like keyboard
  5806. inputs are, but the mouse X-Y position is not stored when a command word is
  5807. defined in REXXCOMM.  Any mouse clicks you store will use the old X and Y
  5808. positions which were last input in Uedit using the mouse.  (The treatment of
  5809. mouse X-Y positions can be handled differently by customizing the commands in
  5810. Config!R, however.)
  5811.  
  5812. 2.8.11 Rexx autoTraffic Mode (AC-9)
  5813.  
  5814. Normally, if you send a Rexx message to Uedit, it is received in the
  5815. background, and you must fetch it using one of the Rexx commands, such as
  5816. Cursor<--Rexx which inserts the message's text at the cursor in curFile.  And
  5817. you must reply to each message, before Uedit can receive another Rexx input.
  5818.  
  5819. When you turn On autoTraffic mode (using AC-9), the following happens:  1)
  5820. The CL userGlobalB flag is set to a non-zero value, indicating autoTraffic is
  5821. On.  2) The autoTraffic (virtual-t) command (see Config!R) is swapped with
  5822. the rexxKey.  3) During idle periods rexxKey runs automatically, when Rexx
  5823. traffic arrives, and processes it.
  5824.  
  5825. When autoTraffic mode is turned Off, the reverse happens:  1) The userGlobalB
  5826. flag is zeroed.  2) rexxKey is again swapped with virtual-t, so that a
  5827. rexxKey command no longer exists.  3) Rexx messages are no longer processed
  5828. automatically.
  5829.  
  5830. If Uedit is in tiny window, arriving Rexx traffic causes it to spring back to
  5831. its big window; if autoTraffic mode is On, Uedit automatically processes the
  5832. traffic; if autoTraffic mode is Off, it is up to you to respond to the Rexx
  5833. traffic using the Rexx commands described earlier.  By using autoTraffic mode
  5834. and keeping Uedit in tiny window, you can make it act like a quick in-and-out
  5835. editor by sending it a Rexx message whenever you want it to load in a file
  5836. for editing.  A Rexx message can even cause it to return to tiny window or
  5837. move its screen to the back.
  5838.  
  5839. 2.8.12 Rexx Features Supported
  5840.  
  5841. The Uedit-Rexx interface supports common Rexx action codes.  It does not
  5842. support tokenization of arguments, however.  Uedit does not process the extra
  5843. 15 message arguments that Rexx allows.  But you should not need them, because
  5844. of the flexibility of Rexx and Uedit.  (See the ARexx User Reference Manual.
  5845. See the CL functions rexxIn() and rexxOut() in Part 3.)
  5846.  
  5847. MESSAGE SIZE:  Rexx messages can be up to 65535 bytes in size.  When you try
  5848. to send a too-big message or reply, an error is reported.  If it is a too-big
  5849. message, the message is not sent.  If it is a too-big reply, a reply is sent,
  5850. but a Result value of 10 is sent (reporting "Something's wrong") rather than
  5851. the Okay (0) Result that would normally have been sent.  (See Uedit-Rexx
  5852. Result and Error Codes, 2.8.13.)
  5853.  
  5854. ACTION CODES AND MODIFIER FLAG BITS:  In the rexxOut() CL function, the
  5855. ActionResult field may use defaults for the most common Rexx action code,
  5856. RXCOMM, and most common modifiers, RXFF_RESULT and RXFF_NONRET.  (See the
  5857. action code and modifier tables below.  Also see rexxOut() and rexxIn() in
  5858. 3.4.)  You may also set ActionResult to other Rexx action codes and modifiers
  5859. in the tables below.  No assurance is given that any action codes and
  5860. modifier flag bits will work, however, except the common ones discussed here.
  5861.  
  5862. RXFF_NONRET MODIFIER:  If you send a message with (RXCOMM | RXFF_NONRET) in
  5863. ActionResult, Uedit sends the message but does not expect a reply from it.
  5864. You can send a stream of RXFF_NONRET messages, because no replies are
  5865. expected.  If you receive a message that uses the RXFF_NONRET modifier, you
  5866. must still reply to the message at some point, because while Uedit does not
  5867. really send a reply it needs to know it can release the resource and accept
  5868. another input.
  5869.  
  5870. ARGUMENT STRINGS:  Rexx messages provide for up to 16 arguments (Args[0] to
  5871. Args[15]) which may contain text (argument strings) or integer arguments.
  5872. Most Rexx messages only use Args[0].  Uedit supports only Args[0].  If an
  5873. incoming message uses Args[1-15], Uedit ignores those arguments.  Only
  5874. Args[0] should be needed, because any number of text and integer arguments
  5875. may be passed in Args[0] and parsed out at the other end.
  5876.  
  5877. QUOTATION MARKS:  In Rexx messages, quotation marks are sometimes needed.
  5878. Uedit does not insert any quotation marks automatically, though it could be
  5879. customized do so.  If quotes are needed, you must supply them.  (See the
  5880. rexxIn() and rexxOut() CL functions in Part 3.)
  5881.  
  5882. In the table below are the command (action) codes used by ARexx.  On outgoing
  5883. messages, an action code or a Uedit default must be put into the ActionResult
  5884. argument of rexxOut().  On incoming messages, rexxIn() reports the incoming
  5885. message's action code in the ActionResult argument.
  5886.  
  5887. On outgoing and incoming replies, the ActionResult field of rexxOut() and
  5888. rexxIn() contains a Result code.  (See Uedit-Rexx Result and Error Codes,
  5889. 2.8.13.)
  5890.  
  5891. REXX COMMAND (ACTION) CODES
  5892. name      hex       decimal
  5893. ----      ---       -------
  5894.                     0                 Uedit defaults to RXCOMM
  5895.                     1                 Uedit defaults to RXCOMM | RXFF_RESULT
  5896.                     2                 Uedit defaults to RXCOMM | RXFF_NONRET
  5897. RXCOMM    0X1000000 16777216          a command-level invocation
  5898. RXFUNC    0X2000000 33554432          a function call
  5899. RXCLOSE   0X3000000 50331648          close the port
  5900. RXQUERY   0X4000000 67108864          query for information
  5901. RXADDFH   0X7000000 117440512         add a function host
  5902. RXADDLIB  0X8000000 134217728         add a function library
  5903. RXREMLIB  0X9000000 150994944         remove a function library
  5904. RXADDCON  0XA000000 167772160         add/update a ClipList string
  5905. RXREMCON  0XB000000 184549376         remove a ClipList string
  5906. RXTCOPN   0XC000000 201326592         open the trace console
  5907. RXTCCLS   0XD000000 218103808         close the trace console
  5908.  
  5909.  
  5910. Here are the modifier flag bits which may be logical-ORed with a Rexx command
  5911. (action) code:
  5912.  
  5913. REXX MODIFIER FLAG BITS
  5914. name         flag bit
  5915. ----         -----------
  5916. RXFF_NOIO    (1L << 16L)             suppress I/O inheritance?
  5917. RXFF_RESULT  (1L << 17L)             result string expected?
  5918. RXFF_STRING  (1L << 18L)             program is a "string file"?
  5919. RXFF_TOKEN   (1L << 19L)             tokenize the command line?
  5920. RXFF_NONRET  (1L << 20L)             a "no-return" message?
  5921.  
  5922. Uedit does not validate the action codes that you put into ActionResult when
  5923. using rexxOut().  Normally your action code in messages will be RXCOMM,
  5924. possibly with the RXFF_RESULT or RXFF_NONRET modifier.  You may use the Uedit
  5925. defaults shown in the Action Code table for these.
  5926.  
  5927. Do not use the modifiers in the above table, if you use one of Uedit's
  5928. default action codes (0, 1, or 2) in the ActionResult field of rexxOut().
  5929. The modifiers should only be used when you use one of Rexx's own action
  5930. codes.  Also recall that Uedit does not support RXFF_TOKEN.
  5931.  
  5932. 2.8.13 Uedit-Rexx Result and Error Codes
  5933.  
  5934. If CL function rexxIn() or rexxOut() returns FALSE, the returncode argument
  5935. contains one of the following Uedit error values and the error message is
  5936. displayed in the message line:  (See CL functions rexxIn() and rexxOut() in
  5937. 3.4.  See the Rexx commands in Config!R.)
  5938.  
  5939. UEDIT-REXX ERROR RETURN CODES
  5940.         -1 ARexx not up.
  5941.         -2 Not enough memory or outBuf-outRgn was empty.
  5942.         -3 Message or reply > 65535 bytes in size.
  5943.         -4 Nothing to fetch or reply to.
  5944.         -5 Must fetch reply to last msg before sending this one.
  5945.  
  5946. Rexx Result Codes:  Rexx reply Result codes are normally 0 (the OKAY result).
  5947. A non-zero Result code means a problem occurred.  When rexxIn() fetches a
  5948. reply, the Rexx Result code is reported in the ActionResult argument.  When
  5949. you send a reply, one of the following Result values must be put into the
  5950. ActionResult argument of rexxOut():
  5951.  
  5952. REXX ERROR RESULT CODES
  5953.         name      value
  5954.         ----      -----
  5955.         RC_FAIL   -1              something's wrong
  5956.         RC_OK     0               success
  5957.         RC_WARN   5               warning only
  5958.         RC_ERROR  10              something's wrong
  5959.         RC_FATAL  20              complete or severe failure
  5960.  
  5961. When you try to fetch a message with rexxIn() and it cannot load in the
  5962. message due to low memory, rexxIn() sends an RC_ERROR "Something's wrong"
  5963. reply to the Rexx sender automatically.
  5964.  
  5965. When you try to send a reply with rexxOut() and your reply text (if any) is
  5966. too big or there's not enough memory, Uedit sends an RC_ERROR reply instead
  5967. of sending an RC_OK reply.
  5968.  
  5969. When you press Amiga-ESC to abort, Uedit sends an RC_ERROR reply to any
  5970. outstanding Rexx message.  When you quit Uedit and it is cleaning up the Rexx
  5971. traffic, Uedit replies with RC_ERROR to any incoming messages that are queued
  5972. up.
  5973.  
  5974. 2.8.14 Rexx-Interface Buffer and Number Variable Conventions
  5975.  
  5976. The buffer variable conventions used with Uedit-Rexx commands are:
  5977. buf36    =  REXXCOMM word list
  5978. buf61    =  Rexx Message/Reply IN
  5979. buf62    =  Rexx Message/Reply OUT
  5980.  
  5981. The integer variable conventions used with Uedit-Rexx commands are:
  5982. n26      =  used for flagging purposes
  5983. n27      =  ActionResult: action in Messages; result in Replies.
  5984. n28      =  flag for rexxIn()/rexxOut() indicating Message(0) or Reply(1)
  5985. n29      =  returncode from rexxIn()/rexxOut(), if FALSE is returned.
  5986. MacroNum =  used in capturing macro numbers in virtual-t/rexxKey command.
  5987. InputChar=  used in capturing input characters in virtual-t/rexxKey command.
  5988.  
  5989. 2.9 Swapping Keys Permanently
  5990.  
  5991. Using Swap Keys (f5), you can safely swap, on a permanent basis, keys that
  5992. are not run by other keys or by menu selections.  Selecting Save Data (A-f6)
  5993. preserves the swapped arrangement in the Data! file.  (See Keys, 1.38.)
  5994.  
  5995. But if, later on, you recompile the config files, you will get back the old
  5996. key layout and will have to do the swaps again.  To swap keys permanently,
  5997. edit the config files.  This way you can even swap keys that are run by other
  5998. keys and by menus.  And the new key arrangement is preserved, even when the
  5999. config is recompiled.
  6000.  
  6001. To rearrange the keys in Config! and its segment files (Config!M, etc), use
  6002. Search (f9) and Replace (f10).  Change every occurrence of the key that is
  6003. being swapped, in each of the config segments.  Key arguments may appear in
  6004. the following places:  In menu() functions, at the beginning of commands
  6005. after the left angle bracket "<", in runKey() functions, and in integer and
  6006. key functions.  After rearranging the keys, load in and edit the Help! file,
  6007. bringing it up to date.
  6008.  
  6009. 2.10 Mapping the Keyboard Keys
  6010.  
  6011. The "a" key on the keyboard can be mapped to the letter "b" by compiling the
  6012. command <normal-a: typeChar("b")>.  The disadvantage of mapping in this way
  6013. is that each mapped key runs a command and consumes a few bytes of memory.
  6014. Also it does not map the extra keys that are on European Amiga keyboards, and
  6015. it is slower running than direct mapping would be.
  6016.  
  6017. The Config! defaults have two 64-character arrays corresponding to the
  6018. printable, lower and upper case keys on the Amiga keyboard.  Rearranging the
  6019. characters in these arrays remaps the Amiga keyboard (for Uedit).  This
  6020. method is 100% efficient, because it defines the internal key array that
  6021. Uedit uses.  The arrays have blanks corresponding to extra keys on European
  6022. Amiga keyboards.  Those extra keys can be mapped so that Uedit will use them.
  6023.  
  6024. If you decide to modify the 64-character arrays in Config!, note the
  6025. following:  There must be exactly 64 characters in each array.  It is better
  6026. to use OverStrike typing mode, when modifying the arrays.  If you edit the
  6027. arrays and leave out the letter "a", and then select Cfg Defalts (AC-f6) to
  6028. recompile the config defaults, there is no way to type in the letter "a".
  6029. Therefore do not select Save Data (A-f6) to save a modified keyboard mapping,
  6030. until it has been thoroughly checked out.  If problems arise during the
  6031. remapping of the keyboard, select Load Data (C-f6) and recover the original
  6032. keyboard mapping.  When finished rearranging the characters in the printable
  6033. character arrays, select Cfg Defalts (AC-f6) to recompile the defaults and
  6034. select Save Data (A-f6) to save the new arrangement permanently.
  6035.  
  6036. 2.11 Building Key-Help for Teach Keys
  6037.  
  6038. When Teach Keys (C-Help) is used, it puts Uedit into Teach Keys mode.  In
  6039. Teach Keys mode, instead of working as function keys, inputs are looked up in
  6040. the key-help file and their help messages are displayed.
  6041.  
  6042. The first flag in the default values at the front of Config! is the build-
  6043. key-help flag.  If this flag is <1>, when Config! is compiled at startup, a
  6044. key-help file is automatically built.  The second default <S:Key-Help>
  6045. defines the directory/file name that the key-help file is to use.  It is
  6046. suggested that the S: directory be used for the key-help file, because then
  6047. Teach Keys may be used in any directory.
  6048.  
  6049. The key-help file consists of a one-line message for each key that has a
  6050. command in your config.  In your config, the help message is the line that
  6051. appears just above each command's left angle bracket "<".  To keep the key-
  6052. help file smaller, the help messages should be brief as possible.  Help
  6053. messages that exceed 80 characters are truncated to 80 characters in the key-
  6054. help file.
  6055.  
  6056. Building a key-help file slows down the startup-compile considerably, and the
  6057. key-help flag should be left at <0> until the configuration is finished and
  6058. satisfactory.  Then set the key-help flag to <1> and compile your config one
  6059. last time, building a new key-help file for it.
  6060.  
  6061. 2.12 Locations and Regions
  6062.  
  6063. (See the Function Argument Lists in 3.1.)
  6064.  
  6065. The following 20 memory addresses (locations or pointers) in each Uedit
  6066. buffer are tracked and maintained when the buffer is modified:  atCursor
  6067. mouseLoc sPage ePage sHilite eHilite sInvert eInvert locA-thru-locJ locSC
  6068. locSP.
  6069.  
  6070. A hilite region exists, only if sHilite<eHilite.  When sHilite>=eHilite, no
  6071. hilite region exists.  The same logic applies to invert and loc regions.  The
  6072. following 8 regions may exist in each buffer, using the buffer's location
  6073. pointers:  hilite invert loc locCD locEF locGH locIJ locPC
  6074.  
  6075. The following are modifiers, not locations.  They instruct CL functions to
  6076. modify existing locations (such as atCursor in moveCursor(curFile,eWord)):
  6077.         sFile eFile eForm sForm sLine eLine sWord eWord sTab eTab sChar eChar
  6078.         upLine downLine
  6079.  
  6080. Do not confuse locations, such as atCursor and sHilite, with modifiers, such
  6081. as sForm, eLine, and sChar.  Modifiers merely tell functions like
  6082. moveCursor() and equateLoc() how to modify existing locations.
  6083.  
  6084. The following regions are calculated relative to atCursor when referenced in
  6085. a function:  line word char
  6086.  
  6087. "Line" is everything from the cursor to eol, but not including eol.  "Word"
  6088. is everything from cursor to end-of-word.  "Char" is the character under the
  6089. cursor.  The region "all" is calculated when needed, using start-of-buffer
  6090. and the end-of-file marker.
  6091.  
  6092. A region is bounded by two locations.  For example, hilite is bounded by
  6093. sHilite and eHilite.  sHilite points to the first character inside the hilite
  6094. region.  But eHilite points to the first character just outside the region.
  6095. Thus, the start-location is included in regions, but the end-location is not
  6096. included in regions.
  6097.  
  6098. When a region is cleared, locations inside the region are bumped upward to
  6099. point to the first character after the cleared region.  Example:  If you
  6100. delete the cursor line, after the delete the cursor is at the beginning of
  6101. the next line.  If text is inserted on top of a location, the location does
  6102. not move; it still points to the same character after the insertion that it
  6103. pointed to before the insertion.  Example:  Typing in text at the cursor does
  6104. not alter the cursor's location.  The cursor still points to the same
  6105. character, which is moved forward as the text is typed in.
  6106.  
  6107. sPage and ePage refer to a window "page", not a printed page.  "sForm" and
  6108. "eForm" refer to a printed page; printed pages are determined by line-count
  6109. and formfeeds in the text.  When the window is refreshed, the displaying
  6110. begins at sPage.  sPage points to the first character in the first line
  6111. visible in the window.  To control what is displayed, such as when about to
  6112. call editBuf() to display and edit a different buffer, set sPage in the
  6113. buffer to the desired location before calling editBuf().
  6114.  
  6115. ePage is the first character in the line below the last line in the window.
  6116. If eof is in the window, ePage is at eof.  ePage is updated only when the
  6117. last line in the window is refreshed, and Uedit tries to get by with
  6118. refreshing just the cursor line as much as possible.  ePage is only used when
  6119. referenced as a CL function argument or in carrying out the internal onscreen
  6120. test to see whether it is necessary to scroll to display the cursor or not.
  6121. ePage is often out of date, and this causes inaccuracy in the internal
  6122. onscreen test and the onScreen() CL function.
  6123.  
  6124. The sPage and atCursor memory locations are used internally very frequently,
  6125. as one would expect.  ePage is used in the internal onscreen test.  mouseLoc
  6126. is borrowed as a scratch loc during paragraph reformatting. (mouseLoc is
  6127. updated when the mouse is clicked, so it seemed like a good buffer loc
  6128. variable to borrow, though perhaps it would have been better to borrow ePage
  6129. as the window is refreshed after reformatting anyway.)  locSC and locSP are
  6130. used internally to store the second atCursor and sPage locations, if you
  6131. happen to be displaying the same buffer in two split windows; locSC is
  6132. swapped with atCursor and locSP with sPage, when you switch between the two
  6133. split windows.  Other than that, except for atCursor and sPage which are used
  6134. constantly, the only time buffer locations are changed internally is when
  6135. they are tracked during text inserts and deletes or are modified in response
  6136. to CL function calls.
  6137.  
  6138. Locations are local to each buffer.  There is no cross-linkage of locations
  6139. between or among buffers.  That is, atCursor of buf10 is unrelated to
  6140. atCursor of buf20.  The only way to relate locations from one buffer to
  6141. another is to use byte-indexing into the text in the buffers.  (See
  6142. locToIndex(), indexToLoc(), locToLine(), and lineToLoc() in 3.4.)
  6143.  
  6144. 2.13 Scratch Location Variables
  6145.  
  6146. locA through locJ, locSC, and locSP are provided to use as scratch locs.  As
  6147. noted earlier, locSC and locSP are used internally for storing atCursor and
  6148. sPage if a buffer is displayed in two split windows; they aren't used in the
  6149. standard config, however, and could be used for scratch locs if you don't
  6150. need them for a second split window.  locC through locJ are used as
  6151. bookmarks, if bookmark commands (S-gadget1, S-gadget2, and S-gadget3) are
  6152. used; if not using bookmarks, they are available as scratch locs.
  6153.  
  6154. LocB is used in the standard config by the scratch-delete commands (C-d, kp7,
  6155. and kp9).  When a scratch delete is done, atCursor is stored in locB.  If
  6156. another scratch delete is done, locB is compared to atCursor; if they are not
  6157. equal, the Undo buffer (buf45) is deleted, starting a fresh collection of
  6158. scratch deletes.  As long as locB equals atCursor, scratch deletes are
  6159. accumulated in the Undo buffer.
  6160.  
  6161. locA is used for scratch purposes in commands in the standard config, but not
  6162. as a durable location variable like locB is.  In non-curFile buffers, both
  6163. locA and locB are available to use as scratch locs.  (Note that this
  6164. discussion applies only to the standard config.  You may use locA and locB as
  6165. you wish in custom configs or in customizing the standard config.)
  6166.  
  6167. ePage may be used as a curFile scratch loc, when the window is sure to get
  6168. refreshed later on; ePage is updated by the display routine when the window
  6169. is refreshed.  It may be used freely as a scratch loc in non-curFile buffers,
  6170. because even if they become curFile later on they are sure to be displayed,
  6171. which will update ePage.
  6172.  
  6173. mouseLoc is a good scratch loc to use in curFile.  The mouse button commands
  6174. which use mouseLoc run only after the mouse button is clicked, which updates
  6175. mouseLoc.  In non-curFile buffers, mouseLoc may be used as a durable or
  6176. scratch location variable.
  6177.  
  6178. In non-curFile buffers, all buffer locations may be used as durable location
  6179. variables, as long as atCursor and sPage are set to their desired locations
  6180. before letting the buffer be displayed as curFile, if it becomes curFile.
  6181.  
  6182. 2.14 Display and ThisKey
  6183.  
  6184. Uedit tries to refresh the display only as needed and only during pauses.  It
  6185. tries not to update the display, when it would hurt performance.  Various CL
  6186. functions may set bits in the internal displayFlag variable, which tells the
  6187. display routine to refresh just the cursor line, from cursor to end-of-page,
  6188. the whole page, or any of the split windows, during the next pause.  At any
  6189. point in a command, displayFlag may have bits set for one or more of these
  6190. display actions.  During the next pause, the display refreshes whatever the
  6191. bits instruct it to.  As a backup measure, the active window is fully
  6192. refreshed after a 4-second pause.
  6193.  
  6194. The updateDisplay CL function causes Uedit to act on displayFlag's bits
  6195. immediately.  refreshDisplay causes curFile's window and title bar to be
  6196. fully refreshed immediately.  Commands should not call refreshDisplay or
  6197. updateDisplay unconditionally, if they may be used in learned sequences or
  6198. repetitively hundreds or thousands of times.
  6199.  
  6200. The thisKey CL function was provided in order to eliminate display overhead
  6201. in cases where commands are run by other commands.  thisKey returns True,
  6202. when the key it is in is the primary key.  It returns False, when the key it
  6203. is in is being run by another key.  For example, "if (thisKey)
  6204. refreshDisplay" causes a window-refresh, only if the command it is in is
  6205. running as the primary command.  When a command is run in a learned sequence,
  6206. it never is the primary key, and so thisKey could be used to suppress a
  6207. refreshDisplay.  When you need to force the display to be refreshed in
  6208. learned sequences, select Refresh (SC-Help) when creating the learned
  6209. sequence using Learn Mode.
  6210.  
  6211. Always run custom commands first without a display function in them, because
  6212. in many cases Uedit handles refreshing correctly.  If a display refresh turns
  6213. out to be necessary, try using updateDisplay before resorting to
  6214. refreshDisplay.  updateDisplay is not foolproof, because it relies on the
  6215. accuracy of displayFlag's bits at any given time.  If updateDisplay does not
  6216. refresh as needed, sometimes switching around the functions that come before
  6217. it (functions such as moveCursor() and vscroll()) may help.  If all else
  6218. fails or performance is not a concern, use refreshDisplay.
  6219.  
  6220. 2.15 Space and Speed
  6221.  
  6222. Because every command in Uedit is customizable, it is necessary for it to
  6223. have an engine that parses and follows the instructions of command-pcode in
  6224. processing user inputs.  The engine is not needed for typing inputs, but any
  6225. key that has a command compiled for it is processed by the engine.  There is
  6226. engine-overhead associated with each call to a function in a command, in
  6227. addition to the overhead of the function itself.  The more you can make Uedit
  6228. do while inside functions, the faster your commands will run.
  6229.  
  6230. A good example is the End-of-Line (C-e) command, which changes the eols in
  6231. curFile.  If moveCursor(curFile,eChar) were used instead of using
  6232. moveCursor(curFile,eLine) to find the eols in curFile, the C-e command would
  6233. take years to run, because the function-calling overhead would occur for each
  6234. character in curFile instead of only once per line.  By using eLine, control
  6235. stays inside moveCursor() until it finds an eol.  Similarly, a command that
  6236. manipulates words is faster, if its functions use eWord and sWord instead of
  6237. using eChar and sChar.
  6238.  
  6239. Space efficiency:  Using insertRgn() or insertChar() in a repetitive process
  6240. or loop may consume memory like crazy, because Uedit may split memory-blocks
  6241. each time through the loop.  This is the result of a space/speed tradeoff.
  6242. Uedit recovers the memory during the next pause when it does housekeeping.
  6243. Inserting text at eFile (end-of-buffer) is efficient, however, because space
  6244. is allocated only when the last block becomes full.  This effectively keeps
  6245. the buffer packed at all times.  When possible, text should be inserted at
  6246. eFile.
  6247.  
  6248. It is more efficient to use insertRgn() and clearRgn() to insert and clear
  6249. blocks of text than to do it a character at a time using functions like
  6250. insertChar() and clearChar().  But when only one character need be inserted,
  6251. cleared, or swapped, the character functions are better.  In particular,
  6252. swapChar() is efficient, because it does no block-splitting.  insertChar()
  6253. may split a block, unless it is used when atCursor is at eFile.  Once a block
  6254. has been split, inserts can continue at that location until the block becomes
  6255. full; but in search & replace operations each insert takes place at a new
  6256. location, and it results in rampant block-splitting.  (Technical note:
  6257. Commands can force Uedit to pack a buffer by calling the fileSize() CL
  6258. function.  It packs the buffer before calculating its size.)
  6259.  
  6260. Is it better to store text, such as headers and footers, in commands or in
  6261. buffers?  There is less space overhead in commands, because buffers carry
  6262. pointers and flags.  But commands may not exceed 10k bytes in size.  And
  6263. buffer space overhead really is not so bad; it is under 5% on moderate to
  6264. large files.  And it is not desirable to fatten up the Data! file with
  6265. commands filled with verbose text.  But the least efficient way to store text
  6266. is in learned sequences; each character input costs 14 bytes in a learned
  6267. sequence, so there is a factor of 14 in overhead.
  6268.  
  6269. 2.16 StartUp Key and Menus
  6270.  
  6271. Startup is a special key, like Idle and PreKey, that uses no shift-modifiers.
  6272. That is, the shft, alt, ctl, etc key-prefixes may not be used with the
  6273. Startup key-name.  The main use of the Startup command is to define Uedit's
  6274. menus and buffer names.  It may serve other purposes too, such as auto-
  6275. loading files, setting parameters, or displaying a message or requester when
  6276. Uedit is first started.  (See the Startup command in Config!.)
  6277.  
  6278. Configs may include a Startup command, but one is not strictly required.
  6279. Typically the Startup command is the largest in any config, because of the
  6280. dozens of menu definitions in it.  (See Customizing the Menus, 2.17.)
  6281.  
  6282. The Startup command is run at the following times:  (1) When Uedit is first
  6283. started.  (2) After Startup has been recompiled or swapped or a new Startup
  6284. command read in from a partial data file.  (3) When you load in a new data
  6285. file.  (4) When you run it using runKey(Startup).
  6286.  
  6287. In all cases, even when using runKey(Startup), Startup is not actually run at
  6288. the time.  Instead, all that happens is that the menus are deleted, which
  6289. causes Startup to be run the next time the menus are checked during a pause.
  6290. It takes a second or two to run a large Startup command with plenty of menus
  6291. and for the Amiga to set up the menus afterward.  Putting this off until a
  6292. pause gives friendlier performance.
  6293.  
  6294. When Uedit is first started and Startup is run, every function in it is
  6295. called.  But after that, when Startup is run every function in it is executed
  6296. except runKey().  Thus, if you want something to happen only when Uedit is
  6297. started up, such as displaying an About... message, use runKey() to run the
  6298. command containing it.
  6299.  
  6300. There are two ways you can selectively cause a particular command to be run
  6301. automatically when Uedit is first started up:  You can use the CLI command-
  6302. line flags -K or -L; or you can include a runKey(myKey) in the Startup
  6303. command.  If myKey exists, it is run when Uedit first comes up and only then.
  6304. If myKey does not exist, the runKey() does nothing.  (See CLI Command Line,
  6305. 2.1.)
  6306.  
  6307. 2.17 Customizing the Menus
  6308.  
  6309. Uedit's menus are completely defined by calls to menu functions in the
  6310. Startup command.  Menu functions may be used only in Startup and nowhere
  6311. else.  NameBuffer() functions in the Startup command define the buffer names
  6312. to be shown in the title bar when buffers, such as the copied hilite buffer,
  6313. are displayed in split windows.  (See the menu() and nameBuffer() CL
  6314. functions in 3.4.)
  6315.  
  6316. It is easy to customize the menu and buffer-name definitions in the Startup
  6317. command in Config!.  The menu CL functions used are:
  6318.  
  6319.             menu("description",menu#,key-arg)
  6320.      checkedMenu("description",menu#,key-arg,flag-var)
  6321.          subMenu("description",menu#,key-arg)
  6322.   checkedSubMenu("description",menu#,key-arg,flag-var)
  6323.  
  6324.  
  6325. The name-buffer function is:  nameBuffer(buf#,"buffer-name")
  6326.  
  6327. The rules governing menu definitions are these:
  6328.  
  6329. 1.  Menu "description" may be up to 17 characters in length.
  6330.  
  6331. 2.  All key-args in menu functions must correspond to existing key commands,
  6332. or else the menu definition is ignored and does not appear.
  6333.  
  6334. 3.  There may be up to 7 main menus, using menu# = 1 to 7.  A main menu
  6335. consists of a collection of menu functions, each using the same menu#.
  6336.  
  6337. 4.  The first menu function using a new menu# serves as the menu header for
  6338. that menu#.  Its "description" is displayed in the window's title bar when
  6339. you press the right mouse button.
  6340.  
  6341. 5.  Each main menu header may have up to 20 menu items following it, each
  6342. using the same menu#.  These use the menu() and checkedMenu() functions.
  6343.  
  6344. 6.  Each menu item may serve as a real menu item or a header for a submenu.
  6345. If submenu functions follow an item, it serves as a submenu header.  If no
  6346. submenu functions follow it, it serves as a real menu item.  Each menu item
  6347. may have up to 12 submenu items following it.  The submenu items use the same
  6348. menu# as the parent menu.  Submenu items use the subMenu() and
  6349. checkedSubMenu() functions.
  6350.  
  6351. 7.  Checkmarked menu and submenu items use a fourth argument, which is a
  6352. flag-var such as WordWrap or RightJustify.  The flag-var's value at any time
  6353. determines whether the item or subitem appears checkmarked or not.  If the
  6354. flag-var is non-zero, a checkmark appears.  Checked menu and submenu items
  6355. use inverted colors so that they are easily noticed.  Selecting a checked
  6356. item or subitem toggles On/Off the value of the flag-var.
  6357.  
  6358. The following is an example, taken from Config!:
  6359. <Startup:
  6360.   menu("Files",1,normal-f1) .. first occurrence of menu#1, so it's the header
  6361.      menu("Next file      f1",1,normal-f1).. first actual item
  6362.      menu("Prev file    S-f1",1,shft-f1).. second item
  6363.      menu("Open             ",1,alt-f1).. third item is used as submenu header
  6364.   SUBmenu("Open         A-f1",1,alt-f1).. first submenu item
  6365.   SUBmenu("File request L-f1",1,lAmiga-f1)..second submenu item..
  6366.   SUBmenu("New file     C-f1",1,ctl-f1)
  6367.   SUBmenu("Insert file SA-f1",1,shftAlt-f1)
  6368.   SUBmenu("Restore     SC-f1",1,shftCtl-f1)
  6369.   SUBmenu("Rename        A-n",1,alt-n).. last submenu item
  6370.      menu("Save             ",1,normal-f2).. 4th menu item is also submenu header
  6371.   SUBmenu("Save           f2",1,normal-f2)
  6372.   SUBmenu("Save as...   S-f2",1,shft-f2)
  6373.   SUBmenu("Save changes A-f2",1,alt-f2)
  6374.   SUBmenu("Abort save  SA-f2",1,shftAlt-f2)......
  6375.  
  6376. After customizing the Startup command, put the cursor above the "<Startup:"
  6377. that begins the command and press F6 (Compile) to recompile the command.
  6378. Select Save Data (A-f6) to save the changed menus permanently in the data
  6379. file.
  6380.  
  6381. After Startup has been recompiled, the menus are rebuilt, which takes a
  6382. second or two.  If you swap Startup to some other key, the menus are removed.
  6383. If Startup is swapped back into place, the menus reappear a short time later.
  6384.  
  6385. If a key referenced in a menu definition does not exist when Startup is run,
  6386. the menu item for that key does not appear.  If a key used in a menu item is
  6387. killed, the item stays visible in the menu until Startup is run again at some
  6388. point.  Startup may be run anytime to rebuild the menus by selecting Do Menus
  6389. (SAC-Help).  If a key used in a menu is swapped with another key, selecting
  6390. that menu item runs the other key.  If a menu key is swapped with a key that
  6391. has no command, the menu item does nothing when it is selected, and the menu
  6392. item will not reappear if the Startup command is run later on.
  6393.  
  6394. 2.18 Idle Key and IdleTime
  6395.  
  6396. The Idle key, like Startup and PreKey, does not use shift-modifiers.  The
  6397. Idle command, if it exists, runs automatically when there is a pause of
  6398. IdleTime tenths of a second.  IdleTime may be 0 to 32767 tenths of a second.
  6399. In the defaults in Config!, IdleTime is set to 10 seconds.  IdleTime may be
  6400. changed by selecting Idle Timer (SAC-i).
  6401.  
  6402. The Idle command in the Config!M file implements the Save On Idle feature.
  6403. If Save On Idle (C-f2) is checkmarked in the Local Modes menu, changes in
  6404. curFile are auto-saved when you pause for 10 seconds.  (Selecting Save On
  6405. Idle turns On the UserLocalA flag for curFile.  Idle looks at all file
  6406. buffers to see whether their UserLocalA flag is On; if On, it saves the
  6407. buffer, if the buffer's Changed flag is also On.)  Pauses are not measured
  6408. very accurately by Uedit, because it does some work during pauses, packing
  6409. buffers, updating menus and display, and processing spooled prints and file-
  6410. saves.
  6411.  
  6412. The following Idle example saves curFile automatically, if it has been
  6413. modified, after you have paused for IdleTime tenths of a second.
  6414.         <Idle: if (getFlag(curFile,changed)) saveFile(curFile) >
  6415.  
  6416. When you turn on Rexx autoTraffic mode, a special Idle command is used in
  6417. place of the normal (Save On Idle) command and handles Rexx traffic.  Rexx
  6418. autoTraffic mode sets IdleTime to zero, so that traffic is handled
  6419. expeditiously.
  6420.  
  6421. When IdleTime is 0, there is an interval of about 1 tenth of a second between
  6422. executions of Idle.  Increasing IdleTime to 1 tenth of a second would cause
  6423. Uedit to sleep more, which would give more resource to other tasks on the
  6424. Amiga.  If no Idle command exists, Uedit sleeps most of the time, once its
  6425. housekeeping has been caught up.  When using the Save On Idle feature,
  6426. IdleTime should be 10 seconds or more for best results.
  6427.  
  6428. Upon returning from tiny window, if IdleTime is 0, Idle runs before the menus
  6429. are reenabled.  This gives faster response during Rexx autoTraffic mode.
  6430. For instance, if Uedit is in tiny window and a Rexx message tells it to load
  6431. myFile, it immediately returns to its big window and loads myFile.  While it
  6432. is doing that, if you press the right mouse button there should not be any
  6433. menus yet.  The menus are reenabled after Idle has processed any outstanding
  6434. Rexx traffic, if IdleTime is 0.
  6435.  
  6436. 2.18.1 rexxKey
  6437.  
  6438. rexxKey is a key-name, which like startup and preKey, does not use shift
  6439. modifiers.  The rexxKey command, if it exists, runs automatically in idle
  6440. periods ONLY if there is an incoming Rexx message or reply waiting to be
  6441. processed.  The purpose of rexxKey is to reduce overhead.  (When the idle
  6442. command used to be used in order to process rexx traffic with idleTime=0,
  6443. there was undue overhead because it ran constantly in idle periods.)  rexxKey
  6444. runs (during idle periods) only if there is incoming traffic to process and
  6445. won't run again until there is new incoming traffic.  In the standard config,
  6446. rexxKey runs only if autoTraffic mode is On.  (See 2.8 ARexx Interface.)
  6447.  
  6448. Note: In order to keep rexxKey from running repeatedly in idle periods, you
  6449. must process the incoming traffic by calling rexxIn() in your rexxKey
  6450. command.  (See rexxIn() and rexxOut() in Part 3.)  The standard config takes
  6451. care of this automatically, when autoTraffic is On.  In Config!R, the rexxKey
  6452. command is actually assigned to virtual-t and when autoTraffic mode is turned
  6453. On, virtual-t is swapped with rexxKey, bringing the rexxKey command on-line.
  6454. (See Config!R and see 2.8 ARexx Interface.)
  6455.  
  6456. 2.18.2 onAbort
  6457.  
  6458. onAbort is a key-name, which, like startup and preKey, does not use shift
  6459. modifiers.  When an abort occurs, either after you press Amiga-ESC or due to
  6460. another cause such as running out of memory or loading a data file, the
  6461. normal abort cleanup-work is done by Uedit and then, if an onAbort command
  6462. exists, it is executed.  An onAbort cmd may free scratch buffers, reset
  6463. buffer flags, and so on.  Example:
  6464.     <onAbort:    do (n54,50,59) freeBuf(buf[n54])  .. free scratch buffers
  6465.                 downFlag(curFile,overStrike)  .. turn off overstrike mode
  6466.     >
  6467.  
  6468. Warning:  As with preKey, it is possible to hang up Uedit with an ill-
  6469. conceived onAbort command.  That is, if something in the onAbort command
  6470. itself causes an abort, the command will run until you reboot the machine.
  6471. For this reason, in writing an onAbort command, it is a good idea not to do
  6472. anything that may cause memory to be allocated or that could conceivably
  6473. bring about an abort.  For instance, loading in a data file causes an
  6474. internal abort; an abort is forced because whatever command is running ceases
  6475. to exist in Uedit when a new data file is loaded in.
  6476.  
  6477. In order to get the most flexibility and utility out of onAbort, it may be
  6478. useful to create a number of commands for onAbort, assigning them to "unused"
  6479. macroNums.  The normal state might be to have no onAbort command; but inside
  6480. each key that requires onAbort, copy or swap one of the abort commands into
  6481. onAbort using copyKey() or swapKey(); then as the last step in the command
  6482. kill the onAbort command using killKey() or use swapKey() a second time.
  6483. (See copyKey(), swapKey(), and killKey() in Part 3.  See Keys and MacroNums,
  6484. 2.31.)
  6485.  
  6486. 2.18.3 onTitle
  6487.  
  6488. onTitle is a key-name, which, like startup and preKey, does not use shift
  6489. modifiers.  Normally, clicking the title bar causes Uedit to switch to tiny
  6490. window.  But if an onTitle command exists, it is executed instead when you
  6491. click the title bar.  An onTitle command might do some cleanup work for you,
  6492. such as freeing scratch buffers, and it can even switch you to tiny window
  6493. before or after doing its other work.  Example:
  6494.     <onTitle:  toggle(toTiny)     .. can still goto tiny window as always
  6495.                freeBuf(buf54)     .. free scratch buffer
  6496.                .. do other stuff, like save file changes
  6497.     >
  6498.  
  6499. Rather than compiling onTitle each time you need it, it is convenient simply
  6500. to swap it to some unused key slot such as macroNum 1199.  (See swapKey() in
  6501. Part 3.)  Example:  <normal-esc: swapKey(onTitle,1199) >
  6502.  
  6503. If the macroNum 1199 command does not exist, pressing ESC would restore the
  6504. normal click-for-tiny-window action.  Pressing ESC again would reinstate the
  6505. onTitle cmd.
  6506.  
  6507. 2.19 Overview of Commands
  6508.  
  6509. All of Uedit's commands originated as command language (CL) and may be
  6510. customized or reinvented or done away with by the user.  Uedit's CL is self-
  6511. descriptive and should be intuitive for programmers to learn to use.
  6512. Commands are enclosed in angle brackets "<>" and begin with a valid key
  6513. argument followed by a colon ":".  The remainder of the command consists of
  6514. function calls and optional control structures.  When a CL function uses no
  6515. arguments, no parentheses are required or allowed; when it uses arguments,
  6516. they are required.  (See Valid Key Arguments, 2.29.  See Control Structures,
  6517. 2.20.)
  6518.  
  6519. Uedit's compiler ignores extra whitespace and does not care about upper/lower
  6520. case.  The following two commands are identical and valid:
  6521.  
  6522. <shftAlt-w:    if (getFlag(curFile,wordWrap)) putMsg("Wordwrap is ON")
  6523.                else {
  6524.                     putMsg("Wordwrap is Off")
  6525.                     flipFlag(curFile,wordWrap)
  6526.                     alertUser("Now wordwrap is On!")
  6527.                 } >
  6528.  
  6529. <SHFTALT-W:IF(GETFLAG(CURFILE,WORDWRAP))PUTMSG("Wordwrap is On")ELSE{PUTMSG(
  6530. "Wordwrap is OFF")FLIPFLAG(CURFILE,WORDWRAP)ALERTUSER("Now wordwrap is On!")}>
  6531.  
  6532. A command is brought on-line by typing it into any buffer, putting the cursor
  6533. in front or on top of the left angle bracket "<", and pressing F6 to compile
  6534. it.  Selecting Save Data (A-f6) saves the current data to disk, with the new
  6535. command now included.
  6536.  
  6537. Compiling a command creates a binary pcode representation which is more
  6538. compact than the original command written in CL.  The maximum pcode size
  6539. allowed for a compiled command is 10k bytes.  Compiling shrinks the size
  6540. considerably, so a 10k compiled command would be quite large in its source
  6541. command language.
  6542.  
  6543. All functions and most arguments in the CL require only 1 byte in pcode.
  6544. Literals (in "quotes") are stored verbatim, so they may add greatly to the
  6545. size of a compiled command.  The Startup command in Config! sets up the menus
  6546. and has dozens of literal arguments, which are menu names.  Startup is
  6547. typically the largest command in any config.  However, except for literals
  6548. which are stored verbatim, Uedit's pcode takes much less memory than the same
  6549. functionality would take if written in machine code.  Of course, there is a
  6550. penalty for the flexibility and compactness afforded by the CL; the pcode has
  6551. to be interpreted by Uedit's engine at runtime.
  6552.  
  6553. When compiling a command, the compiler moves the cursor forward until it
  6554. finds a left angle bracket "<".  It then compiles until it finds an error or
  6555. reaches the command's right angle bracket ">".  If an error is found, the
  6556. screen flashes and the cursor stops at the error point.  If the compile is
  6557. successful, the pcode size is reported in the message line.  If it is a new
  6558. command, the word "Size" is used in reporting the pcode size; if it is
  6559. replacing an existing command, the word "Replace" is used.
  6560.  
  6561. Commands may run other commands using runKey() to a maximum nesting of 10
  6562. levels.  When you press a key, its command runs at level 1.  If it runs
  6563. another key, the second one runs at level 2, and so on.  If nested commands
  6564. try to exceed level 10, Uedit aborts and the screen flashes.
  6565.  
  6566. It is good practice to write small modular commands, rather than writing big
  6567. ones that are hard to read and follow.  For memory efficiency, it is better
  6568. to use functional modules, because commands can share the same modules or
  6569. routines.  A "virtual" key-prefix was provided to enable you to write
  6570. routines that cannot be run directly by giving an input but may be run by key
  6571. commands using runKey() or by menus.  Additionally, there are many "unused"
  6572. MacroNum slots that may be used for such routines.  (See Keys and MacroNums,
  6573. 2.31.)
  6574.  
  6575. An example of sharing and modularity is the Search and Replace commands.  F9
  6576. is the Search Fwd key.  F10 is the Replace key.  After a successful "find"
  6577. with F9, you can press F10 to do a replace.  After doing the replace, F10
  6578. runs F9 again to continue the search forward.  A-F10 (Replace All Fwd) runs
  6579. F10 and F9 in a loop, searching and replacing, until the search in F9 fails.
  6580.  
  6581. In addition to running other commands with runKey(), commands may compile
  6582. commands (using Compile), swap them (swapKey()), copy them (copyKey()), erase
  6583. them (killKey()), save them to disk (saveConfig() or saveKeys()), and load
  6584. them in from disk (loadConfig() or loadKeys()).  Thus the degree of power and
  6585. flexibility afforded by the command language is almost unlimited.  Add to
  6586. that the power and flexibility of Learn Mode and the ARexx interface, the
  6587. number of buffer and number variables that are available, the buffer and
  6588. number stacks, and the range of possibilities is hard to imagine.
  6589.  
  6590. 2.20 Control Structures
  6591.  
  6592. A Command may contain any number of functions, as long as it stays within the
  6593. maximum pcode size of 10K bytes.  Commands return the True or False of the
  6594. last function called in them.  For example, runKey() gives the return value
  6595. of the last function called in the command it runs.
  6596.  
  6597. Control Structures used in the CL include the if()...else, do(), while(),
  6598. goto-label(), switch()-case(), gosub-label(), and define().  Curly brackets
  6599. ("{...}") may nest a series of functions inside an if()'s or while()'s or
  6600. do()'s domain.  Control structures may be nested within control structures to
  6601. any depth that memory and maximum command size (10k) will allow.
  6602.  
  6603. As in C and other programming languages, multiple arguments may be used
  6604. inside the if() and while() parentheses.  The following symbols are used:
  6605.     NOT = ! or not
  6606.     AND = &
  6607.     OR  = |
  6608.  
  6609. The control structures are:
  6610.  
  6611. 2.20.1  do (Index,From,To)
  6612. Index:    list 13 (see the variable lists in Part 3.)
  6613. From,To:  list 10 (numbers)
  6614.  
  6615. Examples:
  6616.     do(n54,20,n88) putMsg("this is a test")
  6617.  
  6618.     do (n50,n51,n52) if (not fct(args)) {
  6619.         .... structures and functions ....
  6620.     }
  6621.  
  6622.     equateNum(n53,0)
  6623.     do (cmdMultiplier, "A", 128) add(n53,n53,cmdMultiplier)
  6624.  
  6625. Do() works in the forward direction.  Index is incremented at the bottom of
  6626. the loop and the loop continues until Index is greater than To.  Do() always
  6627. runs at least once, even if From is greater than To.
  6628.  
  6629. 2.20.2 while (Function)
  6630. Function:  One or more Functions or Not Functions with/without parentheses.
  6631.  
  6632. Examples:
  6633.     while (fct1(args) & !(fct4(args) | fct5)) if (fct2(args)) fct3(args)
  6634.     while (!fct4(args)) {
  6635.         .... structures and functions ....
  6636.     }
  6637.  
  6638. 2.20.3  if (Function) ... else ....
  6639. Function:  One or more Functions or Not Functions with/without parentheses.
  6640.  
  6641. Examples:
  6642.     if (fct1(args) | !fct5) fct2(args)
  6643.     else fct3(args)
  6644.     if (!fct4(args)) {
  6645.         .... structures and functions ....
  6646.     } else {
  6647.         .... structures and functions ....
  6648.     }
  6649.  
  6650. 2.20.4  goto & label(Number)
  6651. Number:  0 to 99
  6652.  
  6653. There may be at most 100 labels in a given command.  Labels may be defined
  6654. only once, but there may be up to 255 goto's.  Monotonic ordering of labels
  6655. is not required.
  6656.  
  6657. Examples:
  6658. label(31)
  6659.       fct1(args)
  6660.       if (fct2(args)) goto label(29)
  6661.       while (not fct3(arg)) {
  6662.          fct4
  6663.          if (fct5(args)) goto label(31)
  6664.          else if (not fct6(args)) return
  6665.       }
  6666. label(29)
  6667.       fct7(args) ....
  6668.  
  6669. 2.20.5  switch(N) & case(N)
  6670. N:  list 10   (See Argument Lists used in the Command Language, 3.1.)
  6671.  
  6672. The switch()/case() control structure is similar to that used in the C
  6673. programming language, but it is more flexible; both the switch() and case()
  6674. arguments may be variables or constants.  Curly brackets are required.  The
  6675. default case is optional.
  6676.  
  6677. Example:
  6678.       switch(n54) {               .. can use a literal or constant here also
  6679.           case(10)                .. fall thru to next case
  6680.           case(-1)   { ... }
  6681.           case("abcd") { ... }
  6682.           case(n55) { ... }       .. can use a variable like n54
  6683.           default   { ... }       .. default is optional
  6684.       }
  6685.  
  6686. 2.20.6  gosub label(Number)
  6687. Number: 0 to 99
  6688.  
  6689. gosub acts like a goto label(nn), except gosub label(nn) returns control to
  6690. the next statement after the calling point when a return or the end of the
  6691. command is run into.  Subroutines are normally at the end of the command, so
  6692. that the command's ending bracket ">" can cause a return.  Multiple gosubs
  6693. may exist, however, and normally there would be a return, returnTrue, or
  6694. returnFalse terminating the routine under some condition or other.  gosub
  6695. label(nn) may be used inside an if() or while(), and the subroutine should
  6696. return a meaningful True or False accordingly.  Subroutines are recommended
  6697. anytime the routine need not be callable by other commands; in the latter
  6698. event, runKey() should be used so that other commands can also call the
  6699. routine.
  6700.  
  6701. Example:
  6702. <normal-esc:
  6703.     define(label(50),MY_ROUTINE)
  6704.     if (gosub MY_ROUTINE) putMsg("TRUE")
  6705.     else putMsg("false")
  6706.     return  .. need a return here unless you want control to fall into
  6707.             .. the code below.
  6708.  
  6709. MY_ROUTINE  .. subroutine, just a demo
  6710.     alertUser("SUBROUTINE")
  6711.     return  .. don't need this, return happens anyway at end of command
  6712.     >
  6713.  
  6714. 2.20.7 define() and the defines command:
  6715.  
  6716. define(Object,Name) lets you use aliases for CL Objects, making your commands
  6717. more readable.  When used in a command, the define() statements must all be
  6718. at the start of the command; they are illegal following any CL function.
  6719. (See the previous example for gosub label().)  The define()s inside commands
  6720. no longer exist after the command is compiled.
  6721.  
  6722. Arguments in define(Name, Object):
  6723.     Name must be a contiguous "word" which may contain upper or lower case
  6724.     alpha characters or the "_" underscore character.
  6725.  
  6726.     Object has no restrictions.  Object continues after the comma "," until
  6727.     the closing ")" right paren is encountered.  Matching and nested parens
  6728.     are allowed inside Object, however, as are quotes, spaces, linefeeds,
  6729.     comments, CL functions and variables, and so on.
  6730.  
  6731. To create global defines, a defines key-name is provided.  Example:
  6732. <defines:
  6733.     define(S_Buf,buf54)
  6734.     define(Color,7)
  6735.     define(Message,"End of file")
  6736. >
  6737.  
  6738. Only one set of global defines can exist at any one time, and when a new
  6739. defines command is compiled, the global definitions in it replace the earlier
  6740. global ones.  The global definitions currently in memory apply when any
  6741. command is compiled.  To erase the global definitions from memory, after you
  6742. are finished compiling commands, simply compile an empty defines command:
  6743. <defines: >
  6744.  
  6745. NOTES:
  6746. 1.  The global defines are not stored in data files.  The the <defines:  ...>
  6747. command once compiled simply stores the definitions in memory and it stays
  6748. there until you quit Uedit or compile an empty <defines:> command.
  6749.  
  6750. 2.  Local defines are kept only while the command that contains them is being
  6751. compiled, then they are wiped from memory.
  6752.  
  6753. 3.  Define(), whether used or not, has no effect on the size or content of
  6754. compiled commands.
  6755.  
  6756. 4.  You can redefine a CL word like "char" and the compiler won't complain.
  6757. But it will not use the illegal redefinition.
  6758.  
  6759. 2.21 Buffer Variables
  6760.  
  6761. Uedit has 100 buffer variables, buf0 through buf99.  The lowest buffer
  6762. numbers, starting with buf0, are used for editing files and are called "file
  6763. buffers".  You may select Max Files (AC-f1) and set this number from 1 to
  6764. 100.  If MaxFiles is 20, buf0 to buf19 are file buffers and loadFile() only
  6765. lets you load in 20 files.  By pushing buffers onto the buffer stack, any
  6766. number of buffers is possible, up to the limit of memory, but buffers on the
  6767. stack cannot be accessed until they are popped back into a buffer-number slot
  6768. in the range buf0 to buf99.  (See Buffer Stack, 1.20.7.)
  6769.  
  6770. Buffers may be referenced in the CL in several ways.  Examples:
  6771.     function(buf33)
  6772.     function(buf[n22]) .. n22 must be in the range, 0 to 99.
  6773.     function(curFile)  .. current buffer in the window.
  6774.  
  6775.  
  6776. When indexing into the buffer array is used, the command is aborted if the
  6777. index is out of bounds.  For example, buf[n22] causes an abort when n22 is
  6778. not in the range 0 to 99.
  6779.  
  6780. If MaxFiles is 20, buf20 to buf99 are "work buffers".  Work buffers are used
  6781. for storing cut/paste/copy text or for any other purpose.  Functions that
  6782. insert text, such as insertRgn(), create work buffers automatically if they
  6783. do not already exist.  Functions that do not insert text, such as getFlag(),
  6784. return False when the buffer referenced in them does not exist.  Work buffers
  6785. that are created continue to exist until you quit Uedit or free them in some
  6786. command that uses freeBuf(), such as Free Buffers (A-f3).
  6787.  
  6788. 2.22 Integer Variables N0 to N99
  6789.  
  6790. There are 100 general purpose integer variables, n0 thru n99, available for
  6791. commands.  Integers may be referenced directly (n54) or by indexing into the
  6792. integer array (n[n20]).  Also there are named integer variables, such as
  6793. lineLength and cmdMultiplier, which are listed in Part 3 in the function
  6794. argument lists.  Using the number stack, any number of integers may be
  6795. stored, up to the limit of memory.  (See Buffer Stack, 1.20.7.  Also see the
  6796. CL functions push(), pop(), rollStack(), and getStackSize() in 3.4.)
  6797.  
  6798. When indexing into the number array is used, the command is aborted if the
  6799. index is out of bounds.  For example, n[n22] causes an abort when n22 is not
  6800. in the range 0 to 99.
  6801.  
  6802. Integer variables may have any 4-byte positive, zero, or negative value.  No
  6803. checking for overflow takes place in the arithmetic functions, such as mul()
  6804. and add().  Throughout Uedit, whether in using the CLI command-line flags, in
  6805. inputting numbers, or in the CL, numbers may be expressed in either decimal
  6806. or hexadecimal, with or without a minus sign.
  6807.  
  6808. Examples:
  6809.     add(n53,0xff490,n49[n54])
  6810.     sub(n40,n39,4)
  6811.     pop(cmdMultiplier)
  6812.     push(-400)
  6813.  
  6814. Commas ",", dollar signs "$", and decimal points "." are not recognized by
  6815. Uedit in numbers.  Commands which operate upon numbers in the text must look
  6816. for these special characters and handle them.  (See the arithmetic commands
  6817. in Config!M.)
  6818.  
  6819. 2.23 Local and Global Integer and Flag Variables
  6820.  
  6821. Buffers each have the following local integer variables:  LineLength
  6822. PageLines LeftMargin TopMargin BottomMargin TabTable.  Each of these has a
  6823. global counterpart with the same name:  LineLength PageLines etc.
  6824.  
  6825. When a new buffer is opened, it picks up the current global values of both
  6826. integers and flags.  (Flags are discussed below.)  A buffer's local integer
  6827. values may be changed only by a command that uses setLocal().  Global integer
  6828. variables are changed using functions such as equateNum() and add(); they are
  6829. not changed as a by-product of setting local values.  (As discussed below,
  6830. global flags are changed by setting local flags, however.)
  6831.  
  6832. Examples of setting local and global integer values:
  6833.     equateNum(lineLength,100)               .. set global lineLength to 100
  6834.     setLocal(curFile,lineLength,lineLength) .. set local to global value
  6835.     setLocal(curFile,lineLength, 90)        .. set local lineLength to 90
  6836.  
  6837. There are global integer variables which have no local counterpart.  These
  6838. are:  allBut cmdMultiplier eitherOr idleTime inputChar macroNum menuOffset
  6839. multiWhite multiWild pmEsc prefPrint singleWhite splitSize userGlobalA
  6840. userGlobalB wildCard.
  6841.  
  6842. Certain of the global integer variables have a specified range of values
  6843. which should be adhered to, but in the CL it is possible to set them out of
  6844. range.  (See Config Defaults and their CL Arguments, 2.25.)
  6845.  
  6846. Flags are variables which have only two values, True or False.  Each buffer
  6847. has the following local flags:  autoBackup autoIndent changed favorite
  6848. mapChars overstrike readOnly rightJustify trueTabs userLocalA userLocalB
  6849. wordWrap.
  6850.  
  6851. A buffer's local flags may be changed by using flipFlag() and may be checked
  6852. using getFlag().  Local flags have a global counterpart of the same name,
  6853. except for the following which are local only:  changed favorite readOnly
  6854. userLocalA userLocalB.
  6855.  
  6856. Local and global integers and flags are treated as follows:  (1) The global
  6857. integers and flags are set initially in the config defaults, when the config
  6858. defaults are compiled.  (2) When a data file is loaded in at startup or
  6859. during an edit session, the global integers and flags in the data file are
  6860. loaded in.  (3) When buffers are created, they inherit the current global
  6861. integers and flags.  (4) Changing a buffer flag with flipFlag() changes both
  6862. the local and global flag.  Changing a buffer's global integer values, such
  6863. as lineLength, using setLocal() does not change the global integer variable.
  6864.  
  6865. Examples using flags:
  6866.     flipFlag(curFile,wordWrap)   .. affects local and global flags
  6867.     flipFlag(curFile,favorite)   .. affects local flag; there is no global flag
  6868.     getFlag(curFile,readOnly)    .. tests local flag; there is no global flag
  6869.     toggle(favorite)             .. switch to next file marked "favorite"
  6870.  
  6871. The following flags are global only and have no local counterpart:  busies
  6872. columnar cram hideDisplay icons lace learnMode markGadgets printTabs rowCol
  6873. scrollType searchCaps smartTabs speakAlerts speakMsgs spooks teachKeys
  6874. trapMenus useKeys userGlobalA userGlobalB.
  6875.  
  6876. Global flag variables serve both as flag variables which may be used in
  6877. flipFlag() and as integer variables which may be used in arithmetic functions
  6878. such as equateNum() and mul().  (See list 10 in Argument Lists used in the
  6879. Command Language, 3.1.)
  6880.  
  6881. 2.24 UserGlobal Variables
  6882.  
  6883. userGlobalA and userGlobalB may be used as flags or integers.  They may be
  6884. used with arithmetic functions, such as equateNum(), and with the flag
  6885. functions, flipFlag() and getFlag().  The userGlobals are initialized in the
  6886. config defaults and may be preset to a value at runtime using the CLI
  6887. command-line flags, -A and -B.  UserGlobals have another advantage over the
  6888. n# variables, in terms of using them as flags or to store integer values, in
  6889. that they are stored on disk in the data file.  (See CLI Command Line, 2.1.)
  6890.  
  6891. When used with flipFlag(), if the userGlobal is non-zero, flipflag() sets it
  6892. to 0; if it is 0, flipFlag() sets it to 1.  Thus, if the userGlobal is being
  6893. used elsewhere as a bit-mask, flipFlag() destroys the upper bit settings
  6894. because it uses only the first bit.  GetFlag() returns True, if the
  6895. userGlobal is non-zero, or False, if it is 0.  When flipFlag() or getFlag()
  6896. is used with a global flag variable, the buffer argument in these functions
  6897. is just a dummy that is ignored.
  6898.  
  6899. 32 bit-flags in each userGlobal may be maintained, using the and() and or()
  6900. arithmetic functions.  The following example illustrates the use of flag-bits
  6901. in userGlobalA:
  6902.  
  6903.     if (not and(n54,userGlobalA,128)) alertUser("128-bit not set")
  6904.     or(userGlobalA,userGlobalA,128)                        .. set the 128-bit
  6905.     if (and(n54,userGlobalA,128)) alertUser("now 128-bit set")
  6906.  
  6907. All flag bits are set by using <-1> or <0XFFFFFFFF> in the config defaults or
  6908. using equateNum(userGlobalA,-1).  As mentioned above, userGlobals are saved
  6909. to disk when the data is saved and are loaded in when a data file is loaded
  6910. in; thus, in a custom config up to 64 global bit-flags are available, or
  6911. ranges of bits may be masked in order to store a number of numerical values.
  6912. The following routines treat userGlobalA as a bit-mask:
  6913.  
  6914. This routine checks the bit(s) indicated by n54.  The ANDed result is put
  6915. into n53, but the True/False return of runKey(virtual-b) also tells whether
  6916. the bit is set or not:
  6917.     <virtual-b:  and(n53,userGlobalA,n54) >
  6918.  
  6919. Example:
  6920.     equateNum(n54,16)
  6921.     if (runKey(virtual-b)) putMsg("16-bit of userGlobalA is ON")
  6922.  
  6923. This routine turns on the bit(s) indicated by n54.  It returns False, only if
  6924. both n54 and userGlobalA are 0:
  6925.     <virtual-1:  or(userGlobalA,userGlobalA,n54) >
  6926.  
  6927. This routine turns off the bit indicated by n54.  It returns False, if it
  6928. leaves no bits set in userGlobalA:
  6929.     <virtual-0:  sub(n53,-1,n54)    .. get bit-mask without the bit in n54
  6930.         and(userGlobalA,userGlobalA,n53) >    .. preserve all but the n54 bit
  6931.  
  6932. This routine toggles the bit indicated by n54:
  6933.     <virtual-t:  if (runKey(virtual-b)) runKey(virtual-0)    .. on, turn it off
  6934.         else runKey(virtual-1) >    .. off, turn it on
  6935.  
  6936. 2.25 Config Defaults and their CL Arguments
  6937.  
  6938. The defaults in the root segment of a config preset the values of global
  6939. integer and flag variables.  (See the Config! file.)  The globals, in turn,
  6940. pass on their values to their local counterparts in buffers, when buffers are
  6941. created, such as when a files are loaded in.  For example, in the defaults of
  6942. Config! is a setting for the global lineLength; when a file is loaded in or a
  6943. buffer is created, it will pick up this value for lineLength unless the
  6944. global lineLength has been changed during an edit session.
  6945.  
  6946. Below is a list of the config defaults and their corresponding global or
  6947. local variables.  Most of the defaults are global.  A few are local and
  6948. global.  Three of the defaults, MaxFiles, Color, and Eol, exist internally
  6949. only; that is, they cannot be used as arguments in arithmetic or flag
  6950. functions such as equateNum() or flipFlag().  Their values may be changed in
  6951. the CL using setMaxFiles() for MaxFiles, setLocal() or setColors() for Color,
  6952. and setEol() for Eol.
  6953.  
  6954. The defaults marked "G:" are global only.  Those marked "L:" are local but
  6955. most have global counterparts.  In the following, unless a range of allowed
  6956. settings is given, <0>=Off and <1>=On is used:
  6957.  
  6958.  (CL variable)   value    Description and values allowed
  6959. --------------   -------  --------------------------------
  6960. G:(internal only) <topaz> Font name.
  6961. G:(internal only) <8>     Font size.
  6962. G:(pmEsc)         <27>    Primitive Mode terminator.  ASCII value, 4-31.
  6963. G:(userGlobalA)   <0>     User global flag A.  Any integer value.
  6964. G:(userGlobalB)   <0>     User global flag B.  Any integer value.
  6965. G:(columnar)      <0>     Columnar display mode.
  6966. G:(cram)          <0>     Cram display mode.
  6967. G:(rowCol)        <1>     Show page-row-column.
  6968. G:(markGadgets)   <1>     Mark gadgets.
  6969. G:(lace)          <0>     Screen type.
  6970. G:(spooks)        <1>     Show invisibles.
  6971. G:(busies)        <0>     Show busies.
  6972. G:(teachKeys)     <0>     Teach keys mode.
  6973. G:(internal only) <35>    Maximum files to edit.  1-100.
  6974. G:(icons)         <0>     Make icons.
  6975. G:(searchCaps)    <0>     Search (or grep) case-sensitivity flag.
  6976. G:(wildcard)      <?>     Search single wildcard.      Printable character.
  6977. G:(eitherOr)      <$>     Search either-or delimiter.  Printable character.
  6978. G:(multiWild)     <*>     Search multi-wildcard.       Printable character.
  6979. G:(allBut)        <~>     Search all-but delimiter.    Printable character.
  6980. G:(singleWhite)   <0>     White at single wildcard: 0=no, 1=space/tab, 2=any white.
  6981. G:(multiWhite)    <0>     White at multi wildcard: 0=no, 1=space/tab, 2=any white.
  6982. G:(menuOffset)    <75>    Percent offset for submenus.  0-100 percent.
  6983. G:(learnMode)     <0>     RESERVED  (l)
  6984. G:(cmdMultiplier) <0>     RESERVED  (m)
  6985. G:(speakAlerts)   <0>     Speak requester alerts.
  6986. G:(speakMsgs)     <0>     Speak messages.
  6987. G:(printTabs)     <0>     If 0, convert tabs to spaces when printing.
  6988. G:(smartTabs)     <1>     If 1, don't convert tabs to spaces inside quotes.
  6989. G:(customScreen)  <0>     0=Workbench screen, 1=Custom screen.
  6990. G:(useKeys)       <0>     Use printable keys for typing, disabling commands on them.
  6991. G:(prefPrint)     <2>     Printer selection.  0=par:, 1=ser:, 2=prt:, 3=prt: (raw).
  6992. G:(idleTime)      <100>   Idle-time (tenths of seconds).  1-32767.
  6993. G:(hideDisplay)   <0>     Suppress display updates when working.
  6994. G:(scrollType)    <1>     Scroll type: 0 = show colors, 1 = faster
  6995. G:(trapMenus)     <0>     Trap menus to use menu mouse button as a key
  6996. G:(sWidth)        <640>   Screen width (640-1064)
  6997. G:(sHeight)       <200>   Screen height (200-1064) (auto-doubled for lace)
  6998. G:(tinyPriority)  <0>     Task priority when in tiny window (-128 to 127)
  6999. G:(capsLock)      <0>     RESERVED
  7000. G:(clickTime)     <0>     RESERVED
  7001. G:(userGlobalC)   <0>     User global flag C.  Any integer value.
  7002. G:(userGlobalD)   <0>     User global flag D.  Any integer value.
  7003. L:(trueTabs)      <1>     Put in tabs, not spaces, when tab key pressed.
  7004. L:(autoIndent)    <1>     Autoindent mode.
  7005. L:(overstrike)    <0>     Overstrike mode.
  7006. L:(autoBackup)    <0>     Autobackup mode.
  7007. L:(readOnly)      <0>     RESERVED  (r)
  7008. L:(wordWrap)      <1>     Wordwrap mode.
  7009. L:(rightJustify)  <0>     Rightjustify mode.
  7010. L:(mapChars)      <1>     Map illegal chars (ASCII 0-3) to table values.
  7011. L:(changed)       <0>     RESERVED  (c)
  7012. L:(userLocalA)    <0>     User local flag A.  (0-1)
  7013. L:(userLocalB)    <0>     User local flag B.  (0-1)
  7014. L:(tabTable)      <4>     Tab ruler to use.   0-4.
  7015. L:(lineLength)    <77>    Line-length.  1-9999.
  7016. G:(splitSize)     <2>     Split window size.  2 to max lines in window.
  7017. L:(leftMargin)    <0>     Left margin.    0-255.
  7018. L:(topMargin)     <5>     top margin.     0-255.
  7019. L:(bottomMargin)  <5>     bottom margin.  0-255.
  7020. L:(pageLines)     <66>    lines/page.     1-255.
  7021. G:(internal only) <10>    Eol character.  10 = Newline, 13 = Carriage Return.
  7022. L:(internal only) <3><2><0><1>  4-color combination when using 2 bitplanes.
  7023.  
  7024.  
  7025. 2.26  Comments and Literals in Commands
  7026.  
  7027. Comments may be put into commands by prefacing the comment with two dots
  7028. "..".  Anything on the same line after the two dots is taken as part of the
  7029. comment.  Example:
  7030.     putMsg("This is a test") .. this is a comment
  7031.     updateDisplay ..refreshDisplay .. is commented out
  7032.  
  7033. Putting 2 dots in front of the left angle bracket of a command or config
  7034. default value causes it to be invisible to the compiler.  Example:
  7035.     ..<normal-esc:  putMsg("The compiler won't see this command")
  7036.           alertUser("even though there are more lines like this in it") >
  7037.  
  7038. Quotes can be embedded inside quotes by using backslashes.  Example:
  7039.     putMsg("testing \"z\"")   .. displays as:  testing "z"
  7040.  
  7041. Inside quotes, a double-backslash puts in a backslash.  Example:
  7042.     putMsg("testing \\ ")     .. displays as:  testing \
  7043.  
  7044. Functions that accept integer variables also accept a literal argument
  7045. instead.  If the literal is longer than 4 bytes, only the last 4 bytes are
  7046. used in arriving at the 4-byte integer equivalent of the literal.  Examples:
  7047.     equateNum(n54,"A") .. n54 = ASCII value of "A" (65)
  7048.     mul(n54,100,"abcdef") ..n54 = 100 * (4-byte integer equal to "cdef")
  7049.  
  7050. 2.27 Compile Errors
  7051.  
  7052. When compiling a command, if an error is found Uedit does not tell you in so
  7053. many words what the error is normally.  The only error it reports verbally is
  7054. "Bad goto", which is discussed below.
  7055.  
  7056. The kinds of compile-errors that may occur are the following; in each case,
  7057. the compiler stops, the screen flashes, and the cursor is on the error spot
  7058. or just after it, depending on the type of error:
  7059.  
  7060.     Not enough memory to compile a command.
  7061.         The "Memory..." message appears.  The cursor is still at its starting
  7062.         point, because the compiler cannot find 10k of memory for the command
  7063.         buffer.  Or if it finds 10k for the buffer but cannot allocate the
  7064.         memory to copy the new command into, the cursor stops on the ending
  7065.         angle bracket ">".
  7066.  
  7067.     Command too big (more than 20k bytes) when compiled.
  7068.         It is unlikely that you will encounter this error, except as a by-
  7069.         product of a mistake in the command.  If the cursor ran beyond the
  7070.         end of the right angle bracket ">", down lower into some text after
  7071.         the command, you forgot to close a set of quotation marks.  The
  7072.         compiler thought it was reading a giant quoted argument and ran over
  7073.         the 10k size limit trying to find the close-quote mark.
  7074.  
  7075.         If the cursor stops inside the command, chances are still good that
  7076.         you have not exceeded the size limit.  But if you suspect that you
  7077.         may have, put a left angle bracket before the error spot, truncating
  7078.         the command.  If it compiles successfully, the size is reported and
  7079.         you will know whether size is a problem.  If size is not the problem,
  7080.         see the errors below.
  7081.  
  7082.     No label for goto.
  7083.         Example:  goto label(10) .. but there is no label(10) in the command.
  7084.         The message "Bad goto" is displayed.  The cursor stops at the end of
  7085.         the command on top of the ending angle bracket ">".  Search on
  7086.         "label" and find out which label() referenced in a goto has not been
  7087.         defined.
  7088.  
  7089.     Misspelled function or argument name.
  7090.         The cursor stops right after the last letter in the misspelled word.
  7091.  
  7092.     Invalid function argument.
  7093.         The cursor stops right after the invalid argument.
  7094.  
  7095.         Example:  moveCursor(curFile,hilite) .. should be sHilite or eHilite
  7096.  
  7097.     Too many function arguments
  7098.         The cursor is on the comma after the last legal argument.  The
  7099.         compiler expects to find a closing parenthesis but finds a comma, so
  7100.         it stops on the comma.
  7101.  
  7102.         Example:  moveCursor(curFile,eLine,sHilite) .. only 2 args required.
  7103.  
  7104.     Not enough function arguments
  7105.         The cursor stops on the right parenthesis, if the function has
  7106.         parentheses.  If it has no parentheses, the cursor stops on the first
  7107.         non-white character after the function name, because the compiler is
  7108.         looking for a left parenthesis and space between a function name and
  7109.         the beginning parenthesis is allowed.
  7110.  
  7111.         Example:  moveCursor(curFile) .. 2 arguments are required.
  7112.  
  7113.     Unbalanced parentheses or curly brackets
  7114.         Example:  if (eqNum(n54,n53) goto label(10)
  7115.  
  7116.         Leaving off the 2nd closing parenthesis in if()s and while()s is a
  7117.         very common mistake.  It is easy not to spot this, because extra
  7118.         whitespace is allowed.  The compiler flags this error by putting the
  7119.         cursor where the right parenthesis should be.  Instead of stopping
  7120.         just after the last word, as if it were misspelled, it stops on the
  7121.         first non-white character, which is the letter "g" in the above
  7122.         example.
  7123.  
  7124.         A missing closing curly bracket "}" is not detected by the compiler
  7125.         until it reaches the end of the command, because structures may be
  7126.         nested to arbitrary depth.  A missing-curly-bracket error may seem
  7127.         really puzzling until you learn to look out for such errors.  If the
  7128.         screen flashes, leaving the cursor on the ">" closing angle bracket
  7129.         of the command, look for unbalanced curly brackets.
  7130.  
  7131. An experienced user can debug commands rapidly, even though the compiler does
  7132. not state what the error is.  The speed of Uedit's compiler aids the learning
  7133. process and thinking logically is definitely helpful; for instance,
  7134. whitespace is allowed everywhere, and whether the cursor stops on whitespace
  7135. or on the next black character tells you whether the last word is bad or the
  7136. next character after it should be a comma or parenthesis and is not.  You can
  7137. make changes and get feedback in just a few seconds, due to the speed of the
  7138. compiler; small commands compile in less than 1 second.
  7139.  
  7140. 2.28 Runtime Errors
  7141.  
  7142. Once a command has been compiled successfully, it can be tried out.  Runtime
  7143. bugs are usually easy to figure out and fix.  But in complex commands they
  7144. may be hard to track down, until you put diagnostics into the command.
  7145. Diagnostics are messages that tell you what the command is doing as it is
  7146. running.  After typing in the diagnostics, you must recompile the command.
  7147. When finished using the diagnostics, erase them or comment them out and
  7148. compile the command one last time.
  7149.  
  7150. Diagnostics should be easy to put in, move around, and get rid of.  It may be
  7151. convenient to write a small diagnostic routine that you can call with
  7152. runKey() anywhere in the command you're debugging.  The diagnostic may use
  7153. inputString(), alertUser(), or putMsg() to display its messages.  putMsg()
  7154. may flash by too quickly to read, unless you put a delay() after it.  On the
  7155. other hand, inputString() and alertUser() both require an input before
  7156. allowing the command to continue, so no delay() is needed.
  7157.  
  7158. There are two classes of runtime bugs for which diagnostics are helpful:
  7159.  
  7160. 1.  If there are many goto's and nested curly brackets and you aren't sure
  7161. where the action is, plant messages at key locations to find out which
  7162. section is currently running and to discover which parts are never accessed.
  7163. The diagnostic needs to tell you its location and it should require a
  7164. response so that it does not flash by too quickly to see. Example:
  7165. alertUser("label(10)") or alertUser(10)
  7166.  
  7167. 2.  If a command is mishandling a buffer's contents, you can use
  7168. inputString() at key spots to monitor the buffer's contents.  It waits until
  7169. you click the mouse button or press ESC.  It even lets you modify the buffer.
  7170. Example:  inputString(buf54)
  7171.  
  7172. You can monitor a suspected number variable in the same way that you would a
  7173. buffer variable.  Example: alertUser(n49) or putMsg(n49)
  7174.  
  7175. Runtime bugs seem obvious once you figure out what the problem is.  But
  7176. large, complex commands may be hard to debug, unless you trace through them
  7177. using diagnostics.  Form the habit of using diagnostics, when large commands
  7178. are not doing right and you cannot immediately see why.  The answer is always
  7179. simple and obvious ... once you find it.
  7180.  
  7181. But, better yet, form the habit of not writing huge, spaghetti-code commands.
  7182. If a command is hard to debug, break it into small, clear modules.  If it is
  7183. too confusing even to break up cleanly, rewrite it from scratch using crisp
  7184. modular routines.  For routines that should not be run directly by giving an
  7185. input, but rather should only be run by commands using them, use the "unused"
  7186. slots in the table of MacroNums or use the virtual key-prefix.
  7187.  
  7188. 2.29 Valid Key Arguments
  7189.  
  7190. Commands in Uedit are assigned to "keys".  A "key" is an input with the
  7191. keyboard or mouse.  Menu selections run existing keys, so they are not
  7192. considered to be keys themselves.  The window CloseBox and message-line
  7193. gadgets are "keys".  Pressing the left mouse button is a "key"; releasing it
  7194. is a "key".  Actually any number from 1 to 1199 may be used as a "key" in the
  7195. CL.  Some of the numbers in this range do not correspond to keyboard or mouse
  7196. button inputs and cannot be expressed using a key-name such as shftAlt-f1 or
  7197. ctl-CloseBox; these are "unused" slots in the table of MacroNums; but
  7198. commands may still be assigned to them and may be run as routines by using
  7199. runKey() even though they cannot be run directly by giving an input.  (See
  7200. Keys and MacroNums, 2.31.)
  7201.  
  7202. The only "dedicated" key in Uedit in normal operation is (left or right)
  7203. Amiga-ESC, the general-purpose Abort key.  But even those may be assigned
  7204. commands.  The commands cannot be run by inputting left or right Amiga-ESC,
  7205. but they may be run as routines by other commands or by menus.
  7206.  
  7207. A "key argument" is a key used in the command language.  In the function
  7208. argument lists in Part 3, wherever "keyArg" appears in a list, a key argument
  7209. may be used.  Key arguments are integer constants and cannot be modified by a
  7210. command.  Example:
  7211.     <lAmiga-h: equateNum(n54,ctl-x) putMsg(ctl-x)>
  7212.  
  7213. In the above example, lAmiga-h is the key for which the command is defined.
  7214. The value of key argument ctl-x is stored in the integer variable n54 by
  7215. equateNum() and is also displayed by putMsg().
  7216.  
  7217. The compiler converts key arguments into their MacroNums, integers which
  7218. identify commands in Uedit.  At runtime, equateNum(n54,ctl-x) stores the
  7219. MacroNum of ctl-x in variable n54.  (You may compile a command with
  7220. equateNum(ctl-x,99) in it, but nothing useful happens at runtime.  Similarly,
  7221. you may compile equateNum(3,99), but again nothing useful happens as a
  7222. result.)
  7223.  
  7224. All key arguments, except Startup, Idle, and PreKey, require a modifier or
  7225. prefix, such as "normal-" or "shftAlt-".  The "virtual-" prefix means that
  7226. the key cannot be input with the keyboard or mouse.  Virtual commands are
  7227. useful as routines run by menus or by other key commands using runKey().  By
  7228. using the "virtual-" prefix on all keys that may be run by other keys in your
  7229. custom config, or by always using "unused" MacroNum-slots for them, you are
  7230. making it possible to swap any key in your custom config using Swap Keys
  7231. without running the risk of swapping away a key that is run by some other
  7232. key.  Also virtual routines offer a degree of safety in that they cannot be
  7233. run directly by giving an input.
  7234.  
  7235. The prefixes (modifiers) used in key arguments are:
  7236. normal-     shft-       alt-        ctl-       shftAlt-    shftCtl-    altCtl-
  7237. shftAltCtl- lAmiga-     rAmiga-     virtual-
  7238.  
  7239. In key arguments, the prefix or modifier is followed by a printable key, such
  7240. as "z" and "." or by a non-printable key such as a "f1" or "esc".
  7241.  
  7242. The non-printable keys are:
  7243.          esc tab f1 f2 f3 f4 f5 f6 f7 f8 f9 f10
  7244.          del bs (for backspace) help return space
  7245.          upArrow downArrow leftArrow rightArrow
  7246.          kpMinus kpEnter kpDot                  ("kp" is for "keypad")
  7247.          kp1 kp2 kp3 kp4 kp5 kp6 kp7 kp8 kp9 kp0
  7248.          kpLParen kpRParen kpSlash kpStar kpPlus  (Amiga 2000/3000)
  7249.          buttonDown buttonUp                    (Left mouse button.)
  7250.          menuDown menuUp                        (Right mouse button.  Can only
  7251.                                                 be input if trapMenus is True.)
  7252.          closeBox                               (Close-box in Title Bar.)
  7253.          gadget1 gadget2 gadget3 gadget4        (Gadgets in the message line.)
  7254.  
  7255. Examples of valid key arguments are:
  7256.          shftAlt-f1:
  7257.          altCtl-upArrow:
  7258.          ctl-/:
  7259.          alt-kpDot:         ("kp" refers to keypad.)
  7260.          normal-buttonDown: (Left mouse button.)
  7261.          shft-closeBox:     (Close-box in Title Bar.)
  7262.          ctl-gadget3:       (Each "gadget" is 1/4 of the message line.)
  7263.          shft-7:            (The "7" is not the one on the keypad.  That one
  7264.                              would be "shft-kp7".)
  7265.          startup:           (Startup is not allowed a prefix.)
  7266.          idle:              (Idle is not allowed a prefix.)
  7267.          altCtl-esc:
  7268.          normal-del:
  7269.          lAmiga-p:
  7270.          0X400:            (a raw MacroNum in the range 1 to 1199 is valid)
  7271.          800:
  7272.          normal-z:         ("z" is a printable key, but that's ok.)
  7273.  
  7274. Examples of invalid key arguments are:
  7275.          normal-$:     (Use UNSHIFTED.  It should be shft-4:.)
  7276.          shft-preKey:  (PreKey cannot use a prefix.)
  7277.  
  7278. Certain Amiga-key combinations are not sent to Uedit properly or at all by
  7279. the Amiga.  For safety, some of them are internally mapped to Amiga-ESC, the
  7280. abort key.  These keys cannot be run from the keyboard, but they may be
  7281. assigned to commands that are used as routines.  Do not use the following
  7282. keys for commands to be run from the keyboard:
  7283.     lAmiga- & rAmiga- with ESC upArrow downArrow leftArrow rightArrow
  7284.     lAmiga-           with n m ESC
  7285.     rAmiga-           with ' ; , / tab bs = 6 7 9 ESC kp2 kp6 kp9
  7286.  
  7287. You may still create commands for the keys, kpLParen, kpRParen, kpSlash,
  7288. kpStar, and kpPlus, and use them as routines, even if your Amiga keyboard
  7289. does not have those keys.  Their commands can be used as routines which are
  7290. run by other commands or can be invoked directly from the menus.
  7291.  
  7292. The compiler converts each key argument into a MacroNum between 1 and 1199.
  7293. Anywhere in the CL that a key argument is allowed, a raw number from 1 to
  7294. 1199 may be used instead.  (See Keys and MacroNums, 2.31.)
  7295.  
  7296. 2.30 InputChar and MacroNum
  7297.  
  7298. InputChar and MacroNum are integer variables which have the most recent input
  7299. in them.  InputChar contains the most recent character picked up by the input
  7300. stage.  MacroNum has the most recent macro number from the input stage.  Any
  7301. input that you give, whether by keyboard or mouse, assigns values to both
  7302. InputChar and MacroNum.  (See Keys and MacroNums, 2.31.)
  7303.  
  7304. If the input is not a printable ASCII character, InputChar is 0.  MacroNum is
  7305. never 0.  When a command exists for MacroNum, InputChar is set to 0 by the
  7306. input stage (except in Primitive Mode).  Uedit's work-loop calls the typing
  7307. routine, if InputChar is non-zero.  If InputChar is 0, it calls the engine
  7308. that runs commands, if a command exists for MacroNum.  Thus, whether or not
  7309. inputChar is 0 determines whether the command for MacroNum gets run or not,
  7310. assuming that MacroNum has a command.
  7311.  
  7312. In a PreKey command, you can capture InputChar and MacroNum before Uedit's
  7313. work-loop sees them.  Thus, you can control the work-loop using PreKey.  In
  7314. all other commands except PreKey, it doesn't matter what you do with
  7315. InputChar and MacroNum; by the time any other command sees them, the work-
  7316. loop has acted upon them.  Changing their value anywhere except in PreKey has
  7317. no effect on the work-loop.  (See PreKey, 2.32.)
  7318.  
  7319. Commands can tell what input was given by looking at InputChar & MacroNum.  A
  7320. routine called by a command can tell who the caller is, because the caller's
  7321. macro number is in MacroNum.  A caller can influence or instruct the routines
  7322. it calls by manipulating the value of MacroNum and InputChar.
  7323.  
  7324. InputChar and MacroNum, along with PreKey, give a lot of front-end control
  7325. and flexibility.  You can emulate a 2-key editor by creating a PreKey command
  7326. that requests a second input based on the first input.  You can emulate
  7327. Insert and Command modes of operation like some editors use, by zeroing
  7328. InputChar selectively in a PreKey command.
  7329.  
  7330. In Primitive Mode, MacroNum is always set to zero by the input stage and if a
  7331. preKey command exists, it is not run during Primitive Mode.  Only inputChar
  7332. is processed in Primitive Mode.  (See Primitive Mode, 1.7.)
  7333.  
  7334. When Use Keys (A-u) in the menu is checkmarked, printable keys with commands
  7335. become typable letters again.  The input stage no longer zeroes inputChar
  7336. when they are typed, which causes the work-loop to act on inputChar rather
  7337. than acting on their MacroNum.  (See Global Modes, 1.19.)
  7338.  
  7339. The following PreKey command reports the values of InputChar and MacroNum
  7340. when you give any input.  Typing SAC-ESC kills this PreKey, causing an abort.
  7341. This preKey sets InputChar and MacroNum to 0, so that the input is ignored by
  7342. the work-loop:
  7343.  
  7344. <PreKey:  if (eqNum(MacroNum,shftAltCtl-ESC)) killKey(preKey) .. escape hatch!
  7345.           freeBuf(buf54)
  7346.           insertRgn(buf54,eFile,"MacroNum = ",all)
  7347.           toWord(buf54,MacroNum)
  7348.           insertRgn(buf54,eFile,",  InputChar = ",all)
  7349.           toWord(buf54,InputChar)
  7350.           if (inUse(MacroNum)) insertRgn(buf54,eFile,"  CMD KEY",all)
  7351.           putMsg(buf54)
  7352.           equateNum(InputChar,0)
  7353.           equateNum(MacroNum,0) >
  7354.  
  7355. When you experiment with the above command, note that InputChar is always 0
  7356. when the input has got a command.  And MacroNum is never zero.  The work-loop
  7357. looks first at InputChar; if non-zero, it types in the character.  If
  7358. InputChar is zero, it looks at MacroNum; if it has a command, the command is
  7359. run.
  7360.  
  7361. To see how the global useKeys flag works, compile a command for a printable
  7362. key such as the following:
  7363.     <shft-a:  putMsg("Shift-a command") >.
  7364.  
  7365. Then compile the PreKey command above.  Notice that when you type shft-a,
  7366. InputChar is 0, because now shft-a has a command.  Now kill PreKey by
  7367. pressing SAC-ESC.  Select Use Keys (A-u) to turn On the useKeys flag.
  7368. Compile PreKey again and try shft-a.  This time InputChar is 65 (not 0),
  7369. because useKeys is causing the input stage not to zero inputChar; as a
  7370. result, Uedit's work-loop would process inputChar instead of MacroNum for all
  7371. printable keys, bypassing their commands.
  7372.  
  7373. To make Uedit do nothing with an input, set InputChar and MacroNum to 0 in
  7374. PreKey.  To make it run the command for MacroNum instead of typing the
  7375. character in InputChar, set InputChar to 0.  To force all printable
  7376. characters to show up in InputChar, turn On Use Keys; then your PreKey can
  7377. decide what to do.  You can use inUse(MacroNum) in a PreKey command, to
  7378. determine whether MacroNum has a command or not.
  7379.  
  7380. To detect CAPSLOCK, do the following in a preKey command:  When a capital
  7381. letter A-Z is in InputChar (ASCII 65-90), examine MacroNum.  If MacroNum is
  7382. less than 104, this is an unshifted macro number, so the Shift key was not
  7383. used; therefore CAPSLOCK must be On.  (See Keys and MacroNums, 2.31.)  The
  7384. following example reports when CAPSLOCK is On, if you type a letter from A to
  7385. Z:
  7386.  
  7387.     if (geNum(InputChar,"A")
  7388.            & geNum("Z",InputChar)
  7389.              & geNum(104,MacroNum)) putMsg("CAPSLOCK is turned ON")
  7390.  
  7391. CL functions that collect an input change the value of InputChar and
  7392. MacroNum, so that the old values are no longer available.  These functions
  7393. are:
  7394.         getKeyVal(), getKey(), and getChar().
  7395.         inputKey(), if it finds an input waiting, returning TRUE.
  7396.         askYesNo() and alertUser(), requesters.
  7397.         setRuler().
  7398.         inputString() and inputNum(), the Primitive Mode functions.
  7399.  
  7400. If you need InputChar and MacroNum preserved when using any of the above
  7401. functions, store them in number variables beforehand or push them onto the
  7402. number stack.  The fact that these functions change the value of InputChar
  7403. and MacroNum may be useful; the most recent input given to the above
  7404. functions is in InputChar and MacroNum, and commands may look at these and
  7405. learn something about what happened earlier.
  7406.  
  7407. The getKeyVal(), getKey(), and getChar() CL functions report the true ASCII
  7408. character value and/or macro number of an input, regardless of whether the
  7409. macro number has a command or not.  With these functions, the input character
  7410. is always non-zero when it is a printable character, even if MacroNum has a
  7411. command and regardless of the status of useKeys.  (See these CL functions in
  7412. 3.4.)
  7413.  
  7414. 2.31 Keys and MacroNums
  7415.  
  7416. Each key argument maps into a unique positive MacroNum in the range 1 to
  7417. 1199.  When a command is compiled, the compiler converts key arguments to
  7418. their MacroNums.  Anywhere in a command that a key argument may be used, a
  7419. decimal or hexadecimal number from 1 to 1199 may be used instead.
  7420.  
  7421. There are 104 unmodified MacroNum values, corresponding to all unshifted
  7422. inputs as well as a number of "unused" slots which are discussed below.
  7423. These include all keys on the keyboard, the mouse buttons, CloseBox, and
  7424. message-line gadget inputs.  There are 11 shift-modifier combinations for
  7425. each key, including the "virtual-" modifier which cannot be input directly.
  7426.  
  7427. If a shift-modifier is used, a multiple of 104 is added to the basic MacroNum
  7428. to get the shift-modified MacroNum.  Using all shift-modifiers, there are
  7429. 1144 MacroNum values.  The special MacroNums, which do not use shift
  7430. modifiers, are:
  7431.         rexxMacro     1145
  7432.         idleMacro     1146
  7433.         preKeyMacro  1147
  7434.         startupMacro 1148
  7435.         onAbort      1149
  7436.         onTitle      1150
  7437.  
  7438. The macroNums 1151-1199 are "unused" and available for any purpose.
  7439.  
  7440. If a MacroNum has an unmodified value (less than 104), you can get its "shft-
  7441. " value by adding 104.  If it has a shift-modified value, you can get its
  7442. unshifted value by using mod(MacroNum,MacroNum,104).
  7443.  
  7444. MacroNums are calculated using the tables below, by adding the basic MacroNum
  7445. to the appropriate shift-constant.  The formula is:
  7446.     MacroNum  = basic MacroNum (Table 2) + shift-constant (Table 1)
  7447.  
  7448.     Example:  shftAlt-z = z (Table 2 value=49) + shftAlt (Table 1 value=312) = 361
  7449.  
  7450. Table 1.  ADDITIVE CONSTANTS FOR SHIFT-MODIFIERS
  7451.          Shift-keys  Multiply 104 by  ==>  Add this to get shifted MacroNum
  7452.          ----------  --------------        --------------------------------
  7453.          Normal          0                 0
  7454.          Shft            1                 104
  7455.          Alt             2                 208
  7456.          ShftAlt         3                 312
  7457.          Ctl             4                 416
  7458.          ShftCtl         5                 520
  7459.          AltCtl          6                 624
  7460.          ShftAltCtl      7                 728
  7461.          lAmiga          8                 832
  7462.          rAmiga          9                 936
  7463.          Virtual         10                1040
  7464.  
  7465. Table 2.  UNSHIFTED (BASIC) MACRONUMS
  7466.       Key     MacroNum    Key       MacroNum    Key      MacroNum
  7467.       ---     --------    ---       --------    ---      --------
  7468.       1           1        f           35       ESC         69
  7469.       2           2        g           36       DEL         70
  7470.       3           3        h           37       menuDown    71
  7471.       4           4        j           38       menuUp      72
  7472.       5           5        k           39       middleDown  73
  7473.       6           6        l           40       KpMinus     74
  7474.       7           7        ;           41       middleUp    75
  7475.       8           8        '           42       upArrow     76
  7476.       9           9        unused      43       downArrow   77
  7477.       0           10       unused      44       rightArrow  78
  7478.       -           11       Kp4         45       leftArrow   79
  7479.       =           12       Kp5         46       f1          80
  7480.       \           13       Kp6         47       f2          81
  7481.       unused      14       unused      48       f3          82
  7482.       kp0         15       z           49       f4          83
  7483.       q           16       x           50       f5          84
  7484.       w           17       c           51       f6          85
  7485.       e           18       v           52       f7          86
  7486.       r           19       b           53       f8          87
  7487.       t           20       n           54       f9          88
  7488.       y           21       m           55       f10         89
  7489.       u           22       ,           56       KpLParen    90
  7490.       i           23       .           57       KpRParen    91
  7491.       o           24       /           58       KpSlash     92
  7492.       p           25       unused      59       KpStar      93
  7493.       [           26       KpDot       60       KpPlus      94
  7494.       ]           27       Kp7         61       HELP        95
  7495.       unused      28       Kp8         62       buttonDown  96
  7496.       Kp1         29       Kp9         63       buttonUp    97
  7497.       Kp2         30       SPACE       64       gadget1     98
  7498.       Kp3         31       BS          65       gadget2     99
  7499.       a           32       TAB         66       gadget3     100
  7500.       s           33       KpEnter     67       gadget4     101
  7501.       d           34       RETURN      68       closeBox    102
  7502.  
  7503. Some of the "unused" MacroNums in the table above correspond to keys on
  7504. European keyboards.  128 of the lower and upper case keys can be remapped
  7505. using the printable key mapping arrays in the config defaults.  For example,
  7506. they can be mapped to European umlaut characters.  Mapping for Dvorak is also
  7507. possible, and a Dvorak mapping is available.  (See Mapping the Keyboard Keys,
  7508. 2.10.)
  7509.  
  7510. Commands can be created for unused MacroNums, even though they have no key
  7511. name.  The MacroNum is used in place of the key name.  The following example
  7512. uses "unused" MacroNums:
  7513.         <43:  putMsg("this is a test") runKey(44) swapKey(148,14) >
  7514.  
  7515. Unused MacroNums are useful for routines that should not be run from the
  7516. keyboard but may be run as a routine by commands or menus.  To use a shift-
  7517. modified "unused" MacroNum, add a multiple of 104 to it.  Example:
  7518.         swapKey(normal-esc,148)   .. where 148 = 104 + 44
  7519.  
  7520. 2.32 PreKey
  7521.  
  7522. PreKey, like Startup and Idle, cannot use shift-modifiers.  A PreKey command,
  7523. if one exists, is run after any input that you give, but before the input is
  7524. seen and processed by Uedit's work-loop.  PreKey is well suited for use in a
  7525. config that emulates a 2-key editor or one that uses Insert and Command modes
  7526. of operation.  PreKey is also useful in such applications as a spell-as-you-
  7527. type feature.
  7528.  
  7529. Here is an example of a PreKey command:
  7530. <PreKey:
  7531.     if (eqNum(MacroNum,shftAltCtl-esc)) killKey(PreKey)     .. Escape Hatch!
  7532.     freeBuf(buf54)
  7533.     insertRgn(buf54,efile,"InputChar = ",all)
  7534.     toWord(buf54,InputChar)
  7535.     insertRgn(buf54,efile," MacroNum = ",all)
  7536.     toWord(buf54,MacroNum)
  7537.     putMsg(buf54)      .. show the InputChar and MacroNum of the key typed.
  7538.         .. The following changes any printable InputChar to "a".
  7539.         .. Use shftAltCtl-ESC to kill PreKey and get out of this trap!
  7540.     if (gtNum(InputChar,0)) equateNum(InputChar,"a")
  7541.        .. This changes any MacroNum to F1, trapping you again!
  7542.     equateNum(MacroNum,normal-f1)
  7543. >
  7544.  
  7545. Because you can change InputChar & MacroNum in PreKey before the work-loop
  7546. sees them, you can lock up Uedit so that nothing short of rebooting can get
  7547. you out of it.  Aborting with Amiga-ESC does no good, because it does not
  7548. erase the PreKey command, and long as PreKey exists, it will run when any
  7549. input is given.  Always include an Escape Hatch line as in the above example.
  7550. Pressing SAC-Esc kills PreKey, unlocking Uedit.  Do not remove the escape
  7551. hatch until the PreKey command is thoroughly debugged and safe.
  7552.  
  7553. After PreKey runs, the work-loop validates InputChar and MacroNum.  A valid
  7554. InputChar has ASCII value 0 to 255.  If out of range, it is set to 0.  If
  7555. InputChar is 1 to 3 after PreKey, either it is mapped to a legal value, if
  7556. Map Illegals (SA-m) is turned On, or else nothing is typed in.  MacroNum must
  7557. have a value in the range 1 to 1199.  If out of range, it is set to 0 and
  7558. nothing is done.  (See Map Illegals, 1.31.9.  See Keys and MacroNums, 2.31.)
  7559.  
  7560. In using PreKey, there are two negatives to consider:  A PreKey command adds
  7561. extremely high overhead in running learned sequences.  Also there is the
  7562. possibility that a poorly designed PreKey may lock up Uedit, forcing you to
  7563. reboot and lose edits that have not been saved to disk.
  7564.  
  7565. When you set the Command Multiplier (C-m) and press a key such as Cursor Word
  7566. Left (kp4), PreKey (if it exists) is run only once, just before the multiple
  7567. executions of Cursor Word Left.  But when running learned sequences, PreKey
  7568. is run before each learned input is processed; this is because learned
  7569. sequences must behave as if the inputs were being freshly typed in.  There is
  7570. extreme overhead in running learned sequences when a PreKey exists.  To
  7571. minimize overhead, PreKey should be designed so that it returns as quickly as
  7572. possible.  It should be swapped to an unused key, when it is not needed.
  7573.  
  7574. 2.33 Spell-Checking with PreKey
  7575.  
  7576. A spell-as-you-type feature can be implemented using PreKey.  The following
  7577. command swaps any existing PreKey command with virtual-c:
  7578.  
  7579.         <shftAltCtl-c: swapKey(virtual-c,PreKey) >
  7580.  
  7581. The following virtual-c command, when swapped to PreKey by pressing SAC-c,
  7582. checks spelling as you type:
  7583.  
  7584. <virtual-c:
  7585.         if (eqNum(InputChar,0)) return      .. don't mess up scrolling etc
  7586.         if (not spellerUp) return
  7587.         equateLoc(curFile,locA,atCursor)    .. save cursor loc
  7588.         moveCursor(curFile,sChar)           .. look at last char typed
  7589.         if (!is(curFile,alpha)              .. if not alpha, check preceding word
  7590.             & !is(curFile,"'")) {           .. apostrophe is alpha here
  7591.             clearRgn(buf54,all)             .. erase last word from buffer
  7592.             moveCursor(curFile,sWord)       .. move cursor to start of word to chk
  7593.             insertRgn(buf54,sFile,curfile,word) .. store just that 1 word
  7594.             moveCursor(buf54,sFile)         .. so speller sees the word
  7595.             if (not spell(" ",buf54)) { beepDisplay  putMsg(buf54) } .. bad
  7596.         }
  7597.         equateLoc(curFile,atCursor,locA)     .. put cursor back where it was
  7598. >
  7599.  
  7600. This PreKey alerts you when the word preceding the cursor is not in the
  7601. dictionary.  With the full working dictionary in memory, spell-checking keeps
  7602. up with fairly fast typing.  You can swap in and out the above PreKey as
  7603. needed by pressing SAC-c.  When swapped back out, it restores the original
  7604. PreKey command, if there was one.
  7605.  
  7606. The above PreKey could have been written to look at InputChar instead of
  7607. moving the cursor backward to look at the last character typed.  Perhaps this
  7608. would have been a better choice.  It would spell-check the previous word,
  7609. only if InputChar were not an alpha character or apostrophe.
  7610.  
  7611. 2.34 Detaching Buffers
  7612.  
  7613. The CL functions getBufAddr(), detachBuf(), and attachBuf() make it possible
  7614. to pass Uedit buffers to or receive Uedit buffers from other programs.  These
  7615. functions are "dangerous" and should only be used by experienced programmers.
  7616. The following is the essentials needed in order to write programs that use
  7617. Uedit buffers:
  7618.  
  7619. Flag bits used in buffer CB header flags field:
  7620. #define  TRUETABS      0x0001
  7621. #define  AUTOINDENT    0x0002
  7622. #define  OVERSTRIKE    0x0004
  7623. #define  AUTOBACKUP    0x0008
  7624. #define  READONLY      0x0010
  7625. #define  WORDWRAP      0x0020
  7626. #define  RIGHTJUSTIFY  0x0040
  7627. #define  MAPCHARS      0x0080  /* for mapping of illegal characters */
  7628. #define  CHANGED       0x0100  /* when buffer has been modified */
  7629. #define  USERLOCALA    0x0200
  7630. #define  USERLOCALB    0x0400
  7631. #define  FAVORITE      0x0800
  7632. #define  BACKEDUP      0x1000  /* when autobackup, after backup created */
  7633. #define  NEEDPACK      0x2000  /* when buffer is fragmented */
  7634. #define  LOCKED        0x4000  /* when in file-save queue */
  7635. #define  DELETEIT      0x8000  /* when in file-save queue & freeBuf() called */
  7636.  
  7637. Markers used in buffer blocks:
  7638. #define  EOFILE   0x03  /* only ONE eof marker in each buffer */
  7639. #define  EOB      0x02  /* used only in the endOfBlock field of DB struct */
  7640. #define  TRACE    0x01  /* used temporarily when moving data */
  7641.  
  7642. Used in tests, when text is manipulated:
  7643. #define  ISMARKER(a)   (a<=EOFILE && a>0)
  7644. #define  ISWEIRD(a)    (a<=EOFILE)
  7645. #define  ISGOOD(a)     (a>EOFILE)
  7646. #define  ISPRINT(a)    (a>=' ')
  7647.  
  7648. Used in comparing locations, where a = blockptr and b = byteptr:
  7649. #define  loc(a,b)    (((ULONG)(a)->BlockNum << 16L) + (ULONG)b - (ULONG)a )
  7650.  
  7651. Data block structure used in block chains:
  7652. #define  BLOCKSIZE   256
  7653. #define  DATASIZE    (BLOCKSIZE - 12)
  7654. struct DB   {                   /* a buffer text block */
  7655.    UCHAR        Data[DATASIZE];
  7656.    UCHAR        endOfBlock;     /* EOB marker is always stored here */
  7657.    UCHAR        eols;           /* set to 255 when eols not counted */
  7658.    USHORT       BlockNum;
  7659.    struct DB    *LastBlock;
  7660.    struct DB    *NextBlock;
  7661. };
  7662.  
  7663. Buffer header structure:
  7664. struct CB {
  7665.    struct DB  *Block;    /* cursor block ptr */
  7666.    struct DB  *SHBlock;  /* sHilite block ptr */
  7667.    struct DB  *EHBlock;  /* eHilite block ptr */
  7668.    struct DB  *SIBlock;  /* sInvert block ptr */
  7669.    struct DB  *EIBlock;  /* eInvert block ptr */
  7670.    struct DB  *PBlock;   /* sPage block ptr */
  7671.    struct DB  *EBlock;   /* ePage block ptr */
  7672.    struct DB  *LABlock;  /* locA block ptr */
  7673.    struct DB  *LBBlock;  /* locB block ptr */
  7674.    struct DB  *LBBlock;  /* locB block ptr */
  7675.    struct DB  *LCBlock;  /* locC block ptr */
  7676.    struct DB  *LDBlock;  /* locD block ptr */
  7677.    struct DB  *LEBlock;  /* locE block ptr */
  7678.    struct DB  *LFBlock;  /* locF block ptr */
  7679.    struct DB  *LGBlock;  /* locG block ptr */
  7680.    struct DB  *LHBlock;  /* locH block ptr */
  7681.    struct DB  *LIBlock;  /* locI block ptr */
  7682.    struct DB  *LJBlock;  /* locJ block ptr */
  7683.    struct DB  *LSPBlock;  /* locSP block ptr */
  7684.    struct DB  *LSCBlock;  /* locSC block ptr */
  7685.    struct DB  *MBlock;   /* mouseLoc block ptr */
  7686.    UCHAR *Ptr;           /* cursor byte pointer */
  7687.    UCHAR *SHPtr;         /* sHilite byte pointer */
  7688.    UCHAR *EHPtr;         /* eHilite byte pointer */
  7689.    UCHAR *SIPtr;         /* sInvert byte pointer */
  7690.    UCHAR *EIPtr;         /* eInvert byte pointer */
  7691.    UCHAR *PPtr;          /* sPage byte pointer */
  7692.    UCHAR *EPtr;          /* ePage byte pointer */
  7693.    UCHAR *LAPtr;         /* locA byte pointer */
  7694.    UCHAR *LBPtr;         /* locB byte pointer */
  7695.    UCHAR *LCPtr;         /* locC byte pointer */
  7696.    UCHAR *LDPtr;         /* locD byte pointer */
  7697.    UCHAR *LEPtr;         /* locE byte pointer */
  7698.    UCHAR *LFPtr;         /* locF byte pointer */
  7699.    UCHAR *LGPtr;         /* locG byte pointer */
  7700.    UCHAR *LHPtr;         /* locH byte pointer */
  7701.    UCHAR *LIPtr;         /* locI byte pointer */
  7702.    UCHAR *LJPtr;         /* locJ byte pointer */
  7703.    UCHAR *LSPPtr;        /* locSP byte pointer */
  7704.    UCHAR *LSCPtr;        /* locSC byte pointer */
  7705.    UCHAR *MPtr;          /* mouseLoc byte pointer */
  7706.    struct DB *NextBlock; /* points to First Block in DB chain */
  7707.    short  PageCol;       /* col where window display begins, usually 0 */
  7708.    short  BufNum;        /* buffer number, 0 to 99 */
  7709.    ULONG  Flags;         /* buffer flags, see flags above */
  7710.    USHORT LineLength;    /* line length being used */
  7711.    USHORT PageLines;     /* lines per page being used */
  7712.    short  tabTable;      /* must be 0 to 4 */
  7713.    short  LeftMargin;    /* must be 0 to 255 */
  7714.    short  TopMargin;     /* must be 0 to 255 */
  7715.    short  BottomMargin;  /* must be 0 to 255 */
  7716.    ULONG  colors;        /* 32 bit color mask, 2 bits per color */
  7717.    long   reserved1;
  7718.    long   reserved2;
  7719.    UCHAR  FileName[83];
  7720. };
  7721.  
  7722. DetachBuf() must NEVER be called, UNLESS you have first called getBufAddr()
  7723. and stored the buffer's address in an integer variable!  Having detached a
  7724. buffer, you can pass its address to another program.  Do NOT pass the address
  7725. of buffers, unless you have detached them from Uedit beforehand.  Here are
  7726. some guidelines to follow in using Uedit buffers in other programs:
  7727.  
  7728. (1) All block pointers in the CB header structure must point to blocks in the
  7729. buffer's block chain.  None may be null, and none may point beyond the block
  7730. that has the EOFILE marker in it.
  7731.  
  7732. (2) All byte pointers in CB buffer header structs must point to valid, non-
  7733. null text in the SAME block that their corresponding block pointer points to.
  7734. They must never point to a null byte.  They must never point outside the
  7735. Data[] array in buffer blocks.  They must never point to the EOB (endOfBlock)
  7736. field of the block.  They may point only to valid ASCII characters 4-255 or
  7737. to the EOFILE marker inside block Data[] arrays.
  7738.  
  7739. (3) In DB Data[] arrays, the only characters allowed are nulls (0) to replace
  7740. cleared text, valid ASCII characters 4-255, and one EOFILE marker.
  7741.  
  7742. (4) When packing or splitting buffer blocks, it is faster if TRACE characters
  7743. are embedded at the address of each CB byte-pointer, temporarily replacing
  7744. the text bytes stored there.  Then data can be moved quickly and the CB
  7745. pointers need only be adjusted when a TRACE is tripped over.  When the
  7746. operation is over, swap back in the characters that were replaced by TRACEs
  7747. earlier.
  7748.  
  7749. (5) The last block in a buffer chain must have a NULL NextBlock pointer.
  7750.  
  7751. (6) The first block in a buffer chain must point to the CB buffer header
  7752. structure.  The CB NextBlock field must point to the first block in the
  7753. chain.  Buffers must always have at least one data block, even if it only
  7754. contains the EOFILE marker in Data[0].  (In this case, ALL CB block and byte
  7755. pointers must be pointing to EOFILE at Data[0].)
  7756.  
  7757. (7) Each block's endOfBlock field must have an EOB character in it.  Testing
  7758. for EOB is easier than indexing into the Data[] array.
  7759.  
  7760. (8) The eols field in each block must be set to 255, if you modify the block
  7761. and are not counting the eols in it.  If the block contains a formfeed (ASCII
  7762. 12), the eols field must be set to 255.
  7763.  
  7764. (9) After the EOFILE marker, there must be nothing but null bytes in the
  7765. Data[] arrays.  Preferably there should be no blocks beyond EOFILE's block.
  7766. If there are any empty blocks beyond EOFILE's block, the NEEDPACK bit in the
  7767. buffer's flag must be set.
  7768.  
  7769. (10) If a data block is modified, the CB structure flag field MUST have the
  7770. NEEDPACK bit set.  Also you may set the CHANGED bit.  Do NOT set the LOCKED
  7771. or DELETEIT flag bits.
  7772.  
  7773. Unless serious need exists and you are an experienced programmer, it is
  7774. strongly recommended that the functions discussed here not be used.  The
  7775. author accepts no liability for damage done by programs manipulating Uedit
  7776. buffers or by Uedit when you pass buffers to it that have been touched by
  7777. other programs.
  7778.  
  7779. Part 3. :::
  7780.  
  7781. Part 3.  Command Language Documentation
  7782.  
  7783. 3.1  Argument Lists used in the Command Language
  7784.  
  7785. Uedit's CL functions use the following 15 argument lists:
  7786.  
  7787. LIST 0:   buf# curFile literal
  7788.  
  7789. LIST 1:   literal
  7790.  
  7791. LIST 2:   buf# curFile
  7792.  
  7793. LIST 3:   bottomMargin color lace leftMargin lineLength pageLines tabTable
  7794.           topMargin
  7795.  
  7796. LIST 4:   downLine eChar eFile eForm eHilite eInvert eLine ePage eTab eWord
  7797.           locA locB locC locD locE locF locG locH locI locJ locSC locSP
  7798.           mouseLoc sChar sFile sForm sHilite sInvert sLine sPage sTab sWord
  7799.           upLine
  7800.  
  7801. LIST 5:   atCursor downLine eFile eForm eHilite eInvert ePage locA locB locC
  7802.           locD locE locF locG locH locI locJ locSC locSP n# number sFile sForm
  7803.           sHilite sInvert sPage upLine
  7804.  
  7805. LIST 6:   atCursor eFile eHilite eInvert ePage locA locB locC locD locE locF
  7806.           locG locH locI locJ locSC locSP mouseLoc sFile sHilite sInvert sPage
  7807.  
  7808. LIST 7:   atCursor eHilite eInvert locA locB locC locD locE locF locG locH locI
  7809.           locJ locSC locSP mouseLoc sHilite sInvert sPage
  7810.  
  7811. LIST 8:   eHilite eInvert locA locB locC locD locE locF locG locH locI locJ
  7812.           locSC locSP sHilite sInvert
  7813.  
  7814. LIST 9:   allBut eitherOr eLine inputChar literal multiWhite multiWild n#
  7815.           number pmEsc singleWhite wildCard
  7816.  
  7817. LIST 10:  allBut autoBackup autoIndent bottomMargin buf# busies capsLock 
  7818.           clickTime cmdMultiplier curFile customScreen eitherOr hideDisplay
  7819.           icons idleTime inputChar keyArg leftMargin lineLength literal
  7820.           macroNum mapChars menuOffset multiWhite multiWild n# number
  7821.           overStrike pageLines pmEsc prefPrint printTabs rightJustify
  7822.           scrollType searchCaps sHeight singleWhite smartTabs speakAlerts
  7823.           speakMsgs splitSize spooks sWidth tabTable tinyPriority topMargin
  7824.           trapMenus trueTabs useKeys userGlobalA userGlobalB userGlobalC
  7825.           userGlobalD wildCard wordWrap
  7826.  
  7827. LIST 11:  alpha blankLine ctlChar decimalNum digit eFile eForm eLine ePage
  7828.           eWord formFeed hexNum lineTooLong literal lowerCase n# number sFile
  7829.           sForm sLine space sPage sWord tabColumn upperCase whiteSpace
  7830.  
  7831. LIST 12:  all char hilite invert line loc locCD locEF locGH locIJ locPC word
  7832.  
  7833. LIST 13:  allBut autoBackup autoIndent bottomMargin busies capsLock clickTime
  7834.           cmdMultiplier customScreen eitherOr hideDisplay icons idleTime
  7835.           inputChar leftMargin lineLength macroNum mapChars menuOffset
  7836.           multiWhite multiWild n# overStrike pageLines pmEsc prefPrint
  7837.           printTabs rightJustify scrollType searchCaps sHeight singleWhite
  7838.           smartTabs speakAlerts speakMsgs splitSize spooks sWidth tabTable
  7839.           tinyPriority topMargin trapMenus trueTabs useKeys userGlobalA
  7840.           userGlobalB userGlobalC userGlobalD userLocalA userLocalB wildCard
  7841.           wordWrap
  7842.  
  7843. LIST 14:  autoBackup autoIndent busies changed columnar cram favorite
  7844.           hideDisplay icons lace learnMode mapChars markGadgets overStrike
  7845.           printTabs readOnly rightJustify rowCol scrollType searchCaps
  7846.           smartTabs speakAlerts speakMsgs spooks teachKeys trapMenus trueTabs
  7847.           useKeys userGlobalA userGlobalB userGlobalC userGlobalD userLocalA
  7848.           userLocalB wordWrap
  7849.  
  7850. Certain arguments in the above lists are abbreviated, and the correct CL to use is:
  7851.  
  7852.        In List    Correct Command Language
  7853.        -------    ------------------------
  7854.        n#         n0 to n99 or n[n0] to n[n99]
  7855.        buf#       buf0 to buf99 or buf[n0] to buf[n99]
  7856.        literal    "anything in quotes"
  7857.        number     123456 (decimal or hexadecimal integer)
  7858.        keyArg     valid key argument, such as normal-t or shftAlt-f10
  7859.  
  7860.  
  7861. ADD: setTaskPri(P list 10)
  7862. ADD: setFont(F list 0, H list 10)
  7863. FIX: spell(B1 list 0, B2 list 2, B3 list 0)
  7864. ADD: draw(X,Y,C,M,F) all are list 10
  7865. ADD: sortLines(B list 2, C list 10)
  7866. ADD: inTiny
  7867. ADD: screenToBack
  7868. ADD: screenToFront
  7869. FIX: spacesToTabs(B list 2)
  7870. FIX: tabsToSpaces(B list 2)
  7871. ADD: getFont(F list 2, X list 10, Y list 10)
  7872. ADD: fullRefresh
  7873. ADD: compareBuf(B1 list 2, B2 list 2)
  7874. ADD: clearBuf(B list 2)
  7875. ADD: loadState(B list 10)
  7876. ADD: saveState(B list 10)
  7877. ADD: stackBuf(B list 10, F list 10)
  7878. ADD: getRGB(R0,R1,R2,R3) list 10
  7879. ADD: setColors(B list 2, C & FG & BG list 10)
  7880. ADD: getColors(B list 2, C & FG & BG list 10)
  7881. ADD: xor(A,B,C) list 10
  7882. ADD: setFold(T,F,X,SKA) liset 10
  7883. ADD: getFold(T,F,X,B,SKA) B=list 2, rest are list 10
  7884. ADD: fold(T list 0, F list 2, R list 12)
  7885.  
  7886.  
  7887.  
  7888. 3.2  Functions and their Arguments, Alphabetically
  7889.  
  7890. Function        Arg Lists   Function      Arg Lists   Function       Arg Lists
  7891. --------        ---------   --------      ---------   --------       ---------
  7892. abort                       getStackSize  10 10 10    reformat
  7893. abortPrint                  getTabs       2 10        refreshDisplay
  7894. abortSave                                             restartPrint
  7895. add             10 10 10    gotoPage      2 10        return
  7896. alertUser       10          gotoSplit     2           returnFalse
  7897. and             10 10 10    grep          2 12 10     returnTrue
  7898. askYesNo        10          gtLoc         2 6 6       rexxIn        0 6 10 10 10
  7899. attachBuf       2 10        gtNum         10 10       rexxOut       0 12 10 10 10
  7900. beepDisplay                 hexDecimal    2           rollStack     10 10
  7901. case            10          hScroll       10          runKey        10
  7902. changeDir       10          hyper         2 0 10 10   runLearn
  7903. checkedMenu    1 1 10 10 14 hyperClose                saveConfig    10
  7904. checkedSubMenu 1 1 10 10 14 hyperOpen     0 0 10      saveFile      2
  7905. clearChar       2           hyperUp                   saveKeys      10 10 10
  7906. clearColData    2 12 10     incLoc        2 7         saveLearn     10
  7907. clearRgn        2 12        incNum        10          search        2 8 8 10
  7908. colToLoc        2 7 10      indextoLoc    2 7 10      seeRuler
  7909. compile         2           inputKey      10          setEol        10
  7910. compileDefaults 2           inputNum      10          setFileName   2 10
  7911. copyChar        2 10        inputString   2           setGrep       10
  7912. copyColData     2 6 2 12 10 inputWaiting              setLocal      2 3 10
  7913. copyKey         10 10       insertChar    2 9         setMaxFiles   10
  7914. decLoc          2 7         insertFile    2 6 10      setRGB        10 10 10 10
  7915. decNum          10          insertRgn     2 6 0 12    setRuler
  7916. default                     inUse         10          setSearch     10
  7917. delay           10          is            2 11        spacesToTabs
  7918. detachBuf       2           isEmpty       2           speak         10
  7919. div             10 10 10    killKey       10          spell         0 2 0
  7920. downFlag        2 14                                  spellerUp
  7921. editBuf         2           lineToLoc     2 7 10      splitWindow   2 10
  7922. eqLoc           2 6 6       loadConfig    10          startSpell    10 10 10
  7923. eqNum           10 10       loadFile      10          stopspell
  7924. equateLoc       2 7 6       loadKeys      10 10 10    stringComp    10 10 10 10
  7925. equateNum       10 10       loadLearn     10          sub           10 10 10
  7926. execute         0 10        locToCol      2 10 6      subMenu       1 1 10 10
  7927. fileRequest     2 0 10      locToIndex    2 10 6      swapBuf       2 2
  7928. fileSize        2 10        locToLine     2 10 6      swapChar      2 9
  7929. flipFlag        2 14        menu          1 1 10 10   swapKey       10 10
  7930. freeBuf         2           mod           10 10 10    swapLoc       2 7 7
  7931. gadgetName      10 0        mouseDown                 switch        10
  7932. geLoc           2 6 6       mouseXY       10 10       tabsToSpaces
  7933. geNum           10 10       moveCursor    2 4         teachOne      10
  7934. getAddress      10 10       mul           10 10 10    text         10 10 10 10 10
  7935. getBufAddr      10 2        nameBuffer    10 1        thisKey
  7936. getChar         10          newFile                   toggle        14
  7937. getFileName     2 2         nothing                   toLower       2
  7938. getFlag         2 14        onScreen      6           toNumber      10 2
  7939. getGrep         2           or            10 10 10    toUpper       2
  7940. getKey          10          peek          10 10 10    toWord        2 10
  7941. getKeyVal       10 10       poke          10 10 10    trackMouse
  7942. getLocal        2 10 3      pop           10 10       typeChar      9
  7943. getMaxFiles     10          print         0 12        updateDisplay
  7944. getPageRowCol   10 10 10    printerCode   2 10 10 10  upFlag        2 14
  7945. getSearch       2           push          10 10       vScroll       5
  7946. getSerialNum    10          putMsg        10
  7947. getSplitLines   10 10       quit          10
  7948.  
  7949.  
  7950. 3.3  Functions and their Arguments, by Category
  7951.  
  7952.    -ABORT/QUIT/RETURN-    toNumber        10 2         getFlag         2 14
  7953. abort                     toUpper         2            toggle          14
  7954. abortPrint                toWord          2 10         upFlag          2 14
  7955. abortSave                       -CURSOR/MOUSE-                  -KEY-
  7956. quit            10        mouseDown                    copyKey         10 10
  7957. return                    mouseXY         10 10        getKey          10
  7958. returnFalse               moveCursor      2 4          getKeyVal       10 10
  7959. returnTrue                trackMouse                   inputKey        10
  7960.         -AMIGADOS-                                     killKey         10
  7961. changeDir       10                                     loadKeys        10 10 10
  7962. execute         0 10        -DISPLAY/PAGE/ROW/COL-     runKey          10
  7963. fileRequest     2 0 10    beepDisplay                  saveKeys        10 10 10
  7964.      -BUFFER ADDRESS-     getPageRowCol   10 10 10     swapKey         10 10
  7965. attachBuf       2 10                                            -INPUT-
  7966. detachBuf       2         gotoPage        2 10         alertUser       10
  7967. getBufAddr      10 2      hScroll         10           askYesNo        10
  7968.   -BUFFER/NUMBER STACK-                                getChar         10
  7969. getStackSize    10 10 10  refreshDisplay               getKey          10
  7970. pop             10 10     setRGB          10 10 10 10  getKeyVal       10 10
  7971. push            10 10     text         10 10 10 10 10  inputKey        10
  7972. rollStack       10 10     updateDisplay                inputNum        10
  7973.        -CHARACTER-        vScroll         5            inputString     2
  7974. clearChar       2            -FILE/BUFFER/LOCAL-       inputWaiting
  7975. copyChar        2 10      abortSave                             -LEARN-
  7976. getChar         10        editBuf         2            loadLearn       10
  7977. insertChar      2 9       fileRequest     2 10         runLearn
  7978. swapChar        2 9       fileSize        2 10         saveLearn       10
  7979. typeChar        9         freeBuf         2                    -LOCATION-
  7980. toLower         2         getFileName     2 2          decLoc          2 7
  7981. toUpper         2         getLocal        2 10 3       eqLoc           2 6 6
  7982.       -COMPILE/DATA-      getMaxFiles     10           equateLoc       2 7 6
  7983. compile         2         insertFile      2 6 10       geLoc           2 6 6
  7984. compileDefaults 2         loadFile        10           gtLoc           2 6 6
  7985. loadConfig      10        nameBuffer      10 1         incLoc          2 7
  7986. loadKeys        10 10 10  newFile                      moveCursor      2 4
  7987. saveConfig      10        saveFile        2            swapLoc         2 7 7
  7988. saveKeys        10 10 10  setFileName     2 10                -LOC TO NUM-
  7989.      -CONVERT/FORMAT-     setLocal        2 3 10       colToLoc        2 7 10
  7990. hexDecimal      2         setMaxFiles     10           indexToLoc      2 7 10
  7991. reformat                  swapBuf         2 2          lineToLoc       2 7 10
  7992. spacesToTabs                    -FLAG/TOGGLE-          locToCol        2 10 6
  7993. tabsToSpaces              downFlag        2 14         locToIndex      2 10 6
  7994. toLower         2         flipFlag        2 14         locToLine       2 10 6
  7995.  
  7996.  
  7997.           -MENU-                    -SAVE/LOAD-
  7998. checkedMenu     1 1 10 10 14 loadConfig      10
  7999. checkedSubMenu  1 1 10 10 14 loadFile        10
  8000. menu            1 1 10 10    loadKeys        10 10 10
  8001. subMenu         1 1 10 10    loadLearn       10
  8002.      -MISCELLANEOUS-         saveConfig      10
  8003. delay           10           saveFile        2
  8004. getSerialNum    10           saveKeys        10 10 10
  8005. hyper           2 0 10 10    saveLearn       10
  8006. hyperClose                            -SEARCH-
  8007. hyperOpen       0 0 10       getGrep         2
  8008. hyperUp                      getSearch       2
  8009. nothing                      grep            2 12 10
  8010. setEol          10           search          2 8 8 10
  8011. speak           10           setGrep         10
  8012. teachOne        10           setSearch       10
  8013.        -MSG/ALERT-                   -SPELLING-
  8014. alertUser       10           spell           0 2 0
  8015. askYesNo        10           spellerUp
  8016. putMsg          10           startSpell      10 10 10
  8017.           -NAME-             stopSpell
  8018. gadgetName      10 0               -SPLIT WINDOW-
  8019. getFileName     2 2          getSplitLines   10 10
  8020. nameBuffer      10 1         gotoSplit       2
  8021. setFileName     2 10         splitWindow     2 10
  8022.    -NUMBERS/ARITHMETIC-      toggle          14
  8023. add             10 10 10               -TABS-
  8024. and             10 10 10     getTabs         2 10
  8025. decNum          10           seeRuler
  8026. div             10 10 10     setRuler
  8027. eqNum           10 10        spacesToTabs
  8028. equateNum       10 10        tabsToSpaces
  8029. geNum           10 10                  -TEST-
  8030. gtNum           10 10        getFlag         2 14
  8031. incNum          10           inputWaiting
  8032. inputNum        10           inUse           10
  8033. mod             10 10 10     is              2 11
  8034. mul             10 10 10     isEmpty         2
  8035. or              10 10 10     onScreen        6
  8036. sub             10 10 10     stringComp      10 10 10 10
  8037.          -PRINT-             thisKey
  8038. abortPrint
  8039. print           0 12
  8040. printerCode     2 10 10 10
  8041. restartPrint
  8042.     -REGION/COLUMNAR-
  8043. clearColData    2 12 10
  8044. clearRgn        2 12
  8045. copyColData     2 6 2 12 10
  8046. insertRgn       2 6 0 12
  8047.          -REXX-
  8048. rexxIn          0 6 10 10 10
  8049. rexxOut         0 12 10 10 10
  8050.  
  8051.  
  8052. 3.4  Command Language Functions
  8053.  
  8054. CL functions use parentheses only if the function uses arguments.  Most
  8055. functions return a True or a False based on their success.  Some, such as
  8056. refreshDisplay, always return True.  Most will return False, if they fail for
  8057. some reason, such as when a buffer does not exist, when told to modify a
  8058. read-only buffer, when told to move the cursor beyond end-of-file, and so on.
  8059. Tests such as getFlag() and gtNum() return True or False based on the outcome
  8060. of the test they perform.  incNum() and decNum() return False, when their
  8061. integer argument passes through zero, but they increment or decrement the
  8062. argument anyway.  And() and or() return False, when their numerical result is
  8063. zero.
  8064.  
  8065. Commands return the True or False result of the last function called in them.
  8066. Four functions - Return, ReturnTrue, ReturnFalse, and Abort - cause a command
  8067. to return immediately.  Except in the case of Abort, they return gracefully
  8068. to the command that called them, if called by some other command; otherwise
  8069. they return control to the work-loop which processes inputs.
  8070.  
  8071. The Return function causes the command to return immediately with the True or
  8072. False of the last function that was called.  ReturnTrue and ReturnFalse cause
  8073. the command to return with a forced True or False.  Abort causes Uedit to
  8074. abort all activity and throw away any unprocessed inputs.
  8075.  
  8076. Certain things automatically cause an abort.  When an abort occurs, such as
  8077. when you press Amiga-ESC or when a memory shortage occurs, the screen flashes
  8078. and Uedit aborts whatever it is doing.  If a memory shortage occurs, a
  8079. "Memory..." message appears and remains visible until Uedit has done memory
  8080. housekeeping.
  8081.  
  8082. Loading in a new data file with loadConfig() causes an abort after the data
  8083. is loaded in.  This is necessary because the command running is replaced by
  8084. whatever its counterpart may be in the new data file.  Killing a command that
  8085. is currently running also causes an abort.  A key that is running can be
  8086. killed by itself using killKey(), by some command it is running with
  8087. runKey(), by a call to loadKeys() or loadConfig(), or by being recompiled.
  8088. In each case, Uedit's engine sees that it is not looking at the key it
  8089. thought it was, so it aborts.
  8090.  
  8091. CL functions with both input and output arguments work from right to left;
  8092. input arguments are on the right and output arguments are on the left inside
  8093. function parentheses.
  8094.  
  8095. Valid function arguments often include variables that don't make sense.  For
  8096. example, swapKeys(topMargin,bottomMargin) is valid.  Most arguments may be
  8097. used for general purposes and these margin variables could be used for
  8098. storing macro numbers temporarily.
  8099.  
  8100. In the function descriptions, a file buffer is a buffer in the range 0 to
  8101. MaxFiles-1.  For example, if MaxFiles is 20, buf0 to buf19 are file buffers.
  8102. When a new file is loaded in, it is loaded into the lowest file-buffer slot
  8103. available.  The "home" buffer is the lowest numbered file buffer that exists;
  8104. it is buf0, when buf0 exists.  A work buffer, is a buffer in the upper
  8105. number-range; if MaxFiles is 20, buf20 to buf99 are work buffers.  Buffers do
  8106. not exist until a CL function inserts or loads something into them.  Buffers
  8107. are not deleted unless the freeBuf() function is called for them.
  8108.  
  8109. Functions that use LIST 10 (integer, buffer, and literal arguments) may use
  8110. the arguments for either text or integer purposes, depending on the type of
  8111. function.  A text function, such as putMsg() or alertUser() converts integer
  8112. arguments to text.  For
  8113.  
  8114. example, putMsg(n54) would convert the value in n54 to text and display it as
  8115. a message.
  8116.  
  8117. Number-functions such as add() and equateNum(), when given a buffer input
  8118. argument, use the buffer's number, not its contents.  For example,
  8119. equateNum(n54,curFile) stores the buffer number of curFile in n54.
  8120.  
  8121. If a literal argument is used as an integer, the characters in the string are
  8122. byte-shifted into a 4-byte integer; if the string is longer than 4 bytes, the
  8123. last 4 bytes are used.  For example, add(n54,n54,"abcdef") adds the 4-byte
  8124. integer equivalent of "cdef" to n54.
  8125.  
  8126. If a buffer or literal is used as an output argument in a number-function
  8127. such as add(), the buffer or literal is unaffected.  For example, in
  8128. equateNum(curFile,n54) the result ends up in an internal scratch variable
  8129. that is thrown away, so nothing happens that you can detect.  If a number is
  8130. used as an output argument, as in add(3333,a,b), the result is also thrown
  8131. away.
  8132.  
  8133. In the function descriptions, when "(text)" or "(buffer)" is beside LIST 10,
  8134. it means that the argument is treated as text and that numbers are converted
  8135. into ASCII.  If "(integer)" is beside LIST 10, it means that the argument is
  8136. treated as an integer.
  8137.  
  8138. All functions return True, except under the conditions noted in the function
  8139. descriptions.  Functions may set bits in the internal displayFlag variable to
  8140. tell Uedit's display routine how to refresh during the next pause.  The bits
  8141. in displayFlag instruct the display routine to refresh one of the split
  8142. windows, refresh the cursor line, refresh from the cursor to the end of the
  8143. active window, or fully refresh the active window.  The refreshing is done
  8144. when there is a pause, if any bits in displayFlag are set.  Also as a backup
  8145. measure, Uedit refreshes curFile's window when there is 4 second pause in
  8146. activity.
  8147.  
  8148. If no display action is noted in a function's description, the function does
  8149. not update the display in realtime and does not set bits in displayFlag.  If
  8150. a display action is noted, usually it means that the function sets bits in
  8151. displayFlag.  Certain functions, however, cause a realtime refresh to occur;
  8152. among them are editBuf(), refreshDisplay, seeRuler, and setRuler.  Also
  8153. updateDisplay causes a realtime refresh, according to the bits in displayFlag
  8154. at the time, if any bits are set.
  8155.  
  8156.  
  8157.                                 CL Functions
  8158.  
  8159. abort
  8160.  
  8161. Immediately stops all activity in Uedit.  It cleans out the input queue and
  8162. any pending processing.  Abort does not stop spooled prints and saves.  To
  8163. stop those, use AbortPrint and AbortSave.
  8164.  
  8165. Example:  if (not saveFile(curFile)) abort
  8166.  
  8167. abortPrint
  8168.  
  8169. Discards the current spooled print being processed in background.  If there
  8170. is no queued print, it returns False.  It does not stop foreground ("busy")
  8171. printing.  To stop foreground prints, use Amiga-ESC.  To abort all background
  8172. prints, keep calling abortPrint until it returns False.
  8173.  
  8174. Example:  while (abortPrint) nothing  .. cancel all prints.
  8175.  
  8176. abortSave
  8177.  
  8178. Aborts the current file-save in process.  It returns False, if there are no
  8179. file-saves queued up.  AbortSave closes and deletes the file on disk that it
  8180. was saving.  Warning:  AbortSave deletes the partially saved copy of the file
  8181. on disk.
  8182.  
  8183. Example:  while (abortSave) nothing   .. cancel all file-saves.
  8184.  
  8185. add(A,B,C)
  8186. A,B,C:  list 10 (integer)
  8187.  
  8188. A = B + C.  (See sub(), mul(), div(), mod(), or(), and and().)
  8189.  
  8190. alertUser(M)
  8191. M:  list 10 (text)
  8192.  
  8193. Displays an Okay/Cancel requester box containing the message M.  If the
  8194. message is empty, alertUser() does not display a requester box and returns
  8195. False.  alertUser() returns True if Okay is selected, and it executes an
  8196. Abort if Cancel is selected.  Message length may be up to 75 characters.  If
  8197. speakAlerts is True, alerts are also spoken.  (See flipFlag(), getFlag(),
  8198. upFlag() and downFlag().)
  8199.  
  8200. Example:  alertUser("File not found")
  8201.  
  8202. and(A,B,C)
  8203. A,B,C:  list 10  (integer)
  8204.  
  8205. A = B & C.  and() does a bit-wise AND, returning False only if the result is 0.
  8206.  
  8207. Example:  and(n54,96,0X20)   ..n54 = 96 & 32 = 32, so it returns True.
  8208.  
  8209. askYesNo(M)
  8210. M:  list 10 (text)
  8211.  
  8212. Displays the message M in a Yes/No/Cancel requester box.  M may be up to 75
  8213. characters long.  askYesNo() returns True, if Yes is selected.  It returns
  8214. False, if No is selected.  It executes an Abort, if Cancel is selected.  It
  8215. returns False without displaying the requester, if the message is empty.  If
  8216. speakAlerts is True, the message is also spoken.  (See flipFlag(), getFlag(),
  8217. upFlag() and downFlag().)
  8218.  
  8219. Example:  if (askYesNo("Stop prints?")) while (abortPrint) nothing
  8220.  
  8221. attachBuf(B,N)
  8222. B:  list 2 (buffer)
  8223. N:  list 10 (integer)
  8224.  
  8225. N is the memory address of a Uedit-type buffer to be attached to buffer B.
  8226. If buffer B already exists, attachBuf() returns False.  attachBuf() performs
  8227. a simple test to see whether the "buffer" at address N is really a Uedit-type
  8228. buffer; this test is not foolproof, but the odds favor it.  attachBuf() makes
  8229. no check to see whether buffer address N is already one of Uedit's buffers.
  8230. Warning:  If you attach a buffer whose pointers and flags have been managed
  8231. improperly or a buffer that already exists in Uedit, this will probably cause
  8232. a crash.  (See detachBuf() and getBufAddr().)
  8233.  
  8234. Example:  attachBuf(buf19,n0)   .. n0 has address of a Ue buffer.
  8235.  
  8236. beepDisplay
  8237. Flashes the screen.
  8238.  
  8239. Example:  if (not compileDefaults) beepDisplay
  8240.  
  8241. changeDir(S)
  8242. S:  list 10 (text)
  8243.  
  8244. Changes Uedit's current directory to the directory in S.  If unable to change
  8245. to the directory in S, it returns False.  changeDir() may not work in
  8246. Workbench.  (Also see execute().)
  8247.  
  8248. Example:  if (not changeDir("dh0:myWorkDir")) returnFalse
  8249.  
  8250. checkedMenu(D,A,N,C,F)
  8251. D,A:  literal
  8252. N,C:  list 10 (integer)
  8253. F:  list 14 (flag)
  8254.  
  8255. Creates a menu selection that displays a checkmark based on the realtime
  8256. value of the flag F.  The description D and alternate text A must be a
  8257. literal in quotes up to 17 characters in length.  It is a good idea to
  8258. use two spaces at the beginning of the text in D, leaving room for the
  8259. checkmark; otherwise the checkmark will lie on top of the first two letters
  8260. in D.  N is the menu number, 1 to 7.  C is the command-key, which must be a
  8261. valid key argument or a macro number, 1 to 1148.  It returns False, if N or C
  8262. is out of range, if no memory is available, if there are already 20 menu
  8263. items for menu N, or if the command for C does not exist.  checkedMenu() may
  8264. only be used in the Startup command.  (See menu() and subMenu().  See Config!
  8265. for examples.)
  8266.  
  8267. checkedSubMenu(D,A,N,C,F)
  8268. D,A:  literal
  8269. N,C:  list 10 (integer)
  8270. F:  list 14 (flag)
  8271.  
  8272. Creates a submenu selection that displays a checkmark based on the realtime
  8273. value of the flag F.  The description D and alternate Text A must be a
  8274. literal in quotes up to 17 characters in length.  It is a good idea to
  8275. use two spaces at the beginning of the text in D, leaving room for the
  8276. checkmark; otherwise the checkmark will lie on top of the first two letters
  8277. in D.  N is the menu number, 1 to 7, that owns the submenu.  C is the
  8278. command-key, which must be a valid key argument or a macro number, 1 to 1148.
  8279. It returns False, if the menu for this subitem has not been defined yet, if N
  8280. or C is out of range, if no memory is available, if there are already 12
  8281. submenu items for the current menu item, or if the command for C does not
  8282. exist.  checkedSubMenu() may only be used in the Startup command.  (See
  8283. menu() and subMenu().  See Config! for examples.)
  8284.  
  8285. clearBuf(B)
  8286. B: list 2
  8287.  
  8288. Clears buffer B without freeing it.  clearBuf() should be used when memory
  8289. fragmentation is not a concern and faster performance is desired, because it
  8290. is more efficient than clearRgn(B,all) or freeBuf() followed by reallocating
  8291. the buffer.  (See clearRgn() and freebuf().)
  8292.  
  8293. clearChar(B)
  8294. B:  list 2 (buffer)
  8295.  
  8296. Deletes the character under the cursor in buffer B.  It returns False, if
  8297. buffer B is read-only or cursor is at eof.  (See copyChar(), insertChar(),
  8298. swapChar(), and typeChar().)
  8299.  
  8300. Display Action:  Refreshes B's window, if any and not curFile.  If B=curFile,
  8301. refreshes cursor; if cursor offscreen, centers cursor.
  8302.  
  8303. Cursor Action:  Cursor rests on the next character, after clearing the old
  8304. one.
  8305.  
  8306. Example:  while (moveCursor(curFile,eWord)) clearChar(curFile)
  8307.  
  8308. clearColData(B,R,F)
  8309. B:  list 2 (buffer)
  8310. R:  list 12 (region)
  8311. F:  list 10 (integer)
  8312.  
  8313. Clears columnar region R in buffer B.  If flag F is 0, it clears the region.
  8314. If F is non-zero, it space-fills the region.  It returns False, if no region
  8315. exists or B is read-only.
  8316.  
  8317. Cursor Action:  If R cleared and cursor in R, cursor advances to the first
  8318. character to the right of the cleared region.
  8319.  
  8320. Display Action:  Refreshes B's window, if any.
  8321.  
  8322. Example:  if (getFlag(curFile,columnar)) clearColData(curFile,hilite,0)
  8323.  
  8324. clearRgn(B,R)
  8325. B:  list 2 (buffer)
  8326. R:  list 12 (region)
  8327.  
  8328. Clears region R in buffer B.  It returns False, if B is read-only or no
  8329. region exists.
  8330.  
  8331. Cursor Action:  If cursor in R, it advances to first character after the
  8332. cleared region.
  8333.  
  8334. Display Action:  Refreshes B's window, if any and not curFile.  If B=curFile,
  8335. refreshes cursor; if cursor offscreen, centers cursor.
  8336.  
  8337. Example:  if (not getFlag(curFile,columnar)) clearRgn(curFile,hilite)
  8338.  
  8339. colToLoc(B,L,C)
  8340. B:  list 2 (buffer)
  8341. L:  list 7 (location)
  8342. C:  list 10 (integer)
  8343.  
  8344. Computes location L based on column C.  The line used is the line containing
  8345. location L, which is the cursor line if L=atCursor.  Location L is moved to
  8346. column C.  It returns False, if C<=0 or if C is greater than the line's
  8347. length.
  8348.  
  8349. Cursor Action:  Moves cursor to column C, if L=atCursor.
  8350.  
  8351. Display Action:  Refreshes B's window, if any and not curFile.  If B=curFile
  8352. and L=atCursor, refreshes cursor; if cursor offscreen, centers cursor.
  8353.  
  8354. Example:  colToLoc(curFile,atCursor,20) ..move cursor to column 20.
  8355.  
  8356. compareBuf(B1,B2)
  8357. B1,B2: list 2
  8358.  
  8359. Compares the contents of buffer B1 with the contents of buffer B2 starting
  8360. from the cursor forward in each buffer.  It stops and leaves the cursor at
  8361. the first spot where the buffer contents disagree.  It sets start-of-page
  8362. (sPage) at the start of the cursor line in each buffer.  compareBuf() returns
  8363. False when disagreement is found.  It returns True when end-of-file is
  8364. reached in both buffers simultaneously.
  8365.  
  8366. Cursor action:  As noted above.
  8367.  
  8368. Display action:  As noted above.
  8369.  
  8370. compile(B)
  8371. B: list 2
  8372.  
  8373. Compiles the command at or following the cursor in buffer B.  If successful,
  8374. the cursor stops at the ">" ending bracket of the command and it returns
  8375. True; the message line displays "Size", if it is a new command, or "Replace",
  8376. if it is replacing an existing command, followed by the pcode size of the
  8377. compiled command.  If an error is found in the command, the cursor stops just
  8378. past the offending part of the command, and the return is False.  It returns
  8379. False also if there is not enough memory.  (See Compile Errors, 2.27.)
  8380.  
  8381. Cursor Action:  Advances cursor as noted above.
  8382.  
  8383. Display Action:  Refreshes cursor; centers cursor, if offscreen.
  8384.  
  8385. Example:  if (not compile) beepDisplay ..warn, if unsuccessful.
  8386.  
  8387. compileDefaults(B)
  8388. B: list 2
  8389.  
  8390. Compiles the config default values at or following the cursor in buffer B.
  8391. If successful, it returns True, closes and reopens the window using the new
  8392. defaults, rebuilds the menus, and the cursor is after the last default.  If
  8393. it finds an error, the cursor stops just past the bad default or at eof, if
  8394. it cannot find enough defaults, and it returns False.  Note that it replaces
  8395. the acceptable defaults it finds, so even if it finds an error, some of the
  8396. defaults may have been changed.
  8397.  
  8398. Cursor Action:  Cursor advances as noted above.
  8399.  
  8400. Display Action:  Refreshes cursor, if it finds an error; centers it, if
  8401. offscreen.
  8402.  
  8403. Example:  moveCursor(curFile,sFile) ..move cursor to front of defaults.
  8404.       if (not compileDefaults) beepDisplay ..compile defaults, flash on error.
  8405.  
  8406. copyChar(B,N)
  8407. B:  list 2 (buffer)
  8408. N:  list 10 (integer)
  8409.  
  8410. Copies cursor character in buffer B into integer variable N.  It returns
  8411. False, if B does not exist or cursor is at eof.  (See clearChar(),
  8412. insertChar(), swapChar(), and typeChar().)
  8413.  
  8414. Example:  copyChar(curFile,n54) if (eqNum(n54,"?")) return
  8415.  
  8416. copyColData(B1,L,B2,R,F)
  8417. B1,B2:  list 2 (buffer)
  8418. L:  list 6 (location)
  8419. R:  list 12 (region)
  8420. F:  list 10 (integer)
  8421.  
  8422. Copies columnar text region R from buffer B2 into buffer B1 at location L.
  8423. If flag F is 0, it overlays (overwrites) any existing text at L.  If F is
  8424. non-zero, it inserts the text at L, pushing existing text to the right.  If R
  8425. is a hilite region, it hilites the region inserted/overlaid in B1.  If R is
  8426. not a hilite region, it inverse-displays the inserted/overlaid text.  It
  8427. returns False, if B2 does not exist, if columnar region R does not exist, if
  8428. B1 is read-only, or if there is not enough memory.
  8429.  
  8430. Display Action:  Refreshes B's window, if any.
  8431.  
  8432. Example:
  8433.     if (getFlag(buf99,columnar)) copyColData(buf99,atCursor,buf37,hilite,1)
  8434.  
  8435. copyKey(K1,K2)
  8436. K1,K2:  list 10 (integer)
  8437.  
  8438. Copies the command of key K2 into key K1.  K1 and K2 must be valid key
  8439. arguments or macro numbers in the range 1 to 1148.  It returns False, if K2
  8440. has no command, if there is not enough memory, if K1 or K2 is not a valid key
  8441. or macro number, or if K1=K2.  It deletes any existing K1 key.  If K1 is the
  8442. Startup key, the menus are removed; the new Startup command is run in the
  8443. next pause, rebuilding the menus if it has menu() functions in it.
  8444.  
  8445. Example:  copyKey(normal-esc,virtual-esc) ..copy virtual esc to normal.
  8446.  
  8447. decLoc(B,L)
  8448. B:  list 2 (buffer)
  8449. L:  list 7 (location)
  8450.  
  8451. Decrements location L in buffer B.  It returns False, if B does not exist or
  8452. if L is already at start-of-file.
  8453.  
  8454. Cursor Action:  Decrements cursor, if L=atCursor.
  8455.  
  8456. Example:  while (decLoc(curFile,atCursor)) swapChar(curFile," ")
  8457.  
  8458. decNum(N)
  8459. N:  list 10 (integer)
  8460.  
  8461. Decrements integer variable N.  It returns False, if N is 0 going in, but it
  8462. decrements N regardless.  (Returning False when N=0 going in makes decNum()
  8463. useful in while-loops.  See example.  See incNum().)
  8464.  
  8465. Example:  equateNum(n0,20) while (decNum(n0)) beepDisplay
  8466.  
  8467. delay(N)
  8468. N:  list 10 (integer)
  8469.  
  8470. Delays for N tenths of a second.  If N<=0, it returns False.  During the
  8471. delay, if any file-saves or prints are in the queue, it processes them.  The
  8472. accuracy of delay() relies upon the clock-tick accuracy of the computer, plus
  8473. any inaccuracies due to background printing or file-saving during the delay.
  8474.  
  8475. Example:  delay(10)   .. delay 1 second.
  8476.  
  8477. detachBuf(B)
  8478. B:  list 2 (buffer)
  8479.  
  8480. Detaches buffer B from Uedit.  Warning:  You MUST use getBufAddr() to get the
  8481. address first!  Otherwise the buffer cannot be reattached!  It returns False,
  8482. if B does not exist.  If B is curFile, the "home" buffer becomes curFile.  If
  8483. no file buffer exists after detaching B, a NoName buffer is opened.  (See
  8484. attachBuf() and getBufAddr().)
  8485.  
  8486. Display Action:  If B=curFile, the new curFile is displayed.
  8487.  
  8488. Example:  getBufAddr(n0,curFile) detachBuf(curFile) ..got address FIRST!
  8489.  
  8490. div(A,B,C)
  8491. A,B,C:  list 10 (integer)
  8492.  
  8493. A = B/C.  It returns False, if C=0.
  8494.  
  8495. Example:  if (not div(n99,n1,n2)) putMsg("Can't divide by zero!")
  8496.  
  8497. downFlag(B,F)
  8498. B:  list 2 (buffer)
  8499. F:  list 14 (flag)
  8500.  
  8501. Sets to False the value of flag F for buffer B.  (See the notes for
  8502. flipFlag().)  If flag F is a local (buffer) flag and buffer B does not exist,
  8503. it returns False.  If F is a global flag, B is ignored.  If the flag's value
  8504. is non-zero, a True is returned.  If the flag is zero, a False is returned.
  8505.  
  8506. Example:  if (downFlag(curFile,columnar)) alertUser("Turned off Col display
  8507. mode")
  8508.  
  8509. draw(X,Y,C,M,F)
  8510. X,Y,C,M,F:  list 10 (numbers)
  8511.  
  8512. draws a line from the current position to X-Y using color C, drawing mode M,
  8513. and flag F.  C = 0-15 specifies a color; C = -1 means use the current (last)
  8514. color.  M values are: 0 = JAM1, 1 = JAM2, 2 = XOR, 4 = INVERSE.  F = 0 means
  8515. do only a move(X,Y) to set the current drawing position to X-Y; if F = 0,
  8516. other arguments are ignored except the color C is stored.  F = 1 means draw a
  8517. line to X-Y using color C, mode M, and flag F.  Example:  You can draw (using
  8518. XOR) a grating on top of the text in the window & erase it by redrawing it
  8519. again with XOR.  You can draw boxes and other figures with the mouse.  draw()
  8520. always returns True.  Note:  An internal flag prevents the right (menu) mouse
  8521. button from clearing the message line after text() or draw() has been used.
  8522. The internal flag is cleared after some other type of displaying action is
  8523. called for.
  8524.  
  8525. Example 1:  Press shift-mousebutton and move the mouse.
  8526. <shft-buttonDown:
  8527.     mouseXY(n0,n1)
  8528.     gosub label(0)
  8529.     if (not mousedown) return
  8530.     equateNum(n54,0)
  8531.     while (not inputwaiting) {
  8532.         trackmouse
  8533.         mouseXY(n2,n3)
  8534.         if (!eqNum(n2,n0) & !eqNum(n3,n1)) {
  8535.             runKey(virtual-esc)
  8536.             equateNum(n0,n2)
  8537.             equateNum(n1,n3)
  8538.             gosub label(0)
  8539.         }
  8540.     }
  8541.     return
  8542. label(0)    .. subroutine to draw the box
  8543.     draw(n0,n1,   0,2,0)
  8544.     add(n54,n0,20)
  8545.     draw(n54,n1, -1,2,1)
  8546.     add(n53,n1,20)
  8547.     draw(n54,n53,-1,2,1)
  8548.     draw(n0,n53, -1,2,1)
  8549.     draw(n0,n1,  -1,2,1)
  8550. >
  8551.  
  8552. Example 2:  XOR a grating onto the window.  Erase it on the second execution.
  8553. <shft-esc:
  8554.     equateNum(n0,0)
  8555.     putmsg(n0)
  8556.     while (add(n0,n0,8) & genum(sWidth,n0)) {
  8557.         draw(n0,16,0,2,0)
  8558.         draw(n0,sHeight,0,2,1)
  8559.     } >
  8560.  
  8561. editBuf(B)
  8562. B:  list 2 (buffer)
  8563.  
  8564. Makes buffer B become curFile.  It displays B starting at the current sPage
  8565. location.  If sPage is at eof, it is moved to start-of-file.  Note that
  8566. editBuf() "falls through" to the next function in the command it is in.  If
  8567. you want the command to "hang up" until it has collected an input, use
  8568. inputString(B) to collect the input.
  8569.  
  8570. Display Action:  Displays B as the new curFile.
  8571.  
  8572. Example:  equateLoc(buf80,sPage,sFile) editBuf(buf80)
  8573.  
  8574. eqLoc(B,L1,L2)
  8575. B:  list 2 (buffer)
  8576. L1,L2:  list 6 (location)
  8577.  
  8578. Returns True, if locations L1 = L2 in buffer B.  If the locations are not
  8579. equal or if B does not exist, it returns False.
  8580.  
  8581. Example:  if (eqLoc(curFile,atCursor,sFile)) returnTrue
  8582.  
  8583. eqNum(N1,N2)
  8584. N1,N2:  list 10 (integer)
  8585.  
  8586. Returns True, if N1=N2.  Returns False, if they are not equal.
  8587.  
  8588. Example:  if (eqNum(0,curFile)) toggle(curFile) ..if buf0, toggle to next.
  8589.  
  8590. equateLoc(B,L1,L2)
  8591. B:  list 2 (buffer)
  8592. L1:  list 7 (location)
  8593. L2:  list 6 (location)
  8594.  
  8595. Sets location L1 = L2 in buffer B.  It returns False, if B does not exist or
  8596. L2 does not exist.
  8597.  
  8598. Cursor Action:  If L1=atCursor, the cursor moves to L2.
  8599.  
  8600. Example:  equateLoc(curFile,sHilite,eHilite) ..unmark hilite region.
  8601.  
  8602. equateNum(N1,N2)
  8603. N1,N2:  list 10 (integer)
  8604.  
  8605. N1 = N2.
  8606.  
  8607. Example:  equateNum(n0,curFile) ..n0 now has curFile's buffer number.
  8608.  
  8609. execute(B1,B2)
  8610. B1:  list 0  (buffer)
  8611. B2:  list 10 (text)
  8612.  
  8613. Sends text B2 to AmigaDOS using an Amiga Execute() function call.  DOS
  8614. executes the program in B2.  If no text result is desired from DOS, use a
  8615. blank literal "" as argument B1.  If a text result is desired, use a buffer
  8616. in B1, and the result is inserted at the cursor in B1.  It returns False, if
  8617. B2 is empty or does not exist, if B1 is a read-only buffer, or if B1 is a
  8618. buffer (thus results are asked for) and no temporary file can be opened for
  8619. the result from AmigaDOS.  The temporary file name is specified in the config
  8620. defaults.  Execute() returns the return code it gets from the Amiga, which is
  8621. normally True even when it shouldn't be.  So True returns may not be
  8622. meaningful, but False returns are probably meaningful.
  8623.  
  8624. Examples:  execute("","run myprog") ..no result wanted.
  8625. execute(buf53,buf54) ..run DOS cmd in buf54; get result in buf53.
  8626.  
  8627. fileRequest(B,T,F)
  8628. B:  list 2 (buffer)
  8629. T:  list 0 (text)
  8630. F:  list 10 (number)
  8631.  
  8632. Displays a file requester.  B cannot be curFile.  If B contains a directory,
  8633. it displays the directory in B.  If B is empty, it displays Uedit's current
  8634. directory.  It returns True only if a filename is selected.  If no directory
  8635. or file is selected, a "*" is put into B; otherwise, B is cleared and the
  8636. directory is put in line 1 in B and the file name is in line 2.  T is hailing
  8637. text for the file requester.  F is a flag, which some file requesters can use.
  8638. (fileRequest() uses the calling and argument protocol required by the Arp
  8639. file requester.  It is common for other file requesters to be compatible with
  8640. this protocol.)
  8641.  
  8642. Example:  fileRequest(buf54,"Select Directory and/or File",0)
  8643.  
  8644. fileSize(B,N)
  8645. B:  list 2 (buffer)
  8646. N:  list 10 (integer)
  8647.  
  8648. Puts buffer B's current size in integer variable N.  Returns False, if buffer
  8649. B does not exist.  If buffer B is fragmented, it is packed before the size is
  8650. computed.  This is a trade-off; if the size were calculated on a fragmented
  8651. buffer, fileSize() would run slower anyway.  Might as well use the time to
  8652. good purpose, so buffer B is packed if it needs it.  Use fileSize() when you
  8653. want to force a buffer to be packed.  For example, if a command does a large
  8654. number of inserts, it may be desirable to force the receiving buffer to be
  8655. packed now and then, to avoid an abort due to a memory shortage.
  8656.  
  8657. Example:  fileSize(curFile,n0) putMsg(n0) ..display size of curFile.
  8658.  
  8659. flipFlag(B,F)
  8660. B:  list 2 (buffer)
  8661. F:  list 14 (flag)
  8662.  
  8663. Flips the On/Off status of flag F in buffer B.  When F is a local flag, such
  8664. as WordWrap, if B does not exist, it returns False.  If F is a local flag and
  8665. a corresponding global flag exists, the global flag gets the local flag's new
  8666. value, On or Off.  When flag F is a global only flag, such as RowCol or Cram,
  8667. buffer B is ignored.  CRAM:  The display line spacings are recomputed and the
  8668. window is refreshed; if cram mode is turned on, text is crammed vertically by
  8669. removing 1 pixel from between lines of text.  LEARNMODE:  If not in learn
  8670.  
  8671. mode, it turns On learn mode.  If already in learn mode, learn is cancelled
  8672. and wiped.  The title bar is refreshed.  COLUMNAR:  Columnar display mode is
  8673. switched on/off and curFile's window is refreshed.  ROWCOL:  Page-row-column
  8674. display is turned on/off and the message line is refreshed (cleared).
  8675. MARKGADGETS:  MarkGadgets is turned on/off and the message line is refreshed.
  8676. TEACHKEYS:  TeachKeys mode is turned on and the title bar is refreshed.
  8677. LACE:  The lace variable is rotated to the next value in the range from 0 to
  8678. 3.  The screen is closed and reopened.  If lace=0, a 4-color non-interlace
  8679. screen (2 bitplanes) is used.  If lace=1, a 2-color non-interlace screen (1
  8680. bitplane) is used.  If lace=2, an interlace 4-color screen (2 bitplanes) is
  8681. used.  If lace=3, an interlace 2-color screen (1 bitplane) is used.  If flag
  8682. is OTHER (such as BUSIES):  The flag is flipped but no other action is taken.
  8683. (See getFlag(), upFlag(), downFlag(), and setLocal().  See toggle()
  8684. concerning scrollType, hideDisplay and trapMenus.)
  8685.  
  8686. Display Action:  See discussion above.
  8687.  
  8688. Example:  if (getFlag(buf0,changed)) flipFlag(buf0,changed)   .. turn off flag.
  8689.  
  8690. fold(T,F,R)
  8691. T: list 0 (buffer or literal)
  8692. F: list 2 (buffer)
  8693. R: list 12 (region)
  8694.  
  8695. Folds region R of buffer F into buffer T using the (up to 16) line-folding
  8696. tests defined with setFold().  If T already exists, it is erased before being
  8697. used.  If T is a literal (such as ""), a new file buffer is created and it
  8698. becomes curFile.  F's tab table is used in interpreting TABs in buffer F, and
  8699. T inherits the same tab table number.  The lines of text in F's region R
  8700. which pass the tests set up with setFold() are skipped or kept (copied into
  8701. T) according to the test's SKA value.  If a line's length exceeds 130
  8702. columns, only the first 130 columns are copied.  fold() returns FALSE, if no
  8703. folding tests have been defined with setFold() or if F or region R doesn't
  8704. exist.  (See Folds, 1.49.  Also see setFold() and getFold().)
  8705.  
  8706. Example:  Fold current file
  8707. <rAmiga-\:
  8708.     getFileName(buf54,curFile)
  8709.     insertRgn(buf54,eFile,".fold",all)
  8710.     if (fold("",curFile,all)) {
  8711.         setFileName(curFile,buf54)
  8712.         downFlag(curFile,changed)
  8713.     }
  8714. >
  8715.  
  8716. freeBuf(B)
  8717. B:  list 2 (buffer)
  8718.  
  8719. Frees buffer B.  It returns False, if B does not exist.  If B is curFile, the
  8720. "home" buffer becomes curFile.  If no other file buffer exists, it opens a
  8721. NoName buffer that becomes curFile; or if memory is too low to load in
  8722. NoName, an Empty buffer is opened.
  8723.  
  8724. Display Action:  Refreshes B's window, if any and not curFile.  If B=curFile,
  8725. displays new curFile.
  8726.  
  8727. fullRefresh
  8728.  
  8729. Refreshes the entire screen, including all split windows, except it does not
  8730. clear the message line.
  8731.  
  8732. gadgetName(N,B)
  8733. N:  list 10 (integer)
  8734. B:  list 0 (text)
  8735.  
  8736. The gadget name in buffer or literal B is assigned to gadget N, where N is 1
  8737. to 4.  It returns False, if N is out of range or B does not exist.  If B is a
  8738. buffer or blank literal "", the gadget name is cleared.  Otherwise, the first
  8739. 19 characters become the gadget name.  The message line is refreshed
  8740. (cleared).
  8741.  
  8742. Example:  gadgetName(1,"Next File")
  8743.  
  8744. geLoc(B,L1,L2)
  8745. B:  list 2 (buffer)
  8746. L1,L2:  list 6 (location)
  8747.  
  8748. Returns True, if location L1 >= L2 in buffer B.  It returns False, if B does
  8749. not exist or if L1 < L2.
  8750.  
  8751. Example:  if (geLoc(curFile,sHilite,eHilite)) putMsg("No hilite exists")
  8752.  
  8753. geNum(N1,N2)
  8754. N1,N2:  list 10 (integer)
  8755.  
  8756. Returns True, if N1 >= N2.  It returns False, if N1 < N2.
  8757.  
  8758. Example:  if (geNum(n0,1)) putMsg("Number is positive")
  8759.  
  8760. getBufAddr(N,B)
  8761. N:  list 10 (integer)
  8762. B:  list 2 (buffer)
  8763.  
  8764. Puts the memory address of buffer B into variable N.  It returns False, if B
  8765. does not exist.  (See attachBuf() and detachBuf().)
  8766.  
  8767. Example:  getBufAddr(n0,buf54)
  8768.  
  8769. getChar(N)
  8770. N:  list 10 (integer)
  8771.  
  8772. Gets the next character typed and puts it into variable N.  If function keys
  8773. are input, they are ignored and getChar() waits until a character is typed.
  8774. The character may be a control character.  While waiting, if prints or file-
  8775. saves are queued up, they continue to be processed.
  8776.  
  8777. Example:  getChar(n99) if (geNum(n99," ")) putMsg("Printable char")
  8778.  
  8779. getColors(B,C,Fg,Bg)
  8780. B: list 2
  8781. C,Fg,Bg: list 10 (numbers)
  8782.  
  8783. Gets the global and/or local colors.  C must be in the range 0-15 or else
  8784. equal -1.  If C is in the range 0-7, this corresponds to local colors; and if
  8785. B exists, the colors C for buffer B are fetched in Fg and Bg; but if B does
  8786. not exist or B is a literal "", the colors C that are fetched in Fg and Bg
  8787. are taken from the internal local color variable that newly created buffers
  8788. inherit.  If C is in the range 8-15, this corresponds to global (screen)
  8789. colors and B is ignored; the colors values for C are fetched in Fg and Bg.
  8790. In all cases, when C is in the range 0-15, the color values returned in Fg
  8791. and Bg will be in the range 0-3, corresponding to an RGB color register
  8792. number.
  8793.  
  8794. C=-1:  Here Fg and Bg are long word (32-bit) bitmasks containing all of the
  8795. local (buffer) and global (screen) colors, respectively.  (Again, if buffer B
  8796. doesn't exist or B is a literal, the local colors in Fg are a copy of the
  8797. internal color variable that is applied to newly created buffers.):
  8798.  
  8799.     The Fg bit masks, which apply to local colors, are as follows:  Each 4
  8800.     bits is 2 pairs of 2 bits, each with values 0-3 corresponding to the
  8801.     foreground and background colors, respectively.  The sets of 4 bits
  8802.     correspond (from left to right) to normal, cursor, hilite, cursor +
  8803.     hilite, invert, invert + cursor, hilite + invert, and cursor + hilite +
  8804.     invert.
  8805.  
  8806.     The Bg bitmasks, which apply to the global (screen) colors, are as
  8807.     follows:  Again, each 4 bits is 2 pairs of 2 bits, each with values 0-3
  8808.     corresponding to the foreground and background colors, respectively.  The
  8809.     sets of 4 bits correspond (from left to right) to title bar, msg line,
  8810.     menus, tab ruler, requester, formfeed, spare1, and spare2.
  8811.  
  8812. (See setColors(), setLocal(), and getLocal().)
  8813.  
  8814. getFileName(B1,B2)
  8815. B1,B2:  list 2 (buffer)
  8816.  
  8817. Gets the file name of buffer B2 and puts it into buffer B1.  It returns
  8818. False, if B2 does not exist or if B1 is curFile.  If B1 exists, it is freed
  8819. and reallocated before the file name is stored in it.
  8820.  
  8821. Example:  getFileName(buf54,curFile) ..get curFile's file name in buf54.
  8822.  
  8823. getFlag(B,F)
  8824. B:  list 2 (buffer)
  8825. F:  list 14 (flag)
  8826.  
  8827. Returns the True/False value of flag F for buffer B.  (See the notes for
  8828. flipFlag().)  If flag F is a local (buffer) flag and buffer B does not exist,
  8829. it returns False.  If F is a global flag, B is ignored.  If the flag's value
  8830. is non-zero, a True is returned.  If the flag is zero, a False is returned.
  8831.  
  8832. Example:  if (getFlag(curFile,columnar)) alertUser("Col display mode")
  8833.  
  8834. getFont(F,X,Y)
  8835. F: list 2
  8836. X,Y: list 10 (numbers)
  8837.  
  8838. gets the name of the current font and puts it into buffer F, gets the font
  8839. character-width and puts it into X, and gets the font-character height and
  8840. puts it into Y.  It always returns True.
  8841.  
  8842. getFold(T,F,X,B,SKA)
  8843. T,F,SKA:  list 10 (integer)
  8844. X: list 10 (integer variable or buffer)
  8845. B: list 2 (buffer)
  8846.  
  8847. Successive calls to getFold(), using testing step T values from 1 to 16,
  8848. fetch the testing steps that were set up with setFold() for the use of the
  8849. fold() function.  If T=0, the maximum step number in use is returned in T,
  8850. and the other arguments are ignored.  If T is between 1 and 16 (or the
  8851. maximum step number in use), the values used in step T are put into F, X, B,
  8852. and SKA.  The testing option number is put into F.  F is set to 0 and
  8853. getFold() returns FALSE, if step T is not in use.  If F<=7, the integer value
  8854. associated with test F (an indentation or line length) is put into X, and B
  8855. is ignored.  If F>=8, the 1 to 4 character string associated with test F is
  8856. put into buffer B; if F>=8, FALSE is returned if B is not a buffer. (See
  8857. Folds, 1.49.  Also see setFold() and fold().)
  8858.  
  8859. getGrep(B)
  8860. B:  list 2 (buffer)
  8861.  
  8862. Gets the current grep /search/replace/string and puts it into buffer B.  If B
  8863. is curFile, False is returned.  If B exists, it is freed and reallocated.
  8864. getGrep() delimits the search and replace strings using the most recently
  8865. used delimiter or '/' if none has been used.  (See setGrep() and grep().)
  8866.  
  8867. Example:  getGrep(buf54) putMsg(buf54) ..show current grep /search/replace/
  8868.  
  8869. getKey(N)
  8870. N:  list 10 (integer)
  8871.  
  8872. Gets the next input and puts its macro number into variable N.  If any prints
  8873. or file-saves are pending, they are processed while waiting for input.
  8874.  
  8875. Example:  getKey(n60) if (inUse(n60)) putMsg("This key has a command")
  8876.  
  8877. getKeyVal(N1,N2)
  8878. N1,N2:  list 10 (integer)
  8879.  
  8880. Gets the next input and puts its macro number into N1 and its ASCII character
  8881. value into N2.  If any prints or file-saves are pending, they are processed
  8882. while waiting for input.  If a non-character is input, such as a function
  8883. key, N2 is 0.  N1 receives a value in the range from 1 to 1148.  Control
  8884. characters may be input and are reported in N2.
  8885.  
  8886. Example:  getKeyVal(n0,n1)
  8887.           if (eqNum(n0,normal-a) & eqNum(n1,"A")) putMsg("CAPSLOCK is on")
  8888.           (Note:  The capsLock CL variable also indicates the state of the
  8889.           capslock key.)
  8890.  
  8891. getLocal(B,N,V)
  8892. B:  list 2 (buffer)
  8893. N:  list 10 (integer)
  8894. V:  list 3 (local value)
  8895.  
  8896. Gets the local value of V for buffer B and puts it into integer variable N.
  8897. It returns False, if B does not exist.  V=COLOR:  The 8 local colors are
  8898. stored in 4 bits for each color, which is 2 pairs of 2 bits corresponding to
  8899. Fg and Bg, respectively.  (See setLocal() for further information.)  V=LACE:
  8900. The global Lace value (display mode, 0 to 3) is reported.  See setLocal() for
  8901. more information.  (See toggle() and flipFlag() for a description of the 4
  8902. display modes for Lace.)
  8903.  
  8904. Examples:
  8905. getLocal(buf99,tabTable,tabTable)   .. sets global tabTable to buf99's local value.
  8906. getLocal(curFile,n20,lineLength)   .. puts curFile's local lineLength into n20.
  8907. getLocal(curFile,n54,lace)   .. get the global lace value
  8908.  
  8909. getMaxFiles(N)
  8910. N:  list 10 (integer)
  8911.  
  8912. Gets the current MaxFiles setting and puts it into integer N.  (See
  8913. setMaxFiles().)
  8914.  
  8915. Example:  getMaxFiles(n60) putMsg(n60)
  8916.  
  8917. getPageRowCol(P,R,C)
  8918. P,R,C:  list 10 (integer)
  8919.  
  8920. Gets the page-row-column of the cursor location in curFile and reports it in
  8921. P, R, and C.  The page referred to is a printed page, not a window page, and
  8922. it is based on curFile's local lines-per-page value (pageLines).  Formfeeds
  8923. in curFile are considered as page boundaries.
  8924.  
  8925. Display Action:  Refreshes cursor line; centers cursor, if cursor offscreen.
  8926.  
  8927. Example:  getPageRowCol(n0,n1,n2)
  8928.  
  8929. getRGB(R0,R1,R2,R3)
  8930. R0,R1,R2,R3: list 10 (numbers)
  8931.  
  8932. Gets the current RGB color register contents.  The RGB color values in each
  8933. color register argument are in the rightmost 12 bits, 4 bits to each color.
  8934. getRGB() always returns True.  Example:  If R0 = 0xf48, it means Red=15
  8935. (0xf), Green=4, and Blue=8.
  8936.  
  8937. getSearch(B)
  8938. B:  list 2 (buffer)
  8939.  
  8940. Gets the current search string and stores it in buffer B.  It returns False,
  8941. if no search string has been defined or if B is curFile.  If B exists, it is
  8942. freed and reallocated before the search string is stored in it.  The search
  8943. string reported in B
  8944.  
  8945. contains eitherOr and allBut delimiters and wildcards, if they were used in
  8946. defining the search string originally.  Note:  If wildCard or multiWild is
  8947. changed before calling getSearch(), the search string in B still uses the old
  8948. wildcards.  If the eitherOr or allBut delimiter is changed, however, the
  8949. search string in B uses the new delimiters.  (See search() and setSearch().)
  8950.  
  8951. Example:  getSearch(buf49) putMsg(buf49) ..display current search string.
  8952.  
  8953. getSerialNum(N)
  8954. N:  list 10 (integer)
  8955.  
  8956. Puts the serial number of your copy of Uedit into integer variable N.
  8957.  
  8958. Example:  getSerialNum(n54) putMsg(n54) ..display serial number.
  8959.  
  8960. getSplitLines(N1,N2)
  8961. N1,N2:  list 10 (integer)
  8962.  
  8963. Reports the active window split's beginning and ending line numbers in N1 and
  8964. N2.  These are window line numbers, unrelated to the text in the window.
  8965.  
  8966. Example:  getSplitLines(n0,n1)
  8967.  
  8968. getStackSize(B,N,S)
  8969. B,N,S:  list 10 (integer)
  8970.  
  8971. Reports the current buffer stack size in B, the current number stack size in
  8972. N, and the current save-file stack size in S.
  8973.  
  8974. Example:  .. get size of buffer stack 22 in n11 & number stack 99 in n12
  8975. equateNum(n11,22) equateNum(n12,99) getStackSize(n11,n12,n13)
  8976.  
  8977. getTabs(B,N)
  8978. B:  list 2 (buffer)
  8979. N:  list 10 (integer)
  8980.  
  8981. Reports the tab columns of tab ruler N in buffer B in text format.  N must be
  8982. 0 to 4.  The tab columns are in printable text format, separated by one
  8983. space.  Example:  "5 9 13 17".  getTabs() is provided so that you can send
  8984. the tab settings to your printer.  getTabs() returns False, if N is out of
  8985. range.
  8986.  
  8987. Example:  getLocal(curFile,n0,tabTable) ..get curFile's tab ruler number.
  8988. getTabs(curFile,n0) ..insert the tab ruler's tabstops at the cursor in
  8989. curFile.
  8990.  
  8991. gotoPage(B,N)
  8992. B:  list 2 (buffer)
  8993. N:  list 10 (integer)
  8994.  
  8995. Moves the cursor in buffer B to page N.  It returns False, if N <= 0 or if
  8996. page N does not exist.  If page N does not exist, cursor is at eof.  Pages
  8997. are computed using B's local lines-per-page (pageLines) value; but formfeeds
  8998. in buffer B count as page dividers.
  8999.  
  9000. Cursor Action:  The cursor is moved to the start of page N.
  9001.  
  9002. Display Action:  Refreshes cursor, if B=curFile; centers cursor, if offscreen.
  9003.  
  9004. Example:  if (not gotoPage(curFile,n40)) putMsg("Page doesn't exist")
  9005.  
  9006. gotoSplit(B)
  9007. B:  list 2 (buffer)
  9008.  
  9009. Makes the split window with buffer B in it the active window split and B
  9010. becomes curFile.  If there are two split windows with B in them, one being
  9011. the active window split, the other split is activated.  It returns False, if
  9012. there is no split window containing B.
  9013.  
  9014. Display Action:  Refreshes the new curFile.
  9015.  
  9016. Example:  gotoSplit(buf37) ..activate split with copied columnar in it.
  9017.  
  9018. grep(B,R,F)
  9019. B:  list 2 (buffer)
  9020. R:  list 12 (region)
  9021. F:  list 10 (integer)
  9022.  
  9023. Does a grep search in buffer B starting at the cursor, using the current
  9024. search and replace strings that were set with setGrep().  It returns False if
  9025. the search fails.  If a match is found, the cursor is placed at the start of
  9026. the matched area and the area is marked using region R's loc variables; for
  9027. instance, if R is hilite, the matched area is hilited.  (In backward
  9028. searches, the cursor is placed at the end of the matched area.)  If F=0 or 1,
  9029. a forward search is done.  If F=-1, a backward search is done.  If F=2, a
  9030. forward search and replace are done.  If F=-2, a backward search and replace
  9031. are done.  When no replace string exists, if F=2 or F=-2 the matched area is
  9032. cleared.  Replace strings may include matched REs \1 to \9 from the search
  9033. string, so the size of the actual replace text is unknown until a match is
  9034. found; then a 1k block of memory is allocated and the replace text is stacked
  9035. into it; it is then inserted into buffer B after the matched area has been
  9036. cleared.  If the actual replace text exceeds 1k bytes, no replace is done and
  9037. grep() returns False.  grep() uses searchCaps to determine upper/lower case
  9038. sensitivity; if searchCaps is False, case is ignored.  Note that grep() is
  9039. slower than search() for simple search strings (no wildcards or special
  9040. symbols), so grep() should only be used when the requirements call for it.
  9041. When a complex search string is required (search() cannot be used) and a
  9042. large replace is required but referencing REs in the replace string is not
  9043. required, grep() can be used for the search and clearRgn() and insertRgn()
  9044. used for the replace; this handles replace text of any amount up to the limit
  9045. of available memory.  (See setGrep() and getGrep().  See grep commands in
  9046. Config!H.)
  9047.  
  9048. Display Action:  Refreshes the cursor line.
  9049. Cursor Action:  Puts the cursor at start of matched area.
  9050.  
  9051. Example:  grep(curfile,invert,1) ..search forward, don't replace
  9052.  
  9053. gtLoc(B,L1,L2)
  9054. B:  list 2 (buffer)
  9055. L1,L2:  list 6 (location)
  9056.  
  9057. Returns True, if location L1 > L2 in buffer B.  Returns False, if B does not
  9058. exist or L1 <= L2.
  9059.  
  9060. Example:  if (gtLoc(curfile,eInvert,sInvert)) refreshDisplay ..region exists.
  9061.  
  9062. gtNum(N1,N2)
  9063. N1,N2:  list 10 (integer)
  9064.  
  9065. Returns True, if N1 > N2.  Returns False, if N1 <= N2.
  9066.  
  9067. Example:  if (gtNum(lineLength,77)) equateNum(lineLength,77) ..set global.
  9068.  
  9069. hexDecimal(B)
  9070. B:  list 2 (buffer)
  9071.  
  9072. Converts the number at the cursor in buffer B from hexadecimal to decimal or
  9073. vice versa.  The cursor must be at the start of the number; if it is not, the
  9074. number is not converted correctly.  If it is a minus decimal number, the
  9075. cursor should be on the "-" minus sign.  If the number is hexadecimal, the
  9076. number must begin with "0x" and the cursor must be on the "0".  The
  9077. conversion does not move the cursor.  It returns False, if B does not exist,
  9078. if B is read-only, if the cursor is not resting on a digit or a minus sign "-
  9079. ", or if the number is not a valid decimal or hex number.
  9080.  
  9081. Display Action:  If B=curFile, refreshes cursor; centers cursor, if offscreen.
  9082.  
  9083. Example:  hexDecimal(curFile) ..convert hex/dec at cursor in curFile.
  9084.  
  9085. hScroll(D)
  9086. D:  list 10 (direction)
  9087.  
  9088. Scrolls display horizontally.  If D>0, it scrolls toward end-of-line by
  9089. amount D.  If D<0, it scrolls toward start-of-line by amount D.  It returns
  9090. False, if trying to scroll past start-of-line or if D=0.  Scrolling toward
  9091. end-of-line is limited to 32767 columns.
  9092.  
  9093. Display Action:  Refreshes curFile.
  9094.  
  9095. Example:  while (hScroll(-1)) nothing ..scroll to start-of-line.
  9096.  
  9097. hyper(B,W,I,F)
  9098. B:    list 2 (buffer)
  9099. W:    list 0 (text)
  9100. I,F:  list 10 (integer)
  9101.  
  9102. Fetches hyper word W's (or index I's hyper word) descriptive text, doing the
  9103. lookup based on flag F.  B cannot be curFile.  W may be empty; if W contains
  9104. a (presumed hyper) word or phrase, the first 17 bytes are used for the
  9105. lookup; any extra bytes are ignored.  Hyper words have an associated lookup
  9106. table index value in the range 0 to N-1, where N is the number of hyper words
  9107. defined in the hyper text file.  Thus a hyper word may be referenced by the
  9108. word itself or by its table index I.  The first hyper word has index=0 and is
  9109. the parent or grandparent etc of all other hyper words.  Hyper words each
  9110. have a parent (except the one at index=0) and may have children and any
  9111. number of siblings.  The lookup methods available are the following:
  9112.  
  9113.     If W is empty:
  9114.         if F=0,  look up the hyper word at index I.
  9115.         if F=1,  look up the parent of I.
  9116.         if F=2,  look up the child of I.
  9117.         if F=3,  look up the next sibling of I.
  9118.         if F=4,  look up the prev sibling of I.
  9119.         if F=5,  step backward thru lookup history.
  9120.     If W is not empty:
  9121.         if F=0,  find word W by starting at front of lookup table (I=0).
  9122.         if F=1,  find word W by scanning the lookup table starting at I.
  9123.         if F=2,  find word W using an algorithm starting at I.
  9124.  
  9125. The algorithm, given a current table index I, is to search through the:
  9126.     A. children of I     (immediate, not grand children etc)
  9127.     B. siblings of I     (words with same parent as the I word)
  9128.     C. parent of I and parent's siblings
  9129.     D. grandparent of I and grandparent's siblings, and so on.
  9130.  
  9131. Upper/lower case is ignored in hyper words.  If the hyper() lookup is
  9132. successful, True is returned, the hyper word's descriptive text is put into
  9133. buffer B, the hyper word is copied into buffer B's name (title) field, and
  9134. its lookup table index is put into integer variable I.  hyper() returns
  9135. False, if hyper text is not open, if B cannot be allocated, if B is curBuf,
  9136. if flag F is invalid, or if the lookup is unsuccessful.
  9137.  
  9138. hyperClose
  9139.  
  9140. Closes hyper text and returns True, if hyper text is currently open.
  9141.  
  9142. hyperOpen(H,T,F)
  9143. H,T:  list 0  (text)
  9144. F:    list 10 (integer)
  9145.  
  9146. Opens hyper text for hyper text file H with lookup table T based on flag F.
  9147. In all cases, table T resides in memory.  If F=0, H is also loaded into
  9148. memory; if unable to load it, False is returned.  If F=1, an attempt is made
  9149. to load H; if no memory, it is accessed on disk.  If F=2, H is not loaded but
  9150. is accessed on disk.  False is returned, if unable to find H or T or if there
  9151. is insufficient memory.  Warning:  If you edit a hyper text file, you must
  9152. rebuild its table using the program UHC (Uedit Hyper Create), because the
  9153. table stores byte offsets to hyper words in the hyper text file.
  9154.  
  9155. Example:  hyperOpen("HyperSample","HyperSample.tbl",1) .. load into memory if
  9156. can
  9157.  
  9158. hyperUp
  9159.  
  9160. Returns True, if hyper text is currently open.
  9161.  
  9162. incLoc(B,L)
  9163. B:  list 2 (buffer)
  9164. L:  list 7 (location)
  9165.  
  9166. Increments location L in buffer B.  It returns False, if B does not exist or
  9167. if L is already at eof.
  9168.  
  9169. Cursor Action:  Advances cursor, if L=atCursor.
  9170.  
  9171. Example:  if (eqLoc(curFile,atCursor,sFile)) incLoc(curFile,atCursor)
  9172.  
  9173. incNum(N)
  9174. N:  list 10 (integer)
  9175.  
  9176. Increments the value of integer variable N.  It returns False, when N going
  9177. in is 0, but N is incremented regardless.  (See decNum().)
  9178.  
  9179. Example:  equateNum(n0,-10)  while (incNum(n0)) incLoc(curFile,atCursor)
  9180.  
  9181. indexToLoc(B,L,I)
  9182. B:  list 2 (buffer)
  9183. L:  list 7 (location)
  9184. I:  list 10 (integer)
  9185.  
  9186. Sets location L to byte-index I of buffer B relative to start-of-file.  If
  9187. buffer B is fragmented, it is packed.  (See fileSize().)  It returns False,
  9188. if B does not exist, if I <= 0, or if I > buffer-size.  If I > buffer-size,
  9189. location L is moved to eof.
  9190.  
  9191. Cursor Action:  Moves cursor to byte-index I, if L=atCursor.
  9192.  
  9193. Display Action:  If B=curFile:  Refreshes window, if L is not atCursor.  If
  9194. L=atCursor, refreshes cursor; if offscreen, centers cursor.
  9195.  
  9196. Example: indexToLoc(curFile,atCursor,1000) ..move cursor to 1000 bytes into
  9197. file.
  9198.  
  9199. inputKey(N)
  9200. N:  list 10 (integer)
  9201.  
  9202. Collects the next input's macro number in variable N, if an input has been
  9203. given.  It returns False, if no input is available.  It does not wait for an
  9204. input.
  9205.  
  9206. Example:  while (inputKey(n0)) push(n0) ..save keys on number stack.
  9207.  
  9208. inputNum(N)
  9209. N:  list 10 (integer)
  9210.  
  9211. Solicits a number input for integer variable N using Primitive Mode.  The
  9212. title bar displays the message "Primitive Mode number input (pmEsc=done):".
  9213. Primitive Mode is terminated using the current pmEsc character or a mouse
  9214. click.  If anything is typed, it returns True.  If nothing is typed, it
  9215. returns False.  The number may be typed in using decimal or hexadecimal.
  9216. Primitive Mode input may be aborted with Amiga-ESC.
  9217.  
  9218. Display Action:  Uses the top line(s) in the window.  Refreshes window
  9219. afterward.
  9220.  
  9221. Example:  putMsg("Input new line-length:")
  9222.     if (inputNum(n54) & gtNum(n54,10)) {
  9223.         setLocal(curFile,lineLength,n54)   .. set curFile's line length.
  9224.         equateNum(lineLength,n54)   .. set the global value as well.
  9225.     }
  9226.  
  9227. inputString(B)
  9228. B:  list 2 (buffer)
  9229.  
  9230. Solicits a string input in buffer B using Primitive Mode.  The title bar
  9231. displays the message "Primitive Mode string input (pmEsc=done):".  Primitive
  9232. Mode is terminated using the current pmEsc character or a mouse click.  If
  9233. anything is typed, it returns True.  If nothing is typed or B is curFile, it
  9234. returns False.  inputString() may be aborted with Amiga-ESC.
  9235.  
  9236. Display Action:  Uses the top line(s) in the window.  Refreshes window
  9237. afterward.
  9238.  
  9239. Example:  putMsg("Input new search text:")   .. get new search string.
  9240. if (inputString(buf49)) setSearch(buf49)
  9241.  
  9242. inputWaiting
  9243.  
  9244. Returns True, if an input is waiting to be picked up.  It returns False, if
  9245. no inputs have been given.  When inputWaiting is called in a learned
  9246. sequence, it always returns True; if it did not, learned sequences would not
  9247. run as if they were just being typed in.
  9248.  
  9249. Example:  while (not inputWaiting) { vScroll(downLine) updateDisplay }
  9250.  
  9251. insertChar(B,N)
  9252. B:  list 2 (buffer)
  9253. N:  list 9 (character)
  9254.  
  9255. Inserts character N into buffer B at the cursor.  It returns False, if B is
  9256. read-only, or if N is an illegal character and the MapChars flag is not On
  9257. for buffer B.  If N is illegal (ASCII 0-3) and MapChars is On for B, the
  9258. character is mapped into a legal character according to the mapping table in
  9259. the config defaults.  (See swapChar() and typeChar().)
  9260.  
  9261. Display Action:  Refreshes window, if any and not curFile.  If B=curFile,
  9262. refreshes cursor; if offscreen, centers cursor.
  9263.  
  9264. Example:  insertChar(curFile,"*") insertChar(curFile,13) ..insert "*" and CR.
  9265.  
  9266. insertFile(B1,L,B2)
  9267. B1:  list 2 (buffer)
  9268. L:  list 6 (location)
  9269. B2:  list 10 (text)
  9270.  
  9271. Inserts the file named in B2 into buffer B1 at location L.  It returns False,
  9272. if the file named in B2 does not exist or if buffer B1 is Read-Only.  B1 is
  9273. allocated, if it does not exist.  Illegal characters (ASCII 0-3) are mapped
  9274. on loading in the file, if MapChars is On for B1.  If B1's MapChars is not On
  9275. and there are illegal characters, you will be asked whether they can be wiped
  9276. or not.  If you answer Yes, illegals are converted to "@".  If you answer No,
  9277. insertFile() quits and returns False.  If memory runs out during
  9278. insertFile(), if there are file-saves in the queue, they are finished in
  9279. hopes that it will free up enough memory.  If all file-saves have been
  9280. finished and there is still not enough memory, it returns False, having only
  9281. partially inserted the file.
  9282.  
  9283. Display Action:  Refreshes B1's window, if in a window.
  9284.  
  9285. Example:  insertFile(curFile,eFile,"MyLetterEnding")
  9286.  
  9287. insertRgn(B1,L,B2,R)
  9288. B1:  list 2 (buffer)
  9289. L:  list 6 (location)
  9290. B2:  list 0 (buffer)
  9291. R:  list 12 (region)
  9292.  
  9293. Inserts region R of buffer B2 into buffer B1 at location L.  It returns
  9294. False, if B2 does not exist, if region R is empty, if B1 is read-only, or if
  9295. B1=B2.  If B2 is a literal, R is a dummy and ignored.
  9296.  
  9297. Display Action:  Refreshes B1's window, if any and not curFile.  If
  9298. B1=curFile, refreshes cursor; if offscreen, centers cursor.
  9299.  
  9300. Example:  insertRgn(buf54,eFile,curFile,hilite) ..store hilite in buf54.
  9301.  
  9302. inTiny
  9303.  
  9304. returns TRUE, if Uedit is in tiny window.
  9305.  
  9306. inUse(K)
  9307. K:  list 10 (integer)
  9308.  
  9309. Returns True, if key K has a command attached to it.  K must be a valid key
  9310. argument or macro number in the range 1 to 1148.  It returns False, if K has
  9311. no command.
  9312.  
  9313. Example:  getKey(n0) if (inUse(n0)) putMsg("Key has a command")
  9314.  
  9315. is(B,T)
  9316. B:  list 2 (buffer)
  9317. T:  list 11 (thing)
  9318.  
  9319. Tests the character/word/line/location of the cursor in buffer B for some
  9320. condition.  (See argument list 11 in 3.1.)  It returns False, if B does not
  9321. exist.  Otherwise, it returns True or False, based on test results.  Note
  9322. that sForm/eForm refer to start/end of printed page, whereas sPage/ePage
  9323. refer to the window boundaries.  is(buf,eLine) returns True, when cursor is
  9324. at eof or at end-of-line either one.
  9325.  
  9326. Example:
  9327.     while (not is(curFile,whiteSpace)) {
  9328.         if (is(curFile,".")) return
  9329.         moveCursor(curFile,eChar)
  9330.     }
  9331.  
  9332. isEmpty(B)
  9333. B:  list 2 (buffer)
  9334.  
  9335. Returns True, if buffer B is empty or does not exist.  Returns False, if B
  9336. exists and has content.
  9337.  
  9338. Example:  if (not isEmpty(buf54)) setSearch(buf54)
  9339.  
  9340. killKey(K)
  9341. K:  list 10 (integer)
  9342.  
  9343. Kills the command of key K.  K must be a valid key argument or macro number
  9344. from 1 to 1148.  If K has a command, the command is deleted and it returns
  9345. True.  It returns False, if K is out of range or has no command.  If K is the
  9346. Startup key, the menus are deleted.  If K is the current key running, the
  9347. engine executes an Abort right after K is deleted.
  9348.  
  9349. Example:  getKey(n99)   if (killKey(n99)) putMsg("Command deleted")
  9350.  
  9351. lineToLoc(B,L,N)
  9352. B:  list 2 (buffer)
  9353. L:  list 7 (location)
  9354. N:  list 10 (integer)
  9355.  
  9356. Moves location L of buffer B to the beginning of line number N in the buffer.
  9357. It returns False, if B does not exist, if N <= 0, or if line N is beyond eof.
  9358. If N is at or beyond eof, location L is moved to eof.
  9359.  
  9360. Cursor Action:  Moves cursor to line N, if L=atCursor.
  9361.  
  9362. Display Action:  If B=curFile and L=atCursor, refreshes cursor; centers
  9363. cursor, if offscreen.
  9364.  
  9365. Example:  lineToLoc(curFile,atCursor,100) ..move cursor to line 100.
  9366.  
  9367. loadConfig(B)
  9368. B:  list 10 (text)
  9369.  
  9370. Loads the data file named in B.  ("loadConfig" is a misnomer; it is not a
  9371. config file being loaded in but rather a data file.)  It returns False, if
  9372. the file named in B does not exist, or if the data file has the wrong Uedit
  9373. version number.  When the data file is loaded in, an Abort is executed,
  9374. stopping all activity in Uedit.  This is necessary because the command being
  9375. run is deleted before the new data is loaded in.  The window is closed and
  9376. reopened using the values in the new data file.
  9377.  
  9378. Display Action:  Window is closed and reopened.
  9379.  
  9380. Example: loadConfig("S:Data!")  ..load data file.  Aborts if successful.
  9381.  
  9382. loadFile(B)
  9383. B:  list 10 (text)
  9384.  
  9385. Loads the file named in B into the next available file buffer.  The new file
  9386. becomes curFile.  It returns False, if B is a buffer and it does not exist or
  9387. if all file buffers are in use.  If the file named in B does not exist, an
  9388. empty buffer is opened with the name given in B.  If the file already exists
  9389. in Uedit, a requester asks if you want to load a ReadOnly copy of it.  The
  9390. load may be aborted with Amiga-ESC.  If memory runs out during the load and
  9391. there are file-saves in the queue, they are finished in an effort to free up
  9392. enough memory.  If no file-saves are pending and memory runs out, the load is
  9393. aborted and the partially loaded file is erased from memory.  Note that
  9394. insertFile() will load part of a file that is too big for memory, but
  9395. loadFile() will not.
  9396.  
  9397. Display Action:  Displays new curFile.
  9398.  
  9399. Example:  if (inputString(buf54)) loadFile(buf54)   .. get name, load file.
  9400.  
  9401. loadKeys(B,K1,K2)
  9402. B:  list 10 (text)
  9403. K1,K2:  list 10 (integer)
  9404.  
  9405. Loads a range of key commands from the partial data file named in B.  It
  9406. returns False, if K1<1 or K1>1148, if the partial data file is not found, or
  9407. if no key in the range specified is found.  If K2<K1, it sets K2=K1.  If
  9408. K2>1148, it sets K2=1148.  If the Startup command is loaded in, the menus are
  9409. removed and are rebuilt using the new Startup command during the next pause.
  9410. Keys loaded in replace their existing counterparts in memory.  Blank
  9411. (unassigned) keys may be stored with saveKeys() and loaded in with loadKeys()
  9412. also, and when loaded in they wipe out their existing counterparts in memory.
  9413. Keys may be saved multiple times in a partial data file using saveKeys().  If
  9414. multiple copies of a key are in the partial data file, only the last version
  9415. of the key is picked up by loadKeys().  Keys in memory that fall into the
  9416. specified range but which do not exist in the partial data file are not
  9417. affected.  To load in every key in the partial data file, specify K1=1 and
  9418. K2>=1148.  loadKeys() can load in one key at a time, but it is more efficient
  9419. when all keys are loaded at the same time by specifying a range, because it
  9420. opens, reads, and closes the partial data file each time it is used.  (See
  9421. saveKeys().)
  9422.  
  9423. Examples:
  9424.     loadKeys("pData",normal-f1,normal-f10)   .. load function keys.
  9425.     loadKeys("pData",Startup,0)   .. load in just the Startup command.
  9426.     loadKeys("pData",1,2000)   .. load in all keys in pData.
  9427.  
  9428. loadLearn(B)
  9429. B:  list 10 (text)
  9430.  
  9431. Loads the learned sequence named in B.  It looks first in the current
  9432. directory, and then, if necessary, in the S: directory.  It returns False, if
  9433. Learn Mode is active, if a learned sequence is currently being executed, or
  9434. if the named learned sequence is not found or is empty.  (See saveLearn() and
  9435. runLearn.)
  9436.  
  9437. Example:  if (loadLearn("myHeader")) runLearn ..auto-type letter header.
  9438.  
  9439. loadState(B)
  9440. B: list 10 (text)
  9441.  
  9442. Loads the state file specified in buffer or literal B.  A state is a
  9443. "snapshot" of Uedit's current state, which includes all files and buffers
  9444. along with their local flags, the cursor locations, colored regions, search
  9445. and replace and grep strings, and so on.  Also included are the split window
  9446. configuration and color settings.  When you load a state file, the "state" of
  9447. Uedit is just as it was when the state file was saved earlier with
  9448. saveState().  loadState() can be aborted with Amiga-ESC; if told to abort, it
  9449. finishes loading the current file or buffer before aborting.  loadState()
  9450. compares the dates-times of each file in the state file with the file copy on
  9451. disk, if any; if the copy on disk is newer, loadState() flags the file as
  9452. ReadOnly.  Note: The state file does not store commands or learned sequences;
  9453. these can be stored separately in disk files.
  9454.  
  9455. Cursor action:  As noted.
  9456. Display action:  As noted.
  9457.  
  9458. locToCol(B,C,L)
  9459. B:  list 2 (buffer)
  9460. C:  list 10 (integer)
  9461. L:  list 6 (location)
  9462.  
  9463. Reports the column C of location L in buffer B.  It returns False, if B does
  9464. not exist.
  9465.  
  9466. Example:  locToCol(curFile,n54,sHilite) putMsg(n54)
  9467.  
  9468. locToIndex(B,I,L)
  9469. B:  list 2 (buffer)
  9470. I:  list 10 (integer)
  9471. L:  list 6 (location)
  9472.  
  9473. Reports the byte-index I into buffer B of location L.  It returns False, if B
  9474. does not exist.  If B is fragmented, it is packed before the index is
  9475. calculated.
  9476.  
  9477. Example:  locToIndex(curFile,n54,mouseLoc) putMsg(n54)
  9478.  
  9479. locToLine(B,N,L)
  9480. B:  list 2 (buffer)
  9481. N:  list 10 (integer)
  9482. L:  list 6 (location)
  9483.  
  9484. Reports the line number N in buffer B of location L.  Note that N is the text
  9485. line number in B, not the screen or page line number.  It returns False, if B
  9486. does not exist.
  9487.  
  9488. Example:  locToLine(curFile,n54,atCursor) putMsg(n54) ..report cursor line.
  9489.  
  9490. menu(D,A,N,C)
  9491. D,A:  literal
  9492. N,C:  list 10 (integer)
  9493.  
  9494. Creates a menu selection.  Description D and alternate text A must be a
  9495. literal in quotes up to 17 characters in length.  N is the menu number, 1 to
  9496. 7.  C is the command-key, which must be a valid key argument or a macro
  9497. number, 1 to 1148.  It returns False, if N or C is out of range, if no memory
  9498. is available, if there are already 20 menu items for menu N, or if the
  9499. command for C does not exist.  menu() may only be used in the Startup
  9500. command.  (See Config! for examples.)
  9501.  
  9502. mod(A,B,C)
  9503. A,B,C:  list 10 (integer)
  9504.  
  9505. A = B mod C.  It returns False, if C=0.
  9506.  
  9507. Example:  mod(n54,n53,10) if (eqNum(n54,0)) return
  9508.  
  9509. mouseDown
  9510.  
  9511. Returns True, if the left mouse button is down.  Returns False, if it is not.
  9512. MouseLoc in curFile is updated when the mouse button is pressed or released.
  9513. To get continuous updating of mouseLoc, use trackMouse.  If trapMenus is
  9514. True, mouseDown also returns True if the right (menu) mouse button is
  9515. pressed.  (See mouseXY() and trackMouse.)
  9516.  
  9517. Example:  if (not mouseDown) return
  9518.  
  9519. mouseXY(X,Y)
  9520. X,Y:  list 10 (integer)
  9521.  
  9522. Reports the x-y position of the mouse when the left (or right, if trapMenus
  9523. is True) mouse button was last pressed or released.  The x-y position is
  9524. updated continuously, if trackMouse is used while the button is held down.
  9525. (See mouseDown and trackMouse.)
  9526.  
  9527. Example:
  9528.     while(mouseDown & not inputWaiting) {
  9529.         trackMouse
  9530.         mouseXY(n50,n51)
  9531.         putMsg(n51)   .. report mouse Y position.
  9532.     }
  9533.  
  9534. moveCursor(B,H)
  9535. B:  list 2 (buffer)
  9536. H:  list 4 (how)
  9537.  
  9538. Moves the cursor in buffer B according to H.  It returns False, if B does not
  9539. exist, or if unable to move the cursor due to start or end of file.  Note
  9540. that sPage/ePage refer to the window's boundaries, while sForm/eForm refer to
  9541. printed page boundaries based on the line-count or formfeeds in the text.
  9542.  
  9543. Display Action:  If B=curFile, refreshes cursor; centers cursor, if offscreen.
  9544.  
  9545. Example:  if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  9546.  
  9547. mul(A,B,C)
  9548. A,B,C:  list 10 (integer)
  9549.  
  9550. A = B * C.
  9551.  
  9552. Example: mul(n54,lineLength,pageLines) putMsg(n54) ..show max chars per page.
  9553.  
  9554. nameBuffer(B,N)
  9555. B:  list 10 (buffer)
  9556. N:  literal
  9557.  
  9558. Assigns the name N to buffer B.  It returns False, if name N is empty or
  9559. begins with a whitespace character, if buffer B is a file buffer, or if name
  9560. N is longer than 63 characters.  Buffer B need not exist at the time.  N must
  9561. be a literal.  nameBuffer() is used for naming work buffers (non-file
  9562. buffers) so that when they are displayed, such as in split windows, they are
  9563. named descriptively.  nameBuffer() may only be used in the Startup command.
  9564.  
  9565. Example:  nameBuffer(buf37,"Copied columnar data")
  9566.  
  9567. newFile
  9568.  
  9569. Opens an empty file buffer named Empty.
  9570.  
  9571. nothing
  9572.  
  9573. Returns True, doing nothing.  It is useful with while-loops.
  9574.  
  9575. Examples:  while (hScroll(-1)) nothing
  9576. while (nothing) {
  9577.     if (inputKey(n99)) goto label(10)
  9578.     vScroll(upLine)
  9579.     updateDisplay
  9580. }
  9581.  
  9582. onScreen(L)
  9583. L:  list 6 (location)
  9584.  
  9585. Returns True, if location L in curFile is in the window.  onScreen() applies
  9586. only to curFile.  It returns False, if L is not in the window.  It is not a
  9587. rigorous test, because accuracy was sacrificed for speed, but it is usually
  9588. accurate.  The purpose of onScreen() is to avoid unnecessary screen refreshes.
  9589.  
  9590. Example:  if (not onScreen(atCursor)) vScroll(atCursor) .. don't scroll
  9591. unless must.
  9592.  
  9593. or(A,B,C)
  9594. A,B,C:  list 10 (integer)
  9595.  
  9596. A = B bitwise-or C.  It returns False, if the result A = 0, meaning that
  9597. there are no bits set in either B or C.
  9598.  
  9599. Example:  or(n99,userGlobalA,userGlobalB)
  9600.  
  9601. pop(S,BN)
  9602. S,BN:  list 10 (buffer or number)
  9603.  
  9604. Pops the next item from stack S into buffer or number variable BN.  Returns
  9605. False if stack S is empty.  If S is a buffer variable such as buf10, buffer
  9606. stack 10 is used; if S is a number variable such as N22, number stack 22 is
  9607. used.  The stack is popped into variable BN.  If a buffer is popped off a
  9608. buffer stack the current buffer BN is deleted and the stack is popped into
  9609. buffer variable BN.  Note that the stack is LIFO, last-in-first-out.  (See
  9610. getStackSize(), push(), and rollStack().)
  9611.  
  9612. Display Action:  Displays "home" buffer, if pop into curFile.
  9613.  
  9614. Example:  pop(n22, pageLines) .. pop number stack 22 into pageLines variable.
  9615. pop(buf99, buf3) .. pop buffer stack 99 into buf3 slot, killing old buf3.
  9616.  
  9617. print(B,R)
  9618. B:  list 0 (text)
  9619. R:  list 12 (region)
  9620.  
  9621. Prints region R of buffer B, using the current setting of prefPrint (Print
  9622. Select).  If B is a literal, R is a dummy and is ignored.  Up to 12 prints
  9623. may be queued up, allowing continued editing while printing is processed in
  9624. the background.  If 12 prints are already queued up, print() processes the
  9625. printing until a slot in the queue opens up; this waiting may be aborted with
  9626. Amiga-ESC.  If the print job is too big to copy into memory and spooled
  9627. prints are in the queue, the spooled prints are processed in hopes of finding
  9628. enough memory to copy and spool out the new print.  If there are no spooled
  9629. prints and there still is not enough memory to spool the new print, it is
  9630. printed in foreground ("busy" mode).  Foreground prints may be aborted with
  9631. Amiga-ESC.  Spooled prints must be aborted with abortPrint.  If printTabs is
  9632. True (see Config! defaults), tabs are sent to the printer; if printTabs is
  9633. False (the default), tabs are converted to spaces for the printer.  NOTE:
  9634. Print() doesn't count control characters (except eol, ff, and tab) when
  9635. counting columns for tab conversion; but ESC sequences may still cause tab
  9636. conversion to be inaccurate due to other characters in the ESC sequence.
  9637. (See abortPrint and printerCode().  See Printing in Part 1.)
  9638.  
  9639. Example:  print(curFile,all)   .. print all of curFile.
  9640. equateNum(prefPrint,1) print(curFile,hilite) ..send hilite out serial port.
  9641.  
  9642. printerCode(B,X,Y,Z)
  9643. B:  list 2 (buffer)
  9644. X,Y,Z:  list 10 (integer)
  9645.  
  9646. Embeds printer control code X, with arguments Y and Z, at the cursor in
  9647. buffer B.  It returns False, if B does not exist, if B is read-only, or if X
  9648. or Y or Z is invalid.  X must
  9649.  
  9650. be a value from 0 to 75; it is a printer command number from the Amiga ROM
  9651. Kernal Manual.  (See Printer Control Table in Part 1.)  Y and Z are arguments
  9652. for printer command X and must be in the range 0 to 223.  Unless the printer
  9653. code X uses arguments, Y and Z should be 0; most printer commands do not
  9654. require arguments.  printerCode() embeds the printer command code in buffer B
  9655. at the cursor using the format ESCxyzESC, where x = X + 32, y = Y + 32, z = Z
  9656. + 32.  32 is added to each argument, in order to avoid control characters.
  9657. When you print the file, Uedit strips off the ESCs, converts xyz, and sends
  9658. the resulting printer code and arguments (if any) to the Amiga print device.
  9659. If Y and Z are 0, they are not used; thus, a typical embedded code is of the
  9660. form, ESCxESC, where x = X + 32.  prefPrint (Print Select) must be 2 or 3 in
  9661. order for these codes to be processed by the Amiga print device; if prefPrint
  9662. is 0 or 1, these codes are likely to make the printer print garbage.  (See
  9663. Printing in Part 1.  See print() and abortPrint().)
  9664.  
  9665. Display Action:  If B=curFile, refreshes cursor; centers cursor, if offscreen.
  9666.  
  9667. Example:  printerCode(curFile,6,0,0) ..embed printer code for italics.
  9668.  
  9669. push(S,BN)
  9670. S,BN:  list 10 (buffer or number)
  9671.  
  9672. Pushes item BN, a buffer or number, onto the stack indicated by S.  If S is a
  9673. buffer variable such as buf10, it means use buffer stack 10; if it is a
  9674. number variable such as n22, it means use number stack 22.  There are 100
  9675. buffer and 100 number stacks.  False is returned if 8 bytes is not available
  9676. for the stack entry.  If BN is curFile, the "home" buffer becomes the new
  9677. curFile; if BN is the last file buffer, a new NoName buffer is opened.  (See
  9678. rollStack(), getStackSize(), and pop().)
  9679.  
  9680. Display Action:  If curFile pushed, displays new curFile.
  9681.  
  9682. Example:  push(buf10, curFile)   .. push curFile onto buffer stack 10.
  9683. push(n0,lineLength) .. push lineLength onto number stack 10.
  9684.  
  9685. putMsg(X)
  9686. X:  list 10 (buffer or literal or integer)
  9687.  
  9688. Displays message X in the message line beneath the title bar.  X may be a
  9689. buffer, literal, or number.  The message length may be up to 75 characters.
  9690. If speakMsgs is True, messages are also spoken.  Use putMsg("") to clear the
  9691. message line.
  9692.  
  9693. Example:  if (inUse(macroNum)) putMsg("Key is in use")
  9694.  
  9695. quit(N)
  9696. N:  list 10 (integer)
  9697.  
  9698. Quits Uedit, giving return code N to the Amiga.  For a "good quit", use N =
  9699. 0.  For a bad quit, use an AmigaDOS error return code such as 10.  If prints
  9700. or file-saves are in progress, quit() waits until they are completed; if you
  9701. give an input during this waiting, Uedit returns to editing mode.  If a Rexx
  9702. message has not been sent a reply or messages are waiting to be picked up,
  9703. Uedit sends a Failed reply to each of them; but if a Rexx message has been
  9704. sent by Uedit and a reply has not been received, a "Wait for Rexx reply"
  9705. message is displayed and Uedit returns to edit mode.  If buffers are on the
  9706. buffer stack, quit() asks whether it is okay to delete them or not.  If you
  9707. answer No or Cancel, you are returned to edit mode.  If you answer Yes, Uedit
  9708. frees its memory, closes the window, and quits.  (See discussion of quitting.)
  9709.  
  9710. Example:  if (askYesNo("Really quit?")) quit(0)
  9711.  
  9712. reformat
  9713.  
  9714. Reformats the cursor's paragraph in curFile, starting at the cursor line.  It
  9715. returns False, if curFile is read-only, or if cursor is at eof or there is no
  9716. text to reformat between cursor and eof.  If the cursor is in a blank line,
  9717. the cursor is advanced until a line with text in it is found.  reformat uses
  9718. the current local typing settings, such as rightJustify and lineLength.  It
  9719. turns on WordWrap and AutoIndent temporarily, if not already on.  The end of
  9720. the paragraph is determined by a blank line or a change in indentation.  When
  9721. finished, the cursor is at the end of the paragraph.  Note:  reformat uses
  9722. mouseLoc as a scratch location; this should be harmless, as mouseLoc is reset
  9723. whenever the mouse button is used.  (See discussions of typing, paragraph
  9724. reformatting, local modes, and local values in Part 1.)
  9725.  
  9726. Cursor Action:  Cursor is moved to the end of the paragraph.
  9727.  
  9728. Display Action:  Refreshes cursor; if offscreen, centers cursor.
  9729.  
  9730. Example:  reformat moveCursor(curFile, downLine) ..reformat & leave paragraph.
  9731.  
  9732. refreshDisplay
  9733.  
  9734. Refreshes curFile's window immediately.  It does not refresh any other split
  9735. windows.  RefreshDisplay takes time, so do not use it unless it is really
  9736. necessary.  Always try new commands without using it, and try using
  9737. updateDisplay before resorting to refreshDisplay.  refreshDisplay uses the
  9738. current sPage location and does not scroll the display.  (See updateDisplay
  9739. and vScroll().)
  9740.  
  9741. Display Action:  Redisplays curFile immediately.
  9742.  
  9743. Example:  if (thisKey) refreshDisplay ..refresh, if key is primary key.
  9744.  
  9745. restartPrint
  9746.  
  9747. Restarts the spooled print that is currently in progress.  Use restartPrint
  9748. after printer paper jams.
  9749.  
  9750. return
  9751.  
  9752. Forces the current command to return immediately, using the True/False return
  9753. of the most recent function that was called.
  9754.  
  9755. Example:  if (not newFile) return ..would always return False here.
  9756.  
  9757. returnFalse
  9758.  
  9759. Forces the current command to return False immediately.
  9760.  
  9761. returnTrue
  9762.  
  9763. Forces the current command to return True immediately.
  9764.  
  9765. rexxIn(B,L,A,F,C)
  9766. B:  list 0 (buffer)
  9767. L:  list 6 (location)
  9768. A,F,C:  list 10 (integer)  (A=ActionResult, F=Flag, C=ReturnCode)
  9769.  
  9770. Fetches a Rexx message/reply into buffer B at location L.  If flag F is 0, a
  9771. message was fetched and A is the Rexx command (Action) code of the message.
  9772. If flag F is 1, a reply was fetched and A is the Rexx Result code of the
  9773. reply.  The Uedit return code C is 0, if rexxIn() returns True.  C contains a
  9774. non-zero Uedit error return code, if rexxIn() returns False.  If B is a
  9775. blank literal "", the text of the incoming message or reply is discarded.
  9776. rexxIn() returns False, if ARexx is not up, if there is no message or reply
  9777. to fetch, or if there is no memory to store the incoming text in buffer B.
  9778. Fetching an incoming reply with rexxIn() causes the original message's
  9779. resource to be released, so replies can only be fetched once.  An incoming
  9780. message may be fetched repeatedly, however, and is not released until a reply
  9781. to it is sent using rexxOut().  You can dump a stream of incoming messages by
  9782. not bothering to call rexxIn(); just call rexxOut() repeatedly until it
  9783. returns False.  If a Rexx message arrives when Uedit is in tiny window, it
  9784. immediately returns to its big window.  (See rexxOut().  See Rexx Interface
  9785. and the examples in Part 2.  See the Rexx commands in Config!R.  See the
  9786. ARexx User's Reference Manual.)
  9787.  
  9788. rexxOut(B,R,A,F,C)
  9789. B:  list 0 (buffer)
  9790. R:  list 12 (region)
  9791. A,F,C:  list 10 (integer)  (A=ActionResult, F=Flag, C=ReturnCode)
  9792.  
  9793. Sends the Rexx message/reply in buffer B, region R, using the Action/Result
  9794. code in A.  If F is 0, it sends a message.  If F is non-zero, it sends a
  9795. reply.  If rexxOut() returns False, the Uedit error return code is in C.  If
  9796. it returns True, C is 0.  If B is a literal, the region argument R is a dummy
  9797. and is ignored.  Rexx messages may be up to 65535 bytes in length.  On
  9798. outgoing replies (F=1), the A field is the Rexx Result value, which is
  9799. normally 0 (for an Okay result).  On outgoing messages (F = 0), the Rexx
  9800. command (Action) field A may be one of the Uedit defaults (0, 1, or 2) or an
  9801. actual Rexx action code with modifier flag bits.  rexxOut() does NOT validate
  9802. the Rexx action code in A, if it is not one of Uedit's default values (0, 1,
  9803. or 2).  If you send a message with rexxOut() and do not use the RXFF_NONRET
  9804. modifier, a reply is expected and rexxOut() will not let you send another
  9805. message until a reply has been received and fetched using rexxIn().  To dump
  9806. all incoming messages, keep calling rexxOut() with flag F=1, sending replies,
  9807. until rexxOut() returns False.  rexxOut() returns False, if ARexx is not up,
  9808. if a previous message sent has not received a reply yet, if there is no
  9809. memory for the message or reply, or if you tried to reply to a message when
  9810. no message is outstanding.  (See rexxIn().  See Rexx Interface, 2.8.  See
  9811. Rexx commands in Config!R.  See the ARexx User's Reference Manual.)
  9812.  
  9813. rollStack(X,N)
  9814. X:  list 10 (buffer or integer)
  9815. N:  list 10 (integer)
  9816.  
  9817. rolls the buffer stack X by amount N, if X is a buffer argument such as
  9818. buf10; rolls the number stack X by amount N, if X is an integer argument such
  9819. as N22.  X indicates which buffer or number stack to roll.  rollStack()
  9820. returns False, if the (buffer or number) stack size is less than 2 or if N is
  9821. 0.  N may be positive or negative, and the stack is rolled forward or
  9822. backward based on the sign and amount of N.  The stacks are LIFO, last-in-
  9823. first-out.  If N is 1, the first-out stack entry is rolled to the last-out
  9824. position, so that second-out becomes first-out.  If N is -1, the last-out
  9825. entry is rolled to the first-out slot.  (See push(), pop(), and
  9826. getStackSize().)
  9827.  
  9828. Example:  rollStack(buf10,1)   .. rolls buffer stack 10 forward by 1.
  9829. rollStack(n0,n54)   .. rolls number stack 0 by the amount in n54.
  9830.  
  9831. runKey(K)
  9832. K:  list 10 (integer)
  9833.  
  9834. Runs the command of key K.  K must be a valid key argument or a number or
  9835. variable whose value is between 1 and 1148.  runKey() returns False, if K is
  9836. out of range or K does not have a command.  If K has a command, it returns
  9837. the True/False result of command K.  Commands may run commands to a depth of
  9838. 10.  The primary command runs at level 1.  If it uses runKey(), the command
  9839. it runs is at level 2, and so on.  (See Overview of Commands, 2.19.)
  9840.  
  9841. Example:  while (runKey(normal-f9)) runkey(normal-f10) ..while find, replace.
  9842.  
  9843. runLearn
  9844.  
  9845. Terminates learning with Learn Mode, if Learn Mode is On; runs the current
  9846. learned sequence, if Learn Mode is Off.  It returns False, if a learned
  9847. sequence is already being executed, or if no learned sequence exists.
  9848. runLearn returns the True/False of the last command run in the learned
  9849. sequence.  Learned sequences may contain up to 200 steps.  To start Learn
  9850. Mode, use flipFlag(curFile, learnMode).  To abort Learn Mode, erasing all
  9851. stored steps, use flipFlag(curFile, learnMode) again.  To find out whether
  9852. Learn Mode is On, use getFlag(curFile, learnMode).  To terminate Learn Mode
  9853. gracefully, use runLearn.  To run the learned steps, use runLearn again, as
  9854. many times as desired.  (See Learn Mode, 1.35.  See loadLearn() and
  9855. saveLearn().)
  9856.  
  9857. Examples:  if (loadLearn("TypeHeader")) runLearn ..type in header.
  9858.  
  9859. saveConfig(B)
  9860. B:  list 10 (text)
  9861.  
  9862. Saves Uedit's data to the file named in B.  If B is blank, it saves the data
  9863. using the current data file name.  It returns False, if unable to save the
  9864. data for some reason, such as due to an invalid file name.  (See
  9865. loadConfig().)
  9866.  
  9867. saveFile(B)
  9868. B:  list 2 (buffer)
  9869.  
  9870. Locks buffer B and puts it into the file-save queue to be saved in
  9871. background.  While in the queue, buffer B is locked; but you can still modify
  9872. B, if it isn't the buffer currently being saved; if you do so, B is removed
  9873. from the file-save queue when its turn comes.  False is returned, if buffer B
  9874. is read-only or empty, or if AmigaDOS will not let the file be created for
  9875. some reason.  Buffer B is saved under its current buffer name.  During
  9876. saving, if mapChars is On for B, mapped characters are remapped back to their
  9877. illegal (ASCII 0-3) values.  If freeBuf() is called for B, B is freed
  9878. automatically after it has been saved; if a save-error occurs or abortSave is
  9879. called, the file-save is aborted and B is not freed.  saveFile() preserves
  9880. the file attributes, if the file already exists.  (See abortSave.)
  9881.  
  9882. Example:  if (getFlag(curFile,changed)) saveFile(curFile) ..save, if changed.
  9883.  
  9884. saveKeys(N,K1,K2)
  9885. N:  list 10 (text)
  9886. K1,K2:  list 10 (integer)
  9887.  
  9888. Saves the range of key commands from K1 to K2 in the partial data file named
  9889. in N.  It returns False, if K1<=0 or K1>1148, if file N cannot be created due
  9890. to bad file name or path name, or if file N already exists but has the wrong
  9891. Uedit version number.  If K2<K1, it sets K2=K1 and saves only that one key.
  9892. If K2>1148, it sets K2=1148, the highest allowed macro number.  It appends
  9893. each key to the end of the file N.  saveKeys() can save blank, unassigned
  9894. keys.  If called repeatedly to save the same key over and over, each copy is
  9895. appended to the end of the file; this is wasteful and should be avoided.
  9896. (See loadKeys().)
  9897.  
  9898. Example: saveKeys("pData",normal-Esc,0)   .. save just Esc key.
  9899. saveKeys("pData",normal-f1,normal-f10)   .. save F1 to F10.
  9900.  
  9901. saveLearn(N)
  9902. N:  list 10 (text)
  9903.  
  9904. Saves the current learned sequence to the disk file named in N.  It returns
  9905. False, if there is no learned sequence, if Learn Mode is currently On, if
  9906. currently executing a learned sequence, or if unable to create file N.
  9907. Learned sequences should be saved in the S: directory, if Uedit is to find
  9908. them from any directory.  (See loadLearn() and runLearn.)
  9909.  
  9910. Example:  saveLearn("TypeHeader")   .. save sequence that types in letter header.
  9911.  
  9912. saveState(B)
  9913. B: list 10 (text)
  9914.  
  9915. Saves Uedit's current state to the disk file named in B.  A state is a
  9916. "snapshot" of Uedit's current state, which includes all files and buffers
  9917. along with their local flags, the cursor locations, colored regions, search
  9918. and replace and grep strings, and so on.  Also included are the split window
  9919. configuration and color settings.  When you load the state file back in with
  9920. loadState(), the "state" of Uedit is just as it was when the state file was
  9921. saved earlier with saveState().  saveState() can be aborted with Amiga-ESC;
  9922. if told to abort, it finishes saving the current file or buffer before
  9923. aborting.  Note: The state file does not store commands or learned sequences;
  9924. these can be stored separately in disk files.
  9925.  
  9926. screenToBack
  9927.  
  9928. moves Uedit's screen to the back.  screenToBack always returns TRUE, unless
  9929. Uedit's screen is not open as when in tiny window.
  9930.  
  9931. screenToFront
  9932.  
  9933. moves Uedit's screen to the Front.  screenToFront always returns TRUE, unless
  9934. Uedit's screen is not open as when in tiny window.
  9935.  
  9936. search(B,L1,L2,D)
  9937. B:  list 2 (buffer)
  9938. L1,L2:  list 8 (location)
  9939. D:  list 10 (direction)
  9940.  
  9941. Searches buffer B in the fwd/bkwd direction specified by D, looking for a
  9942. match to the current search string.  It returns False, if buffer B does not
  9943. exist, if no search string exists, or if the search fails.  If D>=0,
  9944. searching is forward.  If D<0, searching is backward.  When search() finds a
  9945. "hit", the cursor is placed at the beginning of the matched region; the start
  9946. and end of the matched region are stored in locations L1 and L2 of B.  There
  9947. may be 2 search strings, delimited by the eitherOr character, and there may
  9948. be an "all but" string delimited by the allBut character.  Matches to the
  9949. "all but" string are skipped over by search().  If there are single or multi
  9950. character wildcards in either of the two search strings or in the all-but
  9951. string, the inclusion/exclusion of white space in the "matched" region
  9952. underneath the wildcards is governed by the values of singleWhite (for
  9953. wildCard) and multiWhite (for multiWild):  If these are 0, only black
  9954. characters are allowed as a "hit" on wildcards.  If they are 1, spaces and
  9955. tabs are also allowed.  If they are 2, any character is allowed as a "hit" on
  9956. the wildcard.  If multiWild is used in a search string, up to 32 characters
  9957. are allowed to be included by it and searching is declared a "miss" if more
  9958. than 32 are required.  Searching is slower when wildcards are used.  (See
  9959. getSearch() and setSearch().)
  9960.  
  9961. Cursor Action:  If search succeeds, cursor is at the start of the matched
  9962. region.
  9963.  
  9964. Display Action:  If B=curFile, refreshes cursor; if offscreen, centers cursor.
  9965.  
  9966. Example:  search(curFile,sInvert,eInvert,1)   .. search forward.
  9967. search(curFile,locA,locB,n54)   .. search fwd/bkwd depending on n54.
  9968.  
  9969. seeRuler
  9970.  
  9971. Displays curFile's tab ruler.  The ruler is displayed above the cursor line,
  9972. if possible.  If not, it is displayed at the top of the window.  Giving any
  9973. input causes the ruler to be removed and the display refreshed.  Note that
  9974. the input is not discarded; while looking at the tab ruler, you can deposit
  9975. the cursor in a desired column in the text using the mouse.  (See setRuler
  9976. and getTabs().)
  9977.  
  9978. Display Action:  Refreshes window when finished.
  9979.  
  9980. setColors(B,C,Fg,Bg)
  9981. B: list 2
  9982. C,Fg,Bg: list 10 (numbers)
  9983.  
  9984. Sets the global and/or local colors.  If B is a buffer which exists, the
  9985. local colors of B are set according to the C, Fg, and Bg arguments.  If B is
  9986. a literal argument "" or buffer B doesn't exist, the internal local color
  9987. variable that is applied to newly created buffers is set according to the C,
  9988. Fg, and Bg arguments.  Fg & Bg must be in the range 0-3, corresponding to an
  9989. RGB color register number.  C must be in the range 0-15 or equal -1.  If C is
  9990. in the 0-15 range, setColors() returns False if Fg=Bg; this prevents you from
  9991. setting color combinations which would make text invisible.
  9992.  
  9993. C=0 to 7:  The local buffer B Fg & Bg colors corresponding to C are accessed.
  9994. (See the color table in the Config! defaults.)
  9995.  
  9996. C=8 to 15:  The global Fg/Bg colors corresponding to C are accessed and B is
  9997. ignored.  (Only colors 0 to 7 apply to buffers.)  The Fg/Bg color pairs are
  9998. as shown in the color table in the Config! defaults.
  9999.  
  10000. C=-1:  Fg and Bg are long word (32-bit) bitmasks containing all of the local
  10001. (buffer) and global (screen) colors, respectively.  (Again, if buffer B does
  10002. not exist or B is a literal "", the Fg color argument applies to the internal
  10003. color variable which presets the colors of newly created buffers.):
  10004.  
  10005.     The Fg bit masks, which apply to local colors, are as follows:  Each 4
  10006.     bits is 2 pairs of 2 bits, each with values 0-3 corresponding to the
  10007.     foreground and background colors, respectively.  The sets of 4 bits
  10008.     correspond (from left to right) to normal, cursor, hilite, cursor +
  10009.     hilite, invert, invert + cursor, hilite + invert, and cursor + hilite +
  10010.     invert.
  10011.  
  10012.     The Bg bitmasks, which apply to the global (screen) colors, are as
  10013.     follows:  Again, each 4 bits is 2 pairs of 2 bits, each with values 0-3
  10014.     corresponding to the foreground and background colors, respectively.  The
  10015.     sets of 4 bits correspond (from left to right) to title bar, msg line,
  10016.     menus, tab ruler, requester, formfeed, spare1, and spare2.
  10017.  
  10018. WARNING:  When C=-1, no check is made of the bitmasks in either the Fg or Bg
  10019. arguments.  It is possible to send invalid colors which render text invisible.
  10020. (See getColors(), setLocal(), and getLocal().)
  10021.  
  10022. setEol(N)
  10023. N:  list 10 (integer)
  10024.  
  10025. Sets the global end-of-line character to the value N.  Normally N would be
  10026. ASCII 10 or 13, but N may be any control character from ASCII 5 to 31.
  10027. setEol() returns False, if N is not in this range.  setEol() causes all split
  10028. windows to be refreshed.  If any buffer is using a different eol, the buffer
  10029. is displayed All On One Line and its eols must be converted or else setEol()
  10030. must be used again to change eol to the buffer's current eol in order for it
  10031. to display correctly.
  10032.  
  10033. Display Action:  Refreshes all split windows.
  10034.  
  10035. setFileName(B,N)
  10036. B:  list 2 (buffer)
  10037. N:  list 10 (text)
  10038.  
  10039. Sets the file name of buffer B to the name in N.  It returns False, if B does
  10040. not exist or is read-only, or if N is empty or begins with whitespace.  File
  10041. names may be up to 76 characters in length.  The Changed flag of buffer B is
  10042. turned On, when setFileName() is successful.  (See getFileName().)
  10043.  
  10044. Display Action:  Window title is refreshed, if B is in a window.
  10045.  
  10046. Example:  setFileName(curFile,"MyDocument")
  10047.  
  10048. setFont(fontname,fontheight)
  10049. fontname:    list 0 (buffer or literal)
  10050. fontheight:  list 10 (number)
  10051.  
  10052. returns TRUE if fontname exists and uses font size equal to fontheight.  The
  10053. font may be in memory or on disk.  If font isn't in memory it is loaded from
  10054. disk.  When a new font is selected or when Uedit quits, the current font is
  10055. released.
  10056.  
  10057. setFont() does not change the font immediately or visibly.  It merely changes
  10058. the stored font name and height.  Next time Uedit's screen is reopened - as
  10059. when changing screens or returning from tiny window - the new font is used.
  10060. If the font cannot be found, topaz 8 is used by default.
  10061.  
  10062. The following example command switches Uedit's font.  Notice that it goes to/
  10063. from tiny window in order to close/reopen the screen.  And it runs the
  10064. startup command so that the menus will use the new font:
  10065.     <normal-esc:  setfont("topaz",11) toggle(toTiny) toggle(toTiny)
  10066.     runkey(startup) >
  10067.  
  10068. setFold(T,F,X,SKA)
  10069. T,F,X,SKA:  list 10 (integer or text)
  10070.  
  10071. Successive calls to setFold() define the testing steps that will be used in
  10072. folding a buffer or region using fold().  T is a step number in the range 1
  10073. to 16.  The testing steps T are applied by fold() beginning with T=1.  Gaps
  10074. are allowed in the T values; empty T slots are ignored by fold().  Any
  10075. existing step T can be overwritten by calling setFold() again, using the same
  10076. T.
  10077.  
  10078. If setFold() is called with T=0, all testing steps are deleted; and then two
  10079. default steps (for T=1 and T=2) are defined, just as if you had called
  10080. setFold() as follows:
  10081.     setFold(1,1,0,1)    (keep blank lines - it keeps only 1 per series)
  10082.     setFold(2,2,0,1)    (keep lines with no indentation)
  10083.  
  10084. F specifies the test to apply in step T.  (See the list of F tests below.)
  10085. If F=0, step T is deleted.  (To eliminate the above two default steps, call
  10086. setFold(1,0,0,0) and setFold(2,0,0,0).)
  10087.  
  10088. X and SKA (Skip/Keep/AND) are used with test F.  If F<=7, X must be an
  10089. integer (indentation or line length) with a value between 1 and 130.  If F>=8
  10090. X must be a text string (of 1, 2, or 4 characters) in a buffer or literal
  10091. argument.  If X is to be used as a range of characters (such as "AZ" or "09")
  10092. or a set of brackets or quotes (such as "[]" or "\"\"") it must contain at
  10093. least 2 characters (only the first 2 are used).  If X is to be used as a text
  10094. string (not as a character range or set of brackets), it may contain 1 to 4
  10095. characters.  setFold() returns FALSE, if X is invalid.
  10096.  
  10097. fold() scans its input buffer line-by-line, applying to each line the tests
  10098. that were set up with setFold(), starting with test T=1.  fold() does not
  10099. keep a line (put it into the output buffer), unless a test succeeds on that
  10100. line of text.
  10101.  
  10102. When a test succeeds, SKA specifies the action to be taken:
  10103.     If SKA = 0, the line is skipped.
  10104.     If SKA = 1, the line is kept (put into the output buffer).
  10105.     If SKA = 2, the current test is ANDed with the next one; the SKA of the
  10106.     next test dictates what to do after that - assuming that the next test
  10107.     also succeeds; if any ANDed test fails, all tests ANDed with it are
  10108.     ignored.
  10109.  
  10110. NOTE:  Test F=15 may involve multi-lines of text.  If you want to AND a test
  10111. 15 with other test(s), make sure that test 15 is last in the ANDed series.
  10112.  
  10113. Blank lines:  If F=1 and SKA=1, this specifies that blank lines be kept.  If
  10114. several blank lines are in series, fold() only keeps the first.
  10115.  
  10116. Folding tests (F):
  10117.  
  10118. 0   erase test F, if it exists  (X and SKA ignored)
  10119. 1   blank line                  (X ignored)
  10120. 2   indentation = X
  10121. 3   indentation < X
  10122. 4   indentation > X
  10123. 5   line-length = X
  10124. 6   line-length < X
  10125. 7   line-length > X
  10126. 8   1-4 character string X (eg, "x" or "abcd") is in the line
  10127. 9   1-4 character string X is at start-of-line
  10128. 10  1-4 character string X is at end-of-line
  10129. 11  character in range X (eg, "AZ" or "09") is in the line
  10130. 12  character in range X is at start-of-line
  10131. 13  character in range X is at end-of-line
  10132. 14  rgn bounded by quotes or brackets in X (eg, "\"\"" or "[]") is in line
  10133. 15  rgn bounded by quotes or brackets in X may be in multi-lines
  10134.  
  10135.  
  10136. Example:  Set up folding tests for a C program module 
  10137. <lAmiga-\:
  10138.     setFold(0,0,0,0)    .. clear all testing steps
  10139.     setFold(1,1,0,1)    .. include blank lines (it keeps only 1 per series)
  10140.     setFold(2,15,"{}",0)  .. skip function code inside {}
  10141.     ..setFold(3,15,"//",1) .. keep comments bracketed by //
  10142.     ..setFold(4,9,"#",1) .. keep lines beginning with #
  10143.     setFold(5,2,0,1) .. keep lines with no indentation
  10144. >
  10145.  
  10146. setGrep(T)
  10147. T:  list 10 (text)
  10148.  
  10149. Sets the current grep /search/replace/strings according to the contents of T.
  10150. The first character in T is taken as the delimiter character.  If a replace
  10151. string is included, it must be delimited using the delimiter.  A trailing
  10152. delimiter is optional.  The search and replace strings may be up to 63
  10153. characters each.  Search strings may contain up to 9 REs (regular strings) in
  10154. brackets \(...\).  Search and replace strings may reference matched REs from
  10155. the search by using \1...\9.  The replace string may reference the whole
  10156. matched search area by using the ampersand, &.  If the search portion of T is
  10157. omitted, the previous search string (if any) is kept and only the replace
  10158. string is set.
  10159.         Example:  //new replace string/
  10160. If the replace portion of T is delimited but empty, the replace string (if
  10161. any) is cancelled.
  10162.         Example:  /new search string//
  10163. If no replace string is delimited, the old replace string (if any) is
  10164. preserved.
  10165.         Example:  /new search string/
  10166. If T is blank except for 2 or 3 delimiters (///) or (//), it preserves the
  10167. existing search string but cancels the existing replace string.  If T
  10168. contains just 1 delimiter (/) it cancels the existing search and replace
  10169. strings.  setGrep() returns False if the search or replace string is invalid.
  10170. Note:  setGrep() may not detect every possible invalid or nonsensical string;
  10171. in part it relies on grep() to deal with them.  (See the discussion of
  10172. Regular Expressions.  See grep() and getGrep().)
  10173.  
  10174. Example:  setGrep("/my search \(and this\)/my replace \1/")
  10175.  
  10176. setLocal(B,V,N)
  10177. B:  list 2 (buffer)
  10178. V:  list 3 (value)
  10179. N:  list 10 (number)
  10180.  
  10181. Sets the local value V of buffer B to the value specified in N.  It returns
  10182. False, if B does not exist, if N<=0 or N>32767 when V is lineLength or
  10183. pageLines, if N<0 or N>4 when V is tabTable, if N<0 or N>3 when V is Lace, or
  10184. if N<0 or N>255 when V is leftMargin, topMargin, bottomMargin.  (Note:  If
  10185. N=0 for pageLines, it is set to 1.  When pageLines is 1, there are no pages
  10186. or "forms"; this is helpful to programmers who want page-row-column
  10187. displaying to display line number, not page & line.)  COLOR:  The 8 local
  10188. colors in N must be in 8 bit masks, 4 bits to each mask.  Each 4 bits is 2
  10189. pairs of 2 bits, each with values 0-3 corresponding to the Fg and Bg colors,
  10190. respectively.  The 4-bit masks correspond (from left to right) to normal
  10191. text, cursor, hilite, cursor + hilite, invert, invert + cursor, hilite +
  10192. invert, and cursor + hilite + invert.  NOTE:  There is an internal local-
  10193. color variable that is used to set the colors of newly created buffers;
  10194. setLocal() and getLocal() do not touch this variable.  To access this color
  10195. variable, you must use getColors() or setColors() using a literal "" as the
  10196. first argument.  (See getLocal(), setColors() and getColors().  See toggle()
  10197. and flipFlag().  See the color tables in the Config! defaults.)
  10198.  
  10199. Example:  setLocal(curFile,lineLength,200)   .. set local lineLength to 200.
  10200. setLocal(curFile,lace,1)   .. use 1 bit-plane, non-interlace screen.
  10201.  
  10202. setMaxFiles(N)
  10203. N:  list 10 (integer)
  10204.  
  10205. Sets the internal variable MaxFiles to N, which determines how many Uedit
  10206. buffers are to be used as file buffers.  MaxFiles may be 1 to 100.  It
  10207. returns False, if N<0 or N>100.  (See getMaxFiles().)
  10208.  
  10209. setRGB(R0,R1,R2,R3)
  10210. R0,R1,R2,R3:  list 10
  10211.  
  10212. Sets the RGB color register values.  The color values (0-15) are stored in
  10213. the lowest 3 nibbles of each R argument.  Use this function for instant
  10214. changes of RGB, like when you switch to/from interlace.  The example below
  10215. sets the RGB colors to the defaults that are in Config!.  In the example,
  10216. 0xc60 which is for register 0 sets Red to 12, Green to 6, and Blue to 0.
  10217.  
  10218. Example:  setRGB(0xc60,0x0,0xfa0,0xaaa)
  10219.  
  10220. setRuler
  10221.  
  10222. Displays curFile's tab ruler, based on its tabTable value (0 to 4), and
  10223. allows you to set the tab stops using mouse and keys.  Clicking the mouse on
  10224. the ruler puts in a tab stop, if none is there; it removes a tab stop, if one
  10225. is there.  The Tab key installs new tab stops using the spacing of the first
  10226. stop.  The Space bar shifts all stops to the right; the BackSpace key shifts
  10227. all stops to the left.  The Del key erases all stops.  The last tab stop in
  10228. the ruler is marked with an X.  The highest tab stop allowed is column 255.
  10229. There may be up to 32 tab stops.  To scroll the ruler, hold down the left
  10230. mouse button and drag the mouse to the right or left.  Typing any
  10231. inapplicable key or clicking the mouse 3 or more lines away from the ruler
  10232. terminates setRuler and preserves the new tab stops.  Pressing Amiga-ESC
  10233. aborts setRuler, restoring the original tab stops.  (See seeRuler and
  10234. getTabs().)
  10235.  
  10236. Display Action:  Refreshes display, when it terminates.
  10237.  
  10238. setSearch(B)
  10239. B:  list 10 (text)
  10240.  
  10241. Sets the search string using the text in B.  It returns False, if B is empty.
  10242. There may be 2 search strings delimited by the eitherOr delimiter and an "all
  10243. but" string delimited by the allBut delimiter.  Each string may be up to 64
  10244. characters long, but all 3 strings together may not exceed 127 characters.
  10245. Search strings and the "all but" string may use the wildcards, wildCard and
  10246. multiWild.  The treatment of wildcards in the search is determined by the
  10247. values of singleWhite and multiWhite.  (See search() and getSearch().)
  10248.  
  10249. Example:  if (inputString(buf49)) setSearch(buf49)
  10250.  
  10251. setTaskPri(P)
  10252. P:  list 10 (number)
  10253.  
  10254. Changes Uedit's task priority to P.  (See the config defaults for task
  10255. priority settings for Uedit and for tiny window.  See the tinyPriority CL
  10256. variable in the variable lists.  It sets the priority when switching to tiny
  10257. window.)
  10258.  
  10259. sortLines(B,C)
  10260. B: list 2 (buffer)
  10261. C: list 10 (number)
  10262.  
  10263. sorts the lines in buffer B alphabetically.  If case-sensitivity C is 0, case
  10264. sensitivity is not used in the sort.  If C is not 0, case sensitivity is used.
  10265.  
  10266. spacesToTabs(B)
  10267. B: list 2
  10268.  
  10269. Converts spaces in buffer B to tab characters where appropriate.  It returns
  10270. False, if buffer B is read-only.  While working, the message "Space->Tab" is
  10271. displayed.  If smartTabs is False (see Config! defaults), spaces inside quote
  10272. marks are converted to tabs also; if smartTabs is True, spaces inside quote
  10273. marks are not converted.  (See tabsToSpaces.)
  10274.  
  10275. Display Action:  Centers cursor and refreshes window, if Tabs are put in.
  10276.  
  10277. speak(B)
  10278. B:  list 10 (text)
  10279.  
  10280. Speaks the contents of B.  speak() returns False, if B is empty or if the
  10281. SPEAK: device is not mounted.  (Note that using the speakMsgs and speakAlerts
  10282. flags, messages and requesters as well as text may be spoken in Uedit.  This
  10283. has made Uedit of interest to the blind, while Uedit's reconfigurability has
  10284. made it of interest to the physically handicapped.)
  10285.  
  10286. Example:  speak("Okay, I am ready now")
  10287.  
  10288. spell(B1,B2,B3)
  10289. B1,B3:  list 0 (buffer or "")
  10290. B2:     list 2 (buffer)
  10291.  
  10292. The normal return for spell() is False; this indicates a bad word was found.
  10293. It also returns False if B2, the buffer being spell checked, does not exist
  10294. or if the speller is not up.  If spell() returns True, it has reached eof.
  10295. It checks from the cursor forward in B2, stopping when a bad word is found.
  10296. If B1 is a buffer and the spelling dictionary is resident in memory, optional
  10297. spellings are put into B1.  If B1 is "", spell() simply returns False when it
  10298. finds a bad word.  (See the commands in Config!S.)  When B1 is "" (no
  10299. optional spellings), spell() may be aborted with Amiga-ESC.  When B1 is a
  10300. buffer (to collect optional spellings), the lookup of spelling options may be
  10301. stopped early on by giving an input; the options accumulate in the message
  10302. line as they are found, and thus when you see the option you want you can
  10303. click it with the mouse and no further options are sought.  If B3 is a
  10304. buffer, it is used as a supplemental dictionary; the words in it should be on
  10305. separate lines and in alphabetical order.  If B3 is "", no supplement is
  10306. used.  (See spellerUp, startSpell() and stopSpell.  See sortLines().)
  10307.  
  10308. Cursor Action:  Advances cursor until it finds a bad word or eof.
  10309.  
  10310. Display Action:  If B=curFile, refreshes cursor; if offscreen, centers cursor.
  10311.  
  10312. Example:
  10313.     if (not spellerUp) return
  10314.     while (not spell(buf54,curFile,"")) runKey(virtual-z) .. replace bad words
  10315.  
  10316. spellerUp
  10317.  
  10318. Tests to see whether the spell-checking dictionary table is memory resident,
  10319. indicating that Uedit is ready for spell-checking.  It returns False, if it
  10320. is not.  (See spell(), startSpell(), and stopSpell.)
  10321.  
  10322. Example:  if (not spellerUp) { putMsg("Speller not up") returnFalse }
  10323.  
  10324. splitWindow(B,N)
  10325. B:  list 2 (buffer)
  10326. N:  list 10 (integer)
  10327.  
  10328. Creates or removes a split window for buffer B.  If N < 2, it removes B's
  10329. split window.  If N >= 2, it creates a split window for B with N lines in it;
  10330. the newly created split window becomes the active window and B becomes
  10331. curFile.  When creating a split window:  it returns False, if there are
  10332. already 8 split windows, or if there are not enough lines to create a window
  10333. N lines in size.  When removing a split window:  It returns False, if you try
  10334. to remove a split window for B but none exists for B.  When a split window is
  10335. created, it is displayed using B's current sPage location.  (Note:  An
  10336. integer variable splitSize is provided for convenience, but splitWindow()
  10337. does not look at splitSize unless splitSize is used as the N argument.)  (See
  10338. getSplitLines() and gotoSplit().  See toggle().)
  10339.  
  10340. Display Action:  Displays B as curFile, if a split window is created.
  10341. Refreshes all split windows and title bar.
  10342.  
  10343. Example:  splitWindow(buf37,5) ..make a 5-line window for buf37.
  10344.  
  10345. stackBuf(B,F)
  10346. B: list 10 (buffer)
  10347.  
  10348. Optionally causes work buffer B to be saved on the buffer B stack instead of
  10349. being freed when freeBuf() is called or some other operation would cause
  10350. buffer B to be freed.  This option enables you to keep a buffer "history", so
  10351. that previously used search strings or copied hilite regions, for instance,
  10352. can be recovered.  stackBuf() applies only to work buffers, not to file
  10353. buffers.  If F=N, where N>0 and N<=32768, it causes buffer B to be stored on
  10354. the buffer B stack.  Up to N buffers can be stored in this way.  Once the
  10355. stack is holding N buffers, the oldest (first in) is removed before another
  10356. buffer is put onto the stack.  If F=0, buffer B is no longer saved on the
  10357. stack automatically when it is freed.  If F=-1, buffer stack B is cleared;
  10358. all buffers on stack B are freed.  If F=-2, the current flag status is
  10359. returned; if F=0 is returned, it means that buffers aren't being stacked; if
  10360. F=N is returned, where N>0, it means that up to N buffers are being stacked.
  10361. Note:  Use getStackSize() in order to get the number of buffers currently on
  10362. the buffer B stack.  Note:  For any work buffer, buffer-saving may or may not
  10363. be in effect.  You can find out its status by using flag=-2.  Suppose you
  10364. wish to free buf45 (for real).  You don't know whether buf45 is being saved
  10365. on the stack or not.  Use this example procedure:
  10366.     equateNum(n54,-2)                   .. use flag=-2 to find out the status
  10367.     if (stackBuf(buf45,n54))            .. if buffer-saving is in effect
  10368.         stackBuf(buf45,0)               .. turn off buffer-saving temporarily
  10369.     freeBuf(buf45)    .. now you can free it FOR REAL, not saving it on stack
  10370.     stackBuf(buf45,n54)                       .. restore buffer-saving status
  10371.  
  10372. startSpell(T,D,F)
  10373. T,D:  list 10 (text)
  10374. F:  list 10 (integer)
  10375.  
  10376. Loads in the spelling table file T and and either loads in or opens the
  10377. working dictionary file D.  If flag F is 0, it accesses working dictionary D
  10378. on disk.  If flag F is non-zero, it tries to load working dictionary D into
  10379. memory for faster spell-checking; if unable to load D into memory, it uses
  10380. the working dictionary D on disk.  It returns False, if the speller is
  10381. already up, if T or D is blank, if it cannot find table T or dictionary D, or
  10382. if it cannot find enough memory to store table T in memory.  (See spellerUp,
  10383. spell(), and stopSpell.)
  10384.  
  10385. Example:  startSpell("udtable","udict",1) ..F = 1, try to load udict into
  10386. memory.
  10387.  
  10388. stopSpell
  10389.  
  10390. Frees the speller's memory and closes the working dictionary file, if it is
  10391. open.  It returns False, if the speller is not up.
  10392.  
  10393. stringComp(N,S1,S2,F)
  10394. N:  list 10 (integer)
  10395. S1,S2:  list 10 (text)
  10396. F:  list 10 (integer)
  10397.  
  10398. Compares strings S1 and S2 using flag F and reports the result in N.  If flag
  10399. F is non-zero, it ignores upper/lower case in the comparison.  If flag F is
  10400. 0, upper and lower case are meaningful.  If the strings are equal, result N
  10401. is 0.  If N > 0 is reported, string S1 > S2.  If N < 0, string S1 < S2.  The
  10402. strings S1 and S2 may be up to 127 characters long; if longer than 127 bytes,
  10403. the strings are truncated.  stringComp() returns False, if either the strings
  10404. don't match or a string (S1 or S2) is empty or does not exist.
  10405.  
  10406. Example:  if (stringComp(n54,buf48,buf49,1)) putMsg("strings are equal")
  10407.  
  10408. sub(A,B,C)
  10409. A,B,C:  list 10 (integer)
  10410.  
  10411. A = B - C.  (See add(), mul(), div(), mod(), and(), and or().)
  10412.  
  10413. subMenu(D,A,N,C)
  10414. D,A:  literal
  10415. N,C:  list 10 (integer)
  10416.  
  10417. Creates a submenu item.  Description D and alternate text A must be a literal
  10418. in quotes up to 17 characters in length.  N is the menu # (1 to 7) that owns
  10419. the submenu.  C is the command-key, which must be a valid key argument or a
  10420. macro number, 1 to 1148.  It returns False, if the menu for this subitem has
  10421. not been defined yet, if N or C is out of range, if no memory is available,
  10422. if there are already 12 submenu items for the current menu item, or if the
  10423. command for C does not exist.  subMenu() may only be used in the Startup
  10424. command.  (See menu(), checkedMenu(), and checkedSubMenu().  See Config! for
  10425. examples.)
  10426.  
  10427. swapBuf(B1,B2)
  10428. B1,B2:  list 2 (buffer)
  10429.  
  10430. Swaps buffers B1 and B2.  It returns False, if B1=B2.  If either buffer is
  10431. curFile, the other buffer becomes curFile.  Only the buffer numbers are
  10432. swapped; the buffer flags and contents are unaltered.
  10433.  
  10434. Display Action:  Refreshes any split window that contains B1 or B2.
  10435.  
  10436. Example:  swapBuf(curFile,buf41)
  10437.  
  10438. swapChar(B,C)
  10439. B:  list 2 (buffer)
  10440. C:  list 9 (character or integer)
  10441.  
  10442. Replaces the character at the cursor in buffer B with the character C.  It
  10443. returns False, if B does not exist, if B is read-only, if the cursor is at
  10444. eof, or if C is an illegal character (ASCII 0 to 3) and the mapChars flag is
  10445. not On for buffer B.  If C is illegal and mapChars is On, the illegal
  10446. character is mapped into the legal character given in the table in the config
  10447. defaults.  swapChar() is faster and more efficient than typeChar() or
  10448. insertChar(), so it should be used preferentially.  swapChar() does not
  10449. advance the cursor.  (See insertChar(), clearChar(), copyChar(), and
  10450. typeChar().)
  10451.  
  10452. Display Action:  Refreshes B's window, if any and not curFile.  If B=curFile,
  10453. refreshes cursor; if offscreen, centers cursor.
  10454.  
  10455. swapKey(K1,K2)
  10456. K1,K2:  list 10 (integer)
  10457.  
  10458. Swaps the commands of keys K1 and K2.  K1 and K2 must be valid key arguments
  10459. or macro numbers in the range from 1 to 1148.  swapKey() returns False, if K1
  10460. or K2 is out of range, if K1=k2, or if neither key has an existing command.
  10461. If either key is the Startup command, the menus are removed so that they will
  10462. be rebuilt using the new Startup command during the next pause.  (See
  10463. Swapping Keys Permanently, 2.9.  See killKey() and copyKey().)
  10464.  
  10465. Example:  swapKey(normal-f1,shft-f1)
  10466.  
  10467. swapLoc(B,L1,L2)
  10468. B:      list 2
  10469. L1,L2:  list 7
  10470.  
  10471. Swaps locations L1 and L2 in buffer B.  Returns False if buffer B does not
  10472. exist.
  10473.  
  10474. Example:  swapLoc(curFile,sHilite,eHilite)
  10475.  
  10476. tabsToSpaces(B)
  10477. B: list 2
  10478.  
  10479. Converts all Tabs in buffer B to the appropriate number of spaces, based on
  10480. buffer B's tab ruler.  It returns False, if buffer B is read-only.  During
  10481. the conversion, the message "Tab->Space" is displayed.  If smartTabs is True
  10482. (see Config! defaults), tabs inside quotes are not converted; if smartTabs is
  10483. False, tabs inside quotes are converted.  (See spacesToTabs.)
  10484.  
  10485. Display Action:  If any tabs converted and cursor offscreen, it centers
  10486. cursor.
  10487.  
  10488. teachOne(K)
  10489. K:  list 10 (integer)
  10490.  
  10491. Displays the Teach Keys message for the key K.  K must be a valid key
  10492. argument or a macro number in the range 1 to 1148.  The first time teachOne()
  10493. is called (or the first time teachKeys mode is used) the key-help file is
  10494. copied to RAM:uejunk.  From then on, teachOne() and teachKeys mode work fast.
  10495. The junk file is not deleted from RAM:; getting rid of it is left up to the
  10496. user, so that teachKeys and teachOne() will work quickly if used again later
  10497. on.  If teachOne() or teachKeys mode cannot find the key-help file, the
  10498. message "No key-help file" is displayed.  If the key K has no help message,
  10499. the message "No help or unused" is displayed.  flipFlag(curFile,teachKeys)
  10500. turns on Teach mode, if a number of keys are to be investigated.  Use Amiga-
  10501. ESC to abort Teach mode, when finished using it.  (See flipFlag().  See
  10502. Building Key-Help for Teach Keys, 2.11.)
  10503.  
  10504. Example:  getKey(n54) teachOne(n54)   .. display the purpose of just one key.
  10505. execute("","delete RAM:uejunk")   .. delete the key-help file from RAM.
  10506.  
  10507. text(T,R,C,S,F)
  10508. T:        list 10 (text)
  10509. R,C,S,F:  list 10 (integer)
  10510.  
  10511. Displays text T at row R, column C, using color combination S, based on flag
  10512. or length F.  It displays text or clears all or part of the screen using the
  10513. desired colors without changing the contents of any buffer.  It can display
  10514. anywhere in Uedit's screen.  R and C are the text (not pixel) row and column;
  10515. if they are -1, text is appended by repeated calls to text().  S is a color
  10516. number 0-15.  (See the color tables in the Config! defaults.  Also see
  10517. setColors() and getColors().)  F is a flag or length:  If F>0, the text is
  10518. displayed and the field cleared to length=F using the specified colors.  If
  10519. F=0, the text is displayed only.  When F=-1, the text is displayed and the
  10520. display cleared to end of line.  When F=-2, the text is ignored and the
  10521. display is cleared to end of screen.  NOTE:  If you do something that updates
  10522. the window (other than by using text()), Uedit refreshes the window after a 4
  10523. second pause; this limits the lifetime of text displayed with text().  Also
  10524. the message line is cleared after a 4 second pause.  To prevent Uedit from
  10525. refreshing the window or message line, you may need to include the following
  10526. at the end of a command that uses text():
  10527.     while (not inputWaiting) delay(5) ..sleep until something is input
  10528. Note:  An internal flag prevents the right (menu) mouse button from clearing
  10529. the message line after text() or draw() has been used.  The internal flag is
  10530. cleared after some other type of displaying action is called for.
  10531.  
  10532. Display Action:  As described above.
  10533. Examples:  See the About... (SAC-a) and Show Vals (S-help) commands.
  10534.  
  10535. thisKey
  10536.  
  10537. Returns True, if the command it is in is the primary one - i.e., is running
  10538. at level 1.  It returns False, if the command it is in has been called by
  10539. some other command.  thisKey is useful in preventing refreshing of the
  10540. display when a command is run repeatedly by another command, such as when
  10541. running learned sequences or doing automatic searches and replaces.
  10542.  
  10543. Example:  if (thisKey) refreshDisplay
  10544.  
  10545. toggle(F)
  10546. F:  list 14 (flag)
  10547.  
  10548. Toggle the thing specified by flag F.  Toggle() always returns True.  TOTINY:
  10549. Uedit goes to tiny window during the next pause.  FAVORITE:  It toggles to
  10550. the next file buffer whose Favorite flag is turned On, making that buffer
  10551. curFile and refreshing the display.  CURFILE:  It toggles to the next file
  10552. buffer, making it curFile and refreshing the display.  WINDOWSPLIT:  It
  10553. toggles to the next split window, activating it, making it curFile, and
  10554. refreshing its display.  LACE:  The lace variable is rotated to the next
  10555. value in the range 0 to 3.  The screen is closed and reopened.  If lace=0, a
  10556. 4 color non-interlace screen (2 bitplanes) is used.  If lace=1, a 2 color
  10557. non-interlace screen (1 bitplane) is used.  If lace=2, an interlace 4 color
  10558. screen (2 bitplanes) is used.  If lace=3, an interlace 2 color screen (1
  10559. bitplane) is used.  TRAPMENUS:  If trapMenus is toggled On, the menu (right)
  10560. mouse button becomes the menuDown and menuUp keys.  SCROLLTYPE:  If
  10561. scrollType is toggled On, for faster scrolling colored regions aren't colored
  10562. during scrolls.  HIDEDISPLAY:  If hideDisplay is toggled On, displaying is
  10563. suppressed when running learned sequences or using the command multiplier.
  10564. (See setLocal() and flipFlag().)
  10565.  
  10566. Display Action:  See discussion above.
  10567.  
  10568. Example:  toggle(curFile)   .. switch to next file buffer.
  10569.  
  10570. toLower(B)
  10571. B:  list 2 (buffer)
  10572.  
  10573. Converts the character under the cursor in buffer B to lower case.  It
  10574. returns False, if B does not exist, if B is read-only, or if the cursor
  10575. character is not an upper-case letter "A" to "Z".  toLower() does not advance
  10576. the cursor.
  10577.  
  10578. Display Action:  Refreshes B's window, if any and not curFile.  If B=curFile,
  10579. refreshes cursor; if offscreen, centers cursor.
  10580.  
  10581. Example:  while (toLower(curFile)) moveCursor(curFile,eChar) .. word to lower.
  10582.  
  10583. toNumber(N,B)
  10584. N:  list 10 (integer)
  10585. B:  list 2 (buffer)
  10586.  
  10587. Converts the number at the cursor in buffer B into an integer in variable N.
  10588. It returns False, if B does not exist or if there is no number under the
  10589. cursor.  The cursor must be resting on a left parenthesis "(", a minus sign
  10590. "-", or a digit 0 to 9.  Numbers beginning with a left parenthesis or minus
  10591. sign are considered to be negative numbers.  The number may be decimal or
  10592. hexadecimal.  Hexadecimal numbers must begin with "0x".  toNumber() does not
  10593. advance the cursor.
  10594.  
  10595. toUpper(B)
  10596. B:  list 2 (buffer)
  10597.  
  10598. Converts the character under the cursor in buffer B to upper case.  It
  10599. returns False, if B does not exist, if B is read-only, or if the cursor
  10600. character is not lower-case "a" to "z".  It does not advance the cursor.
  10601.  
  10602. Display Action:  Refreshes B's window, if any and not curFile.  If B=curFile,
  10603. refreshes cursor; if offscreen, centers cursor.
  10604.  
  10605. Example:  while (toUpper(curFile)) moveCursor(curFile,eChar) ..word to upper.
  10606.  
  10607. toWord(B,N)
  10608. B:  list 2 (buffer)
  10609. N:  list 10 (integer)
  10610.  
  10611. Types the value of integer N into buffer B at the cursor.  It returns False,
  10612. if B is read-only.
  10613.  
  10614. Display Action:  Refreshes B's window, if any and not curFile.  If B=curFile,
  10615. refreshes cursor; if offscreen, centers cursor.
  10616.  
  10617. Example:  toWord(curFile,lineLength) ..type in lineLength at the cursor.
  10618.  
  10619. trackMouse
  10620.  
  10621. Continuously updates the mouse x-y location as the mouse is moved, as long as
  10622. the mouse button (left button, or right button if trapMenus is True) is held
  10623. down.  trackMouse is disabled, when running learned sequences or when in
  10624. Learn Mode.
  10625.  
  10626. Example:
  10627. <normal-buttonDown:    .. continuously track cursor as mouse is moved.
  10628.     while (not inputWaiting) {   .. this one is fun to watch.
  10629.         if (not mouseDown) return
  10630.         trackMouse
  10631.         moveCursor(curfile,mouseLoc)
  10632.         updateDisplay
  10633.     } >
  10634.  
  10635. typeChar(C)
  10636. C:  list 9 (character or integer)
  10637.  
  10638. Types character C into curFile at the cursor, just as if it were typed at the
  10639. keyboard.  curFile's typing settings for wordWrap, rightJustify, overStrike,
  10640. useTabs, autoIndent,
  10641.  
  10642. leftMargin, and lineLength are used just as in normal typing.  It returns
  10643. False, if curFile is read-only.  If C is an illegal character (ASCII 0 to 3)
  10644. and curFile's mapChars flag is On, the character is mapped using the table in
  10645. the config defaults.  If mapChars is Off and C is an illegal character,
  10646. typeChar() returns False.  (See insertChar() and swapChar().)
  10647.  
  10648. Cursor Action:  Cursor behaves just as in typing.
  10649.  
  10650. Display Action:  Refreshes cursor.
  10651.  
  10652. Example:  typeChar(13) typeChar(10) ..type CR and linefeed.
  10653.  
  10654. updateDisplay
  10655.  
  10656. Updates the display based on the current bits in the internal displayFlag
  10657. variable.  It returns False, if displayFlag is 0.  This is the most efficient
  10658. way to update the display.  displayFlag may or may not have bits set.  The
  10659. bits depend on what functions were called, what their conditions were, and
  10660. the order in which they were called.  Changing the order of the function
  10661. calls prior to updateDisplay may improve the results in some cases.
  10662.  
  10663. Display Action:  Updates the display based on internal displayFlag.
  10664.  
  10665. Example:  while (moveCursor(curFile,eWord)) updateDisplay
  10666.  
  10667. upFlag(B,F)
  10668. B:  list 2 (buffer)
  10669. F:  list 14 (flag)
  10670.  
  10671. Sets to True the value of flag F for buffer B.  (See the notes for
  10672. flipFlag().)  If flag F is a local (buffer) flag and buffer B does not exist,
  10673. it returns False.  If F is a global flag, B is ignored.  If the flag's value
  10674. is non-zero, a False is returned.  If the flag is zero, a True is returned.
  10675.  
  10676. Example:  if (upFlag(curFile,columnar)) alertUser("Turned on col display
  10677. mode")
  10678.  
  10679. vScroll(H)
  10680. H:  list 5 (How)
  10681.  
  10682. Scrolls curFile's display vertically based on H.  The display scrolling
  10683. occurs during the next pause based on the displayFlag bits and sPage.  It
  10684. returns False, if sPage does not change as a result of vScroll().  upLine and
  10685. downLine cause blitter scrolling; other arguments cause curFile's window to
  10686. be refreshed using the new sPage.  If scrollType is False, colored regions
  10687. are colored during the scroll; if scrollType is True, scrolling is somewhat
  10688. faster because regions aren't colored during the scroll.  (See hScroll().)
  10689.  
  10690. Example:
  10691. while (vScroll(downLine)) updateDisplay .. scroll visibly to end-of-file.
  10692.  
  10693. xor(A,B,C)
  10694. A,B,C: list 10 (numbers)
  10695.  
  10696. Returns the value A = C ^ B.  xor() returns False, if result A is 0;
  10697. otherwise it returns True.
  10698.  
  10699.