home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d07xx / d0770.lha / Uedit / Jenkins.LZH / config!E < prev    next >
Text File  |  1992-01-06  |  92KB  |  2,528 lines

  1. config!E
  2. ------------------------------------------------------------------------------
  3. Commands for editing, chars, page and par formatting, searching
  4.  
  5.  
  6. ==== SWAP, MULTIPLY, COUNT KEYS ====
  7.  
  8. ..<alt-m:                Swap the mouse's button-Up command with the next key-command pressed
  9. ..<normal-f5:            Swap next 2 commands. (Mouse buttons, menu selections, gadgets, keys.)
  10. ..<shftAlt-x:            Set command multiplier to use for next command.  See ctl-s and ctl-r.
  11. ..<shftAlt-i:            Count number of times the next command is successfully executed
  12. ..<alt-t:                Show key-help message on next key pressed.  Copy key-help to RAM: on first
  13. ..<shftAlt-t:            Show Key-help messages until Amiga-ESC to quit.
  14.  
  15.  
  16. ==== CURSOR LEFT & RIGHT ====
  17.  
  18. ..<normal-leftArrow:     Move cursor to left one char
  19. ..<normal-rightArrow:    Move cursor to right one char
  20. ..<shft-leftArrow:       Move cursor to start of word
  21. ..<shft-rightArrow:      Move cursor to end of word
  22. ..<alt-leftArrow:        Move cursor to start of sentence
  23. ..<alt-rightArrow:       Move cursor to end of sentence
  24. ..<ctl-leftArrow:        Move cursor to start of line
  25. ..<ctl-rightArrow:       Move cursor to end of line
  26.  
  27.  
  28. ==== CURSOR UP & DOWN ====
  29.  
  30. ..<normal-upArrow:       Move cursor up one line
  31. ..<normal-downArrow:     Move cursor down one line
  32. ..<shft-upArrow:         Move cursor up quarter pane (11 lines)
  33. ..<shft-downArrow:       Move cursor down quarter pane (11 lines)
  34. ..<alt-upArrow:          Flip up (backward) one pane
  35. ..<alt-downArrow:        Flip down (forward) one pane
  36. ..<normal-gadget4:       Flip and scroll up and down
  37. ..<ctl-upArrow:          Move cursor to start of file
  38. ..<ctl-downArrow:        Move cursor to end of file
  39.  
  40.  
  41. ==== LINES ====
  42.  
  43. ..<alt-b:                Open line for typing below cursor line, indent to match this line
  44. ..<alt-a:                Open line for typing above the current line, indent to match this line
  45. ..<alt-j:                Join next line to cursor line
  46. ..<alt-1:                Delete all trailing spaces in current document
  47. ..<alt-2:                Clear leading white space in cursor line
  48. ..<alt-3:                Flush right ..comment (must be a space before ..)
  49. ..<shftAlt-3:            Flush right the cursor line from cursor rightward
  50. ..<alt-4:                Flush right ..comments from cursor line forward (ask)
  51. ..<alt-5:                Match indent of cursor line to previous line, move down
  52. ..<alt-e:                Change end-of-line (eLine) character (normal is ASCII 10)
  53. ..<shftAlt-e:            Change all current file's end-of-line characters
  54. ..<shftAlt-s:            Sort lines in curFile.
  55.  
  56.  
  57. ==== PREKEY ====
  58.  
  59. ..<preKey:               Record present and last text entry locations
  60. ..<43:                   Note change in editing location
  61.  
  62.  
  63. ==== BOOKMARKS ====
  64.  
  65. ..<<normal-gadget4:3:       Set bookmark or move to a bookmark.
  66.  
  67.  
  68. ==== HILITE & INVERT ====
  69.  
  70. ..<ctl-1:                Start hilite (need if mouseless or doing learned sequence)
  71. ..<ctl-2:                End hilite (need if mouseless or doing learned sequence)
  72. ..<ctl-3:                Cancel hilite (need if mouseless or doing learned sequence)
  73. ..<ctl-4:                Start invert
  74. ..<ctl-5:                End invert
  75. ..<ctl-6:                Cancel invert
  76.  
  77.  
  78. ==== BUTTONDOWNS ====
  79.  
  80. ..<normal-buttonDown:    Place cursor, dbl-click=pick up word, sngl=start hilite, scroll
  81. ..<shft-buttonDown:      Adjust hilite if any
  82. ..<alt-buttonDown:       Move hilite, swap new sweep with old, pick up search, pick up hilite as search
  83. ..<shftAlt-buttonDown:   Copy hilite to new location, hilite insertion
  84.  
  85.  
  86. ==== CUT, COPY & PASTE using Buffer A (buf47) ====
  87.  
  88. ..<ctl-c:                Copy hilite or sentence into Buffer A, stack old
  89. ..<shftCtl-c:            Copy hilite or sentence, adding it into Buffer A at eFile
  90. ..<ctl-d:                Cut cursor line into Buffer A at eFile, adding if no cursor move (ignores hilite)
  91. ..<shftCtl-d:            Cut cursor line, adding it into Buffer A at eFile (ignores hilite)
  92. ..<ctl-x:                Cut hilite or sentence into Buffer A, stack old
  93. ..<shftCtl-x:            Cut sentence or hilite always adding it into Buffer A at eFile
  94. ..<ctl-v:                Insert Buffer A at cursor (last copy or cut)
  95. ..<ctl-p:                Insert Buffer A stack at cursor (unlimited history), scan stack
  96.  
  97.  
  98. ==== DELETE & UNDO using Buffer B (buf45) ====
  99.  
  100. ..<normal-bs:            Delete char to left of cursor or hilite into Buffer B
  101. ..<shft-bs:              Delete word or part to left into Buffer B
  102. ..<alt-bs:               Delete sentence or part to left into Buffer B
  103. ..<ctl-bs:               Delete paragraph or part to left into Buffer B
  104. ..<normal-del:           Delete char under cursor or hilite into Buffer B
  105. ..<shft-del:             Insert last block of deletions at cursor (undo from Buffer B)
  106.  
  107.  
  108. ==== TABS ====
  109.  
  110. ..<shftAlt-tab:          Show tab ruler above cursor line
  111. ..<shftCtl-tab:          Set tab ruler using mouse or keys
  112. ..<altCtl-tab:           Switch to/from using spaces for tabs or using real tabs
  113. ..<lAmiga-tab:           Convert tabs in document to spaces
  114. ..<rAmiga-tab:           Convert spaces in document to TABs
  115. ..<shftAltCtl-tab:       Set TAB table number (0-4) to use for TAB spacing
  116. ..<shft-tab:             Indent-Outdent a block of lines
  117.  
  118.  
  119. ==== CHAR ====
  120.  
  121. ..<ctl-u:                Convert char under cursor or hilight to upper case
  122. ..<altCtl-u:             Capatalize first letter of each word in hilite
  123. ..<ctl-l:                Convert char under cursor r hilight to lower case
  124. ..<shftAlt-c:            Insert CTRL-character, such as formfeed, etc
  125.  
  126.  
  127. ==== OVERSTRIKE, RIGHT JUSTIFY, AUTOINDENT, WORDWRAP ====
  128.  
  129. ..<shft-f5:              Toggle overstrike typing mode
  130. ..<ctl-j:                Toggle the right-justify typing mode
  131. ..<alt-f5:               Toggle autoindent typing mode
  132. ..<ctl-f5:               Toggle wordwrap typing mode
  133. ..<lAmiga-f5:            Toggle changed status of curFile
  134. ..<lAmiga-f4:            Switch displaying of cursor row-column off/on
  135.  
  136. ==== PAGE FORMAT ====
  137.  
  138. ..<ctl-return:           Set new line-length for this file only
  139. ..<lAmiga-p:             Input a new lines/page value for this file only
  140. ..<lAmiga-u:             Set top margin for this file only
  141. ..<lAmiga-l:             Set bottom margin for this file only
  142. ..<alt-c:                Center text in the line.  (Uses current line length.)
  143.  
  144.  
  145. ==== PARAGRAPH FORMAT ====
  146.  
  147. ..<ctl-f:                Reformat cursor paragraph, starting at cursor line, skip blankLines
  148. ..<ctl-g:                Reformat paragraph, go to end of paragraph
  149. ..<ctl-b:                Reformat block indented paragraph, go to end
  150. ..<ctl-a:                Reformat whole document (ask), return to last atCursor
  151. ..<ctl-h:                Reformat hanging indent, indented 3 chars, put cursor on outdent of first line
  152.  
  153.  
  154. ==== SEARCH & REPLACE ====
  155.  
  156. ..<altCtl-f7:            Toggle case-sensitivity of search
  157. ..<virtual-s:            CsSearch for buf49 match, embedded matches ignored
  158. ..<normal-gadget1:       Search forward or next buffer with a file
  159. ..<shft-gadget1:         Search backward or previous buffer with a file
  160. ..<shftCtl-f7:           Type in new search wild-card characters
  161. ..<ctl-f7:               Type in new search either-or character
  162. ..<normal-f7:            Type in search string (push old) and search fwd.  EitherOr = $, wilds= ? & *.
  163. ..<shft-f7:              Revise search string (push old) and search fwd
  164. ..<alt-f7:               Pick up hilite, or pop previous string, (push old, do not search)
  165. ..<normal-f8:            Type in replace text to use in search-replace
  166. ..<shft-f8:              Revise existing replace text
  167. ..<normal-f9:            CsSearch forward, mark matched region, put cursor at end of rgn
  168. ..<shft-f9:              CsSearch backward, mark matched region, put cursor at start of rgn
  169. ..<lAmiga-f9:            Search forward, mark matched region, put cursor at end of rgn
  170. ..<rAmiga-f9:            Search backward, mark matched region, put cursor at end of rgn
  171. ..<normal-f10:           Replace matched region with replace text, then search forward
  172. ..<shft-f10:             Replace matched region with replace text, then search backward
  173. ..<alt-f10:              Replace and continue forward cssearch-replace until search fails
  174. ..<shftCtl-i:            Check identifier usage, recording loc of next in list at bookmark d
  175.  
  176.  
  177. ==== MAKE LIST, REPLACE LIST ====
  178.  
  179. ..<ctl-i:                Pick up hilight in curFile, make list in buf41
  180. ..<ctl-e:                Replace names in curFile as per list in buf41
  181.  
  182.  
  183. ==== SESSION PROFILE ====
  184.  
  185. ..<shftAltCtl-f1:        Compile a profile of the session
  186.  
  187. ------------------------------------------------------------------------------
  188. locA-locB = Used within commands in various ways
  189. locC      = Set in text altering commands:
  190.                locC=atCursor after these copy/cut/deletes
  191.                   {normal,shft,alt,ctl}-bs
  192.                   normal-del
  193.                   ctl-{c,d,x}
  194.                locC!=atCursor after these pastes
  195.                   ctl-v
  196.                   shft-del
  197.                locC used in these commands such that locC!=atCursor afterward
  198.                   alt-buttonDown
  199.                   ctl-f
  200.             Tested in copy,cut,delete commands to see if this copy/cut/delete
  201.             should be added to the preceeding one because the cursor has not
  202.             moved since the last copy/cut/delete.  If locC=atCursor the copy/
  203.             cut/delete is added to the buffer, otherwise the buffer is cleared
  204.             first.
  205.                {normal,shft,alt,ctl}-bs  ->buf45 = A
  206.                normal-del                ->buf45
  207.                ctl-{c,d,x}               ->buf47 = B
  208. locD      = Location of last text entry before a large move and entry
  209.             (set in ..<43: which is invoked by prekey:)
  210.             (bookmark -1 goes to locD)
  211. locE      = Location of last text entry
  212.             (set in ..<43: which is invoked by prekey:)
  213.             (bookmark 0 goes to locE)
  214. locF-locJ = Bookmarks a-e, set by user
  215.  
  216. n58      (GLOBAL) initial index for learned sequences
  217. n60      (GLOBAL) large move flag, 0 = no move since last text entry
  218. ------------------------------------------------------------------------------
  219. buf41
  220. buf45
  221. buf46
  222. buf47
  223. buf48
  224. buf49
  225. buf50
  226. buf53
  227. buf55
  228. buf56
  229. buf57
  230. buf[n10]
  231. n0
  232. n1
  233. n10
  234. n11
  235. n12
  236. n13
  237. n14
  238. n15
  239. n16
  240. n2
  241. n21
  242. n22
  243. n23
  244. n24
  245. n25
  246. n26
  247. n27
  248. n28
  249. n29
  250. n3
  251. n4
  252. n60
  253. -------------------------------------------------------------------------------
  254.  
  255.  
  256. ==== SWAP, MULTIPLY, COUNT KEYS ====
  257.  
  258. Swap the mouse's button-Up command with the next key-command pressed
  259. <alt-m:
  260.    putMsg("Will swap mouse buttonUp with your next key:")
  261.    getKey(n0)
  262.    if (swapKey(n0,normal-buttonUp)) {
  263.        putMsg("Swapped.... To undo, do it again")
  264.        return }
  265.    putMsg(" ")
  266.    >Friday 12-Jul-91 08:36:45
  267.  
  268. Swap next 2 commands. (Mouse buttons, menu selections, gadgets, keys.)
  269. <normal-f5:
  270.     putMsg("Next 2 function keys will be swapped!")
  271.     if (getKey(n53) & getKey(n54) & swapKey(n53,n54))
  272.             { putMsg("Keys were swapped.") return }
  273.     putMsg(" ") >
  274.  
  275. Set command multiplier to use for next command.  See ctl-s and ctl-r.
  276. <shftAlt-x: 
  277.    putMsg("Type in command multiplier:") 
  278.    inputNum(cmdMultiplier)
  279.    >Sunday 14-Jul-91 10:24:40
  280.  
  281. Count number of times the next command is successfully executed
  282. <shftAlt-i:
  283.    equateNum(n0,0)
  284.    putMsg("Type in command multiplier:") 
  285.    inputNum(n1)
  286.    putMsg("Hit command to execute x times and count successes:")
  287.    if (getKey(n3)) {
  288.       do(n2,1,n1) if (runKey(n3)) incNum(n0)
  289.       freeBuf(buf50)
  290.       insertRgn(buf50,sFile,"Times executed successfully = ",all)
  291.       toWord(buf50,n0)
  292.       putMsg(buf50) }
  293.    >Sunday 14-Jul-91 10:53:40
  294.  
  295. Show key-help message on next key pressed.  Copy key-help to RAM: on first
  296. <alt-t:
  297.     putMsg("Help message on next key, gadget, click.")
  298.     getKey(n0)
  299.     teachOne(n0)
  300.    >Tuesday 16-Jul-91 19:22:46
  301.  
  302. Show Key-help messages until Amiga-ESC to quit.
  303. <shftAlt-t:
  304.    putMsg("Help message on keys, gadgets, clicks. Amiga-ESC to quit")
  305.    LABEL(0)
  306.    getKey(n0)
  307.    teachOne(n0)
  308.    goto label(0)
  309.    >Tuesday 16-Jul-91 19:26:26
  310.  
  311. ==== CURSOR LEFT & RIGHT ====
  312.  
  313. Move cursor to left one char
  314. <normal-leftArrow:
  315.    moveCursor(curFile,sChar)
  316.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)        ..sHi&eHi<=atCursor
  317.    refreshDisplay
  318.    >Tuesday 23-Jul-91 19:06:31
  319.  
  320. Move cursor to right one char
  321. <normal-rightArrow:
  322.    moveCursor(curFile,eChar)
  323.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  324.    refreshDisplay
  325.    >Saturday 08-Jun-91 20:33:49
  326.  
  327. Move cursor to start of word
  328. <shft-leftArrow:
  329.    moveCursor(curFile,sWord)
  330.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  331.    refreshDisplay
  332.    >Saturday 08-Jun-91 20:33:50
  333.  
  334. Move cursor to end of word
  335. <shft-rightArrow:
  336.    moveCursor(curFile,eWord)
  337.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  338.    refreshDisplay
  339.    >Saturday 08-Jun-91 20:33:50
  340.  
  341. Move cursor to start of sentence
  342. <alt-leftArrow:
  343.    ..if at the start of a sentence, we must move left to second .?!
  344.    ..skip !shitespace, whitespace, and then look for .?!
  345.    if (!is(curFile,whiteSpace)) moveCursor(curFile,sChar)
  346.    while (is(curFile,whiteSpace) & !is(curFile,sFile)) moveCursor(curFile,sChar)
  347.  
  348.    LABEL(0)
  349.    while (nothing) {               ..equivalent to setSearch(".$?$!") search <-
  350.       moveCursor(curFile,sChar)
  351.       if (is(curFile,".")) goto label(1)
  352.       if (is(curFile,"?")) goto label(1)
  353.       if (is(curFile,"!")) goto label(1)
  354.       if (is(curFile,blankLine)) goto label(1)
  355.       if (is(curFile,sFile)) goto label(2) }
  356.  
  357.    LABEL(1)
  358.                                             ..skip embedded .?! as in uedit.raj
  359.    moveCursor(curFile,eChar)
  360.    if (!is(curFile,whiteSpace)) {
  361.       moveCursor(curFile,sChar)
  362.       goto label(0) }
  363.    moveCursor(curFile,eChar)                                     ..move off .?!
  364.  
  365.    LABEL(2)
  366.                                                   ..alertUser("now skip white")
  367.    while(is(curFile,whiteSpace)) moveCursor(curfile,eChar)
  368.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  369.    refreshDisplay
  370.    >Friday 12-Jul-91 09:27:04
  371.  
  372. Move cursor to end of sentence
  373. <alt-rightArrow:
  374.    setSearch(".")
  375.    LABEL(0)
  376.    while (nothing) {               ..equivalent to setSearch(".$?$!") search <-
  377.       moveCursor(curFile,eChar)
  378.       if (is(curFile,".")) goto label(1)
  379.       if (is(curFile,"?")) goto label(1)
  380.       if (is(curFile,"!")) goto label(1)
  381.       if (is(curFile,blankLine)) goto label(1)
  382.       if (is(curFile,eFile)) goto label(2) }
  383.  
  384.    LABEL(1)
  385.                                             ..skip embedded .?! as in uedit.raj
  386.    moveCursor(curFile,eChar)
  387.    if (!is(curFile,whiteSpace)) {
  388.       moveCursor(curFile,sChar)
  389.       goto label(0) }
  390.    moveCursor(curFile,eChar)                                     ..move off .?!
  391.    while(is(curFile,whiteSpace)) moveCursor(curfile,eChar)
  392.  
  393.    LABEL(2)
  394.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  395.    refreshDisplay
  396.    >Friday 12-Jul-91 09:27:27
  397.  
  398. Move cursor to start of line
  399. <ctl-leftArrow:
  400.    moveCursor(curFile,sLine)
  401.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  402.    refreshDisplay
  403.    >Saturday 08-Jun-91 20:33:50
  404.  
  405. Move cursor to end of line
  406. <ctl-rightArrow:
  407.    moveCursor(curFile,eLine)
  408.    equateLoc(curFile,sHilite,eHilite)
  409.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  410.    refreshDisplay
  411.    >Saturday 08-Jun-91 20:33:51
  412.  
  413. ==== CURSOR UP & DOWN ====
  414.  
  415. Move cursor up one line
  416. <normal-upArrow:
  417.    moveCursor(curFile,upLine)
  418.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  419.    refreshDisplay
  420.    >Saturday 08-Jun-91 20:33:51
  421.  
  422. Move cursor down one line
  423. <normal-downArrow:
  424.    moveCursor(curFile,downLine)
  425.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  426.    refreshDisplay
  427.    >Saturday 08-Jun-91 20:33:51
  428.  
  429. Move cursor up quarter pane (11 lines)
  430. <shft-upArrow:
  431.    if (eqNum(n60,0)) equateNum(n60,1)       ..first large move after text entry
  432.    getSplitLines(n1,n2)                                         ..normally 0,47
  433.    sub(n2,n2,n1)                                                  ..normally 47
  434.    div(n2,n2,4)                                                   ..normally 11
  435.    ..alertUser(n2)..debug
  436.    moveCursor(curFile,sLine)
  437.    do(n10,0,n2) moveCursor(curFile,upLine)
  438.    if (eqLoc(curFile,atCursor,sPage)) vScroll(atCursor)
  439.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  440.    refreshDisplay
  441.    >Saturday 08-Jun-91 20:33:51
  442.  
  443. Move cursor down quarter pane (11 lines)
  444. <shft-downArrow:
  445.    if (eqNum(n60,0)) equateNum(n60,1)       ..first large move after text entry
  446.    getSplitLines(n1,n2)                                         ..normally 0,47
  447.    sub(n2,n2,n1)                                                  ..normally 47
  448.    div(n2,n2,4)                                                   ..normally 11
  449.    add(n2,n2,2)                                         ..somehow makes it work
  450.    ..alertUser(n2)..debug
  451.    moveCursor(curFile,sLine)
  452.    do(n10,0,n2) moveCursor(curFile,downLine)
  453.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  454.    refreshDisplay
  455.    >Saturday 08-Jun-91 20:33:51
  456.  
  457. -----------------------------------------------------------------------------
  458.     What I want is for normal-pgUp and normal-pgDown to flip the text exactly
  459. one screen up or down.
  460.     To emulate the usual wordprocessor commands the cursor would move to the
  461. top or bottom of the page on the first entry, then flip the page and place
  462. the cursor at the top of the page.  I always found that first cursor move
  463. quite confusing so I'm not unhappy that I did not do it that way.  The page
  464. flips regardless of where the cursor is at present.
  465.     I find the Uedit automatic scrolling which scrolls to place the cursor in
  466. the middle of the screen quite confusing.  I suppose I might eventually get
  467. used to it, but the WordPerfect style seems much easier to follow.  Getting
  468. the cursor back to the top of the screen requires an extra refreshDisplay to
  469. update sPage so that scrolling is possible.  That produces a distracting
  470. double display.  I decided to settle for the cursor in the middle of the
  471. screen.
  472. ----------------------------------------------------------------------------
  473.  
  474. Flip up (backward) one pane
  475. <alt-upArrow:
  476.    if (eqNum(n60,0)) equateNum(n60,1)       ..first large move after text entry
  477.    moveCursor(curFile,sPage)                             ..first line on screen
  478.    getSplitLines(n1,n2)                                         ..normally 0,47
  479.    sub(n2,n2,n1)
  480.    div(n2,n2,2)
  481.    ..alertUser(n2)..debug
  482.    do(n10,1,n2) moveCursor(curFile,upLine)
  483.    equateLoc(curFile,sHilite,eHilite)
  484.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  485.    refreshDisplay
  486.    >Saturday 08-Jun-91 20:33:52
  487.  
  488. Flip down (forward) one pane
  489. <alt-downArrow:
  490.    if (eqNum(n60,0)) equateNum(n60,1)       ..first large move after text entry
  491.    moveCursor(curFile,ePage)             ..first line below screen, top of next
  492.    getSplitLines(n1,n2)                                         ..normally 0,47
  493.    sub(n2,n2,n1)
  494.    if (mod(n3,n2,2)) add(n2,n2,1)                ..if screen size is odd, add 1
  495.    div(n2,n2,2)
  496.    ..alertUser(n2)..debug
  497.    do(n10,1,n2) moveCursor(curFile,downLine)
  498.    equateLoc(curFile,sHilite,eHilite)
  499.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  500.    refreshDisplay
  501.    >Saturday 08-Jun-91 20:33:52
  502.  
  503. |
  504. | Four regions in gadget 4, 5-5-5-7 char wide
  505. | Flip up, scroll up, scroll down, flip down
  506. |
  507. Flip and scroll up and down
  508. <normal-gadget4:
  509.    mouseXY(n10,n11)                   ..n10, n11 = mouse x,y = switch parameter
  510.    sub(n10,n10,480)                    ..first pixel in gadget 4 (60col)x(8pix)
  511.    div(n10,n10,40)                                        ..(character width)x4
  512.    add(n10,n10,1)                                             ..map to region #
  513.    ..putMsg(n10)
  514.    switch(n10) {
  515.       case(1) {runKey(alt-upArrow) }
  516.       case(2) {
  517.          vScroll(atCursor)
  518.          delay(1)                ..pause so a quick tap just centers the cursor
  519.          if (!mouseDown) return
  520.          runKey(ctl-3)
  521.          while (mouseDown) {
  522.             vScroll(atCursor)
  523.             moveCursor(curFile,upLine)
  524.             refreshDisplay } }
  525.       case(3) {
  526.          vScroll(atCursor)
  527.          delay(1)
  528.          if (!mouseDown) return
  529.          runKey(ctl-3)
  530.          while (mouseDown) {
  531.             vScroll(atCursor)
  532.             if (!mouseDown) return
  533.             moveCursor(curFile,downLine)
  534.             refreshDisplay } }
  535.       default {runKey(alt-downArrow) } }
  536.    >Wednesday 31-Jul-91 15:40:58
  537.  
  538. Move cursor to start of file
  539. <ctl-upArrow:
  540.    ..if first large move after text entry, have prekey back up loc
  541.    if (eqNum(n60,0)) equateNum(n60,1)
  542.    moveCursor(curFile,sFile)
  543.    equateLoc(curFile,sHilite,eHilite)
  544.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  545.    refreshDisplay
  546.    >Saturday 08-Jun-91 20:33:52
  547.  
  548. Move cursor to end of file
  549. <ctl-downArrow:
  550.    if (eqNum(n60,0)) equateNum(n60,1)
  551.    moveCursor(curFile,eFile)
  552.    equateLoc(curFile,sHilite,eHilite)
  553.    if (gtLoc(curFile,eHilite,sHilite)) runKey(ctl-3)
  554.    refreshDisplay
  555.    >Saturday 08-Jun-91 20:33:52
  556.  
  557.  
  558. ==== LINES ====
  559.  
  560. Open line for typing below cursor line, indent to match this line
  561. <alt-b:
  562.    equateNum(n14,0)
  563.    if (!getFlag(curFile,autoIndent)) {
  564.        flipFlag(curFile,autoIndent)
  565.        equateNum(n14,1)
  566.    }
  567.    if (!is(curFile,eLine)) moveCursor(curFile,eLine)
  568.    typeChar(eLine)
  569.    if (eqNum(n14,1)) flipFlag(curFile,autoIndent)
  570.    equateLoc(curFile,sHilite,eHilite)
  571.    refreshDisplay
  572.    >Saturday 08-Jun-91 20:33:53
  573.  
  574. Open line for typing above the current line, indent to match this line
  575. <alt-a:
  576.    equateNum(n14,0)
  577.    if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  578.    while (is(curFile,space)) {moveCursor(curFile,eChar) incNum(n14)}
  579.    moveCursor(curFile,upLine)
  580.    if (!is(CurFile,eLine)) moveCursor(curFile,eLine)
  581.    insertChar(curFile,eLine)
  582.    while (gtNum(n14,0)) {typeChar(" ") decNum(n14) }
  583.    equateLoc(curFile,sHilite,eHilite)
  584.    refreshDisplay
  585.    >Saturday 08-Jun-91 20:33:53
  586.  
  587. Join next line to cursor line
  588. <alt-j:
  589.    if (!is(curFile,eLine)) moveCursor(curFile,eLine)
  590.    equateLoc(curFile,locA,atCursor)
  591.    while (moveCursor(curFile,eChar)
  592.        & (is(curFile,space) | is(curFile,9))) nothing
  593.    equateLoc(curFile,locB,atCursor)
  594.    clearRgn(curFile,loc)
  595.    if (!is(curFile,eFile)) insertChar(curFile," ")
  596.    equateLoc(curFile,sHilite,eHilite)
  597.    refreshDisplay
  598.    >Monday 15-Jul-91 22:30:08
  599.  
  600. Delete all trailing spaces in current document
  601. <alt-1:
  602.    equateLoc(curFile,locA,atCursor)
  603.    moveCursor(curFile,sFile)
  604.    putMsg("Scanning, please wait....")
  605.    while (nothing) {
  606.        if (is(curFile,eFile)) {
  607.           equateLoc(curFile,atCursor,locA)
  608.           putMsg("Deleted all trailing spaces")
  609.           return }
  610.        moveCursor(curFile,eLine)
  611.        moveCursor(curFile,sChar)
  612.        while (is(curFile,space) | is(curFile,9)) {
  613.            clearChar(curFile)
  614.            moveCursor(curFile,sChar) }
  615.        moveCursor(curFile,eLine) }
  616.    >Saturday 22-Jun-91 13:13:05
  617.  
  618. Clear leading white space in cursor line
  619. <alt-2:
  620.    equateLoc(curFile,locA,atCursor)
  621.    if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  622.    while (is(curFile,whiteSpace) & !is(curFile,eLine) & !is(curFile,12))
  623.       clearChar(curFile)
  624.    equateLoc(curFile,atCursor,locA)
  625.    moveCursor(curFile,downLine)
  626.    >Saturday 20-Jul-91 21:15:45
  627.  
  628. Flush right ..comment (must be a space before ..)
  629. <alt-3:
  630.    if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  631.    while (!is(curFile,eLine)) {
  632.       if (is(curFile,".")) {
  633.          moveCursor(curFile,eChar)
  634.          if (is(curFile,".")) {
  635.             ..alertUser("found ..")..debug
  636.             runKey(shftAlt-3)
  637.             returnTrue } }
  638.       moveCursor(curFile,eChar) }
  639.    putMsg("Use ShftAlt-3 to flush part of a noncomment line")
  640.    beepDisplay
  641.    >Saturday 20-Jul-91 21:20:30
  642.  
  643. Flush right the cursor line from cursor rightward
  644. <shftAlt-3:
  645.    ..back up to first space
  646.    if (!is(curFile,sLine)) {
  647.       while(!(is(curFile,whiteSpace) | is(curFile,sLine))) moveCursor(curFile,sChar) }
  648.    ..flush left, it might have been too far right
  649.    if (!is(curFile,sLine)) {
  650.       while (is(curFile,whiteSpace) & !is(curFile,sLine)) {
  651.           clearChar(curFile)
  652.           moveCursor(curFile,sChar) }
  653.       moveCursor(curFile,eChar)
  654.       insertChar(curFile," ") }
  655.    equateLoc(curFile,locA,atCursor)
  656.    ..compute space at right end
  657.    if (!is(curFile,eLine)) moveCursor(curFile,eLine)
  658.    ..delete spaces at right end
  659.    moveCursor(curFile,sChar)
  660.    while (is(curFile,space)) {
  661.       clearChar (curFile)
  662.       moveCursor(curFile,sChar) }
  663.    locToCol(curFile,n4,atCursor)
  664.    decNum(n4)
  665.    getLocal(curFile,n3,lineLength)
  666.    sub(n4,n3,n4)
  667.    moveCursor(curFile,locA)
  668.    ..flush right
  669.    if (gtNum(n4,0)) while (decNum(n4)) insertChar(curFile," ")
  670.    equateLoc(curFile,sHilite,eHilite)
  671.    refreshDisplay
  672.    >Saturday 20-Jul-91 21:28:09
  673.  
  674. Flush right ..comments from cursor line forward (ask)
  675. <alt-4:
  676.    setSearch("..")
  677.    if (!search(curFile,sHilite,eHilite,1)) {
  678.          putMsg("NO ..comment lines below here")
  679.          return }
  680.       else {
  681.          vScroll(atCursor)
  682.          updateDisplay
  683.          putMsg("search upArrow, downArrow, f=flush right, q=quit") }
  684.  
  685.    LABEL(0) ..search/comment/uncomment loop
  686.    getKeyVal(macroNum,inputChar)
  687.    equateNum(n0,77)
  688.  
  689.    LABEL(1)
  690.    switch(macroNum) {
  691.       case(77) {                                                    ..downArrow
  692.          setSearch("..")
  693.          equateNum(n0,macroNum)
  694.          if (!search(curFile,sHilite,eHilite,1)) {
  695.                putMsg("NO ..comment lines below here")
  696.                return }
  697.             else {
  698.                vScroll(atCursor)
  699.                updateDisplay
  700.                putMsg("search upArrow, downArrow, f=flush right, q=quit") } }
  701.       case(76) {                                                      ..upArrow
  702.          setSearch("..")
  703.          equateNum(n0,macroNum)
  704.          if (!search(curFile,sHilite,eHilite,-1)) {
  705.                putMsg("NO ..debug lines above here")
  706.                return }
  707.             else {
  708.                vScroll(atCursor)
  709.                updateDisplay
  710.                putMsg("search upArrow, downArrow, f=flush right, q=quit") } }
  711.       case(35) {                                                        ..flush
  712.          runKey(alt-3)
  713.          updateDisplay
  714.          equateNum(macroNum,n0)
  715.          switch(macroNum) {
  716.             case(77) {moveCursor(curFile,eLine) }
  717.             case(76) {moveCursor(curFile,sLine) } }
  718.          goto label(1) }
  719.       case("q") {putMsg("Quit flush ..comment right") return}
  720.       default   {putMsg("Quit flush ..comment right") beepDisplay return} }
  721.    goto label(0)
  722.    >Tuesday 23-Jul-91 22:19:48
  723.  
  724. Match indent of cursor line to previous line, move down
  725. <alt-5:
  726.    equateNum(n14,0)
  727.    moveCursor(curFile,upLine)
  728.    if (!getFlag(curFile,autoIndent)) {
  729.        flipFlag(curFile,autoIndent)
  730.        equateNum(n14,1)
  731.    }
  732.    if (!is(curFile,eLine)) moveCursor(curFile,eLine)
  733.    clearChar(curFile)
  734.    typeChar(eLine)
  735.    if (eqNum(n14,1)) flipFlag(curFile,autoIndent)
  736.    moveCursor(curFile,downLine)
  737.    equateLoc(curFile,sHilite,eHilite)
  738.    refreshDisplay
  739.    >Saturday 22-Jun-91 13:13:14
  740.  
  741. Change end-of-line (eLine) character (normal is ASCII 10)
  742. <alt-e:
  743.    if (askYesNo("Change existing EOLs for whole file?")) {
  744.       runKey(ctl-e)
  745.       returnTrue }
  746.    putMsg("Input new EOL value (usually 10 or 13):")
  747.    inputNum(n14)
  748.    setEol(n14)
  749.    updateDisplay
  750.    >Saturday 22-Jun-91 12:42:52
  751.  
  752. Change all current file's end-of-line characters
  753. <shftAlt-e:
  754.    freeBuf(buf50)
  755.    insertRgn(buf50,sFile,
  756.       "Input file's current end-of-line value (usually 10 or 13):  old=",all)
  757.    moveCursor(curFile,sFile)
  758.    moveCursor(curFile,eLine)
  759.    copyChar(curFile,n0)
  760.    toWord(buf50,n0)
  761.    putMsg(buf50)
  762.    inputNum(n14)
  763.    if (!gtNum(n14,0)) returnFalse
  764.    putMsg("Input new end-of-line value (usually 10 or 13):")
  765.    inputNum(n13)
  766.    if (!gtNum(n13,0)) returnFalse
  767.    setEol(n14)
  768.    moveCursor(curFile,sFile)
  769.    putMsg("Changing eol characters... Amiga-ESC=abort.")
  770.    if (is(curFile,n14)) swapChar(curFile,n13)
  771.    while (moveCursor(curFile,eLine))
  772.        if (is(curFile,n14)) swapChar(curFile,n13)
  773.    setEol(n13)
  774.    vScroll(sFile)
  775.    freeBuf(buf50)
  776.    insertRgn(buf50,sFile,
  777.       "Existing EOLs changed for whole file and new EOL set: ",all)
  778.    toWord(buf50,n0)
  779.    putMsg(buf50)
  780.    updateDisplay
  781.    >Thursday 11-Jul-91 16:12:02
  782.  
  783. Sort lines in curFile.
  784. <shftAlt-s:
  785.    sortLines(curFile,0)
  786.    >Saturday 08-Jun-91 20:33:55
  787.  
  788. ==== PREKEY ====
  789.  
  790. Record present and last text entry locations
  791. <preKey:
  792.    ..have to have a way to kill it
  793.    if (eqNum(macroNum,shftAltCtl-esc)) killKey(preKey)
  794.    if (!eqNum(inputChar,0) | eqNum(inputChar,10)) {                 ..printable
  795.       ..kill any hilite
  796.       if (gtLoc(curFile,eHilite,sHilite)) {
  797.          runKey(ctl-3)
  798.          if (eqNum(inputChar,10)) updateDisplay }
  799.       runKey(43)                                             ..update locD,locE
  800.       }
  801.    >Friday 12-Jul-91 09:42:50
  802.  
  803. |
  804. |  used when text is being changed:
  805. |  prekey,                       (text entry)
  806. |  {normal,shft,alt,ctl}-bs      (delete char,word,sen,par)
  807. |  normal-del                    (delete char)
  808. |  ctl-{d,x,v}                   (cut,paste)
  809. |  shftCtl-{d,x}                 (cut)
  810. |  shft-del                      (undo=paste)
  811. |  alt-buttonDown                (move hilite)
  812. |  shftAlt-buttonDown            (copy hilite to new loc)
  813. |
  814. Note change in editing location
  815. <43:
  816.    if (gtNum(n60,0)) {                               ..changing text after move
  817.       equateLoc(curFile,locD,locE)                       ..push old loc to locD
  818.       equateNum(n60,0) }                                         ..move is over
  819.    equateLoc(curFile,locE,atCursor)                        ..record current loc
  820.    >Saturday 08-Jun-91 20:33:53
  821.  
  822.  
  823. ==== BOOKMARKS ====
  824.  
  825. |
  826. |  locD      = text entry before last large move (bookmark -1)
  827. |  locE      = last text entry (bookmark 0)
  828. |  locF-locJ = bookmarks a-e (locH is compile mark)
  829. |  remember: you get a beep if you compile this with bookmark c
  830. |
  831. Set bookmark or move to a bookmark.
  832. <normal-gadget3:
  833.    mouseXY(n10,n11)                   ..n10, n11 = mouse x,y = switch parameter
  834.    sub(n10,n10,320)                    ..first pixel in gadget 3 (40col)x(8pix)
  835.    div(n10,n10,8)                                             ..character width
  836.    add(n10,n10,1)                                               ..map to mark #
  837.    ..putMsg(n10)..debug
  838.    switch(n10) {
  839.       case(1) {                                                         ..set a
  840.          incNum(27)
  841.          equateLoc(curFile,locF,atCursor) 
  842.          beepDisplay }
  843.       case(2) {                                                             ..b
  844.          incNum(28)
  845.          equateLoc(curFile,locG,atCursor) 
  846.          beepDisplay }
  847.       case(3) {                                                             ..c
  848.          equateLoc(curFile,locH,atCursor) 
  849.          beepDisplay }
  850.       case(4) {                                                             ..d
  851.          equateLoc(curFile,locI,atCursor) 
  852.          equateNum(n66,curFile)
  853.          beepDisplay }
  854.       case(5) {                                                             ..e
  855.          equateLoc(curFile,locJ,atCursor) 
  856.          equateNum(n67,curFile)
  857.          beepDisplay }
  858.       case(10) {                                     ..SETc go to c and compile
  859.          incNum(n21)                                                  ..profile
  860.          equateLoc(curFile,locA,atCursor)
  861.          moveCursor(curFile,locH)
  862.          if (is(curFile,"<")) {
  863.             equateLoc(curFile,sHilite,atCursor)
  864.             moveCursor(curFile,eLine)
  865.             equateLoc(curFile,eHilite,atCursor)
  866.             freeBuf(buf50)
  867.             insertRgn(buf50,sFile,curFile,hilite)
  868.             moveCursor(curFile,locH)
  869.             if (runKey(normal-f6)) {
  870.                insertRgn(buf50,eFile," compiled",all)
  871.                putMsg(buf50)
  872.                moveCursor(curFile,locA)
  873.                refreshDisplay } } }
  874.       case(11) {               ..char 11&12=-1=go to text entry loc before last
  875.          incNum(n22)                                                  ..profile
  876.          equateLoc(curFile,atCursor,locD)
  877.          ..if first large move after text entry, have prekey back up loc
  878.          if (eqNum(n60,0)) equateNum(n60,1)
  879.          vScroll(atCursor) }
  880.       case(12) {
  881.          incNum(n22)                                                  ..profile
  882.          equateLoc(curFile,atCursor,locD)
  883.          if (eqNum(n60,0)) equateNum(n60,1)
  884.          vScroll(atCursor) }
  885.       case(14) {                                     ..14 go to last text entry
  886.          incNum(n23)                                                  ..profile
  887.          equateLoc(curFile,atCursor,locE)
  888.          if (eqNum(n60,0)) equateNum(n60,1)
  889.          vScroll(atCursor) }
  890.       case(15) {                                                      ..go to a
  891.          incNum(n24)                                                  ..profile
  892.          equateLoc(curFile,atCursor,locF)
  893.          if (eqNum(n60,0)) equateNum(n60,1)
  894.          vScroll(atCursor) }
  895.       case(16) {                                                            ..b
  896.          incNum(n25)                                                  ..profile
  897.          equateLoc(curFile,atCursor,locG)
  898.          if (eqNum(n60,0)) equateNum(n60,1)
  899.          vScroll(atCursor) }
  900.       case(17) {                                                            ..c
  901.          equateLoc(curFile,atCursor,locH)
  902.          if (eqNum(n60,0)) equateNum(n60,1)
  903.          vScroll(atCursor) }
  904.       case(18) {                                                            ..d
  905.          if (getFileName(buf50,buf[n66])) {
  906.                editBuf(buf[n66])
  907.                equateLoc(curFile,atCursor,locI)
  908.                if (eqNum(n60,0)) equateNum(n60,1)
  909.                vScroll(atCursor) }
  910.             else {
  911.                putMsg("Buffer containing bookmark d has been closed")
  912.                beepDisplay } }
  913.       case(19) {                                                            ..e
  914.          if (getFileName(buf50,buf[n67])) {
  915.                editBuf(buf[n67])
  916.                equateLoc(curFile,atCursor,locJ)
  917.                if (eqNum(n60,0)) equateNum(n60,1)
  918.                vScroll(atCursor) }
  919.             else {
  920.                putMsg("Buffer containing bookmark e has been closed")
  921.                beepDisplay } }
  922.       }  ..gadget3 character # switch(n10) 
  923.    runKey(ctl-3)
  924.    refreshDisplay
  925.    >Monday 29-Jul-91 14:31:23
  926.  
  927. ==== HILITE & INVERT ====
  928.  
  929. Start hilite (need if mouseless or doing learned sequence)
  930. <ctl-1:
  931.    ..normal-mouseDown places cursor
  932.    equateLoc(curFile,sHilite,atCursor)
  933.    refreshDisplay
  934.    >Saturday 08-Jun-91 20:33:57
  935.  
  936. End hilite (need if mouseless or doing learned sequence)
  937. <ctl-2:
  938.    equateLoc(curFile,eHilite,atCursor)
  939.    refreshDisplay
  940.    >Saturday 08-Jun-91 20:33:57
  941.  
  942. |
  943. | Reset both sHilite and eHilite so we can move cursor with arrows without
  944. | loosing the location.  To create a hilite use ctl-3 first and then ctl-1 or
  945. | ctl-2 to set the other end
  946. |
  947. Cancel hilite (need if mouseless or doing learned sequence)
  948. <ctl-3:
  949.    equateLoc(curFile,sHilite, atCursor)
  950.    equateLoc(curFile,eHilite, atCursor)
  951.    refreshDisplay
  952.    >Saturday 08-Jun-91 20:33:57
  953.  
  954. Start invert
  955. <ctl-4:
  956.    equateLoc(curFile,sInvert,atCursor)
  957.    refreshDisplay
  958.    >Saturday 08-Jun-91 20:33:57
  959.  
  960. End invert
  961. <ctl-5:
  962.    equateLoc(curFile,eInvert,atCursor)
  963.    refreshDisplay
  964.    >Saturday 08-Jun-91 20:33:57
  965.  
  966. |
  967. | Done the same way as hilite for consistency
  968. |
  969. Cancel invert
  970. <ctl-6:
  971.    equateLoc(curFile,sInvert,atCursor)
  972.    equateLoc(curFile,eInvert,atCursor)
  973.    refreshDisplay
  974.    >Saturday 08-Jun-91 20:33:58
  975.  
  976.  
  977. ==== BUTTONDOWNS ====
  978.  
  979. Place cursor, dbl-click=pick up word, sngl=start hilite, scroll
  980. <normal-buttonDown:
  981.    trackMouse                                                   ..until mouseUp
  982.    equateLoc(curFile,locA,mouseLoc)                     ..record start of sweep
  983.    equateLoc(curFile,atCursor,mouseLoc)
  984.    runKey(ctl-3)                                            ..cancel old hilite
  985.    refreshDisplay                                                 ..show cursor
  986.    ..delay(1)                               ..wait extra 1/10 sec for dbl click
  987.    
  988.    ..process first key after mouseDn, if it came already
  989.    if (inputWaiting) inputKey(n0)                             ..swallow mouseUp
  990.    
  991.    ..process second key after mouseDn, if it came already
  992.    if (inputWaiting &                            ..quick keystroke of some sort
  993.        inputKey(n0) &                                                  ..get it
  994.        eqLoc(curFile,atCursor,mouseLoc)) {  ..same mouseLoc as previous key
  995.       ..if there is a regular keystroke inside the delay, print it or do it
  996.       if (!eqNum(n0,96)) {  ..quick key but not mouseDown
  997.             if (!eqNum(inputChar,0))
  998.                   typeChar(inputChar)
  999.                else 
  1000.                   switch(macroNum) {
  1001.                      ..things we might do quickly after mouseDown
  1002.                      case(70) {runKey(normal-del) }
  1003.                      case(65) {runKey(normal-bs) }
  1004.                      case(66) {runKey(normal-tab) }
  1005.                      default {nothing} } }
  1006.          else {..dblClick, pick up word
  1007.             if (is(curFile,whiteSpace)) return
  1008.             if (!is(curFile,sWord)) moveCursor(curFile,sWord)
  1009.             equateLoc(curFile,sHilite,atCursor)
  1010.             moveCursor(curFile,eWord)
  1011.             equateLoc(curFile,eHilite,atCursor)
  1012.             equateLoc(curFile,locA,atCursor)
  1013.             refreshDisplay                                     ..show hilited word
  1014.             if (!isEmpty(buf49)) push(buf49,buf49)      ..Alt-F7 will pop this search
  1015.             insertRgn(buf49,sFile,curFile,hilite)
  1016.             freeBuf(buf50)
  1017.             insertRgn(buf50,sFile,"Search string is: ",all)
  1018.             insertRgn(buf50,eFile,buf49,all)
  1019.             putMsg(buf50)
  1020.             return } }
  1021.    
  1022.    ..process first key after delay, if mouse is still down
  1023.    ..single click, or dbl too late, may sweep now
  1024.    if (!mouseDown) return                                        ..short click?
  1025.  
  1026.    getSplitLines(n1,n2)                         ..determine row range of window
  1027.    add(n1,n1,2)                                                ..top row number
  1028.    add(n2,n2,2)                                             ..bottom row number
  1029.    mul(n1,n1,8)                           ..n1 = top pixel number,8 pix per row
  1030.    mul(n2,n2,8)                                      ..n2 = bottom pixel number
  1031.  
  1032.    if (!mouseDown) return                                   ..too short a sweep
  1033.    while (!inputWaiting) {       ..mouseUp or anything  will terminate tracking
  1034.       trackMouse
  1035.       ..continuously update hilite
  1036.       if (gtLoc(curFile,locA,mouseLoc)) {                         ..moving left
  1037.             equateLoc(curFile,sHilite,mouseLoc)
  1038.             equateLoc(curFile,atCursor,mouseLoc)
  1039.             equateLoc(curFile,eHilite,locA) }
  1040.          else {                                                  ..moving right
  1041.             equateLoc(curFile,eHilite,mouseLoc)
  1042.             equateLoc(curFile,atCursor,mouseLoc)
  1043.             equateLoc(curFile,sHilite,locA) }
  1044.  
  1045.       ..scroll only if mouse is in scroll regions
  1046.       mouseXY(n3,n4)
  1047.       if (geNum(n4,n2)) {                           ..mouse at bottom of screen
  1048.             vscroll(2)                                ..speed up this direction
  1049.             refreshDisplay }
  1050.          else if (geNum(n1,n4)) {                      ..mouse at top of screen
  1051.             vscroll(-1)
  1052.             refreshDisplay }
  1053.          else                                                   ..do not scroll
  1054.             refreshDisplay }                                  ..show new hilite
  1055.  
  1056.    equateLoc(curFile,atCursor,eHilite)                    ..leave cursor at end
  1057.    refreshDisplay                    ..show cursor at eHilite if swept backward
  1058.    >Tuesday 30-Jul-91 19:24:37
  1059.  
  1060. |
  1061. | to right of sHilite adjusts eHilite
  1062. | to left of sHilite adjusts sHilite
  1063. |
  1064. Adjust hilite if any
  1065. <shft-buttonDown:
  1066.    if (gtLoc(curFile,eHilite,sHilite)) {
  1067.       equateLoc(curFile,atCursor,mouseLoc)
  1068.       if (gtLoc(curFile,atCursor,sHilite)) {
  1069.             equateLoc(curFile,eHilite,atCursor)
  1070.             refreshDisplay }
  1071.          else {
  1072.             equateLoc(curFile,sHilite,atCursor)
  1073.             refreshDisplay } }
  1074.    >Saturday 08-Jun-91 20:33:58
  1075.  
  1076. |
  1077. | if no hilite, if sweep pick up search
  1078. | if hilite, in hilite pick up search
  1079. | if hilite, outside hilite, no sweep move hilite
  1080. | if hilite, outside hilite, sweep inverts, swap hilite and invert
  1081. | swap doesn't work if swapping right to left and no space inbetween because
  1082. |    we cut invert and insert it at start of hilite, then move hilite, but
  1083. |    the hilite moves to where it was at the right of the invert.
  1084. |
  1085. Move hilite, swap new sweep with old, pick up search, pick up hilite as search
  1086. <alt-buttonDown:
  1087.    if (!gtLoc(curFile,eHilite,sHilite)) {                ..no hilite, may sweep
  1088.       equateLoc(curFile,sHilite,mouseLoc)
  1089.       equateLoc(curFile,eHilite, mouseLoc)
  1090.       equateLoc(curFile,locA,mouseLoc)
  1091.       while (!inputWaiting) {               ..any input will terminate tracking
  1092.          trackMouse
  1093.          ..update Hilite definition
  1094.          if (gtLoc(curFile,locA,mouseLoc)) {                      ..moving left
  1095.                equateLoc(curFile,sHilite,mouseLoc)
  1096.                equateLoc(curFile,atCursor,mouseLoc)
  1097.                equateLoc(curFile,eHilite,locA)
  1098.                refreshDisplay }
  1099.             else {                                               ..moving right
  1100.                equateLoc(curFile,eHilite,mouseLoc)
  1101.                equateLoc(curFile,atCursor,mouseLoc)
  1102.                equateLoc(curFile,sHilite,locA)
  1103.                refreshDisplay } }
  1104.       if (gtLoc(curFile,eHilite,sHilite)) {             ..swept to hilite block
  1105.          if (!isEmpty(buf49)) push(buf49,buf49)
  1106.          insertRgn(buf49,sFile,curFile,hilite)
  1107.          freeBuf(buf55)
  1108.          insertRgn(buf55,sFile,"Search string is: ",all)
  1109.          insertRgn(buf55,eFile,buf49,all)
  1110.          putMsg(buf55) 
  1111.          runKey(normal-F9)                                   ..CsSearch forward
  1112.          returnTrue } }
  1113.  
  1114.    if (geLoc(curFile,mouseLoc,sHilite) & 
  1115.        geLoc(curFile,eHilite,mouseLoc)) {           ..in hilite, pick up search
  1116.       if (!isEmpty(buf49)) push(buf49,buf49)
  1117.       insertRgn(buf49,sFile,curFile,hilite)
  1118.       freeBuf(buf50)
  1119.       insertRgn(buf50,sFile,"Search string is: ",all)
  1120.       insertRgn(buf50,eFile,curFile,hilite)
  1121.       putMsg(buf50)
  1122.       runKey(normal-f9)                                      ..CsSearch forward
  1123.       returnTrue }
  1124.                                            ..mouse outside hilite, move or swap
  1125.    equateLoc(curFile,locA,sHilite)                    ..locA = original sHilite
  1126.    equateLoc(curFile,locB,mouseLoc)                  ..locB = start of new area
  1127.    equateLoc(curFile,sInvert,locB)
  1128.    equateLoc(curFile,eInvert,locB)
  1129.    while (trackMouse) {
  1130.       if (gtLoc(curFile,mouseLoc,locB))
  1131.             equateLoc(curFile,eInvert,mouseLoc)
  1132.          else
  1133.             equateLoc(curFile,sInvert,mouseLoc)
  1134.       refreshDisplay }
  1135.    equateLoc(curfile,locC,mouseLoc)                    ..locC = end of new area
  1136.    if(gtLoc(curFile,locC,locB)) {                                        ..swap
  1137.       ...copy invert, delete, insert at sHilite
  1138.       equateLoc(curFile,sInvert,locB)
  1139.       equateLoc(curFile,eInvert,locC) }
  1140.    if(gtLoc(curFile,locB,locC)) {                                        ..swap
  1141.       ...copy invert, delete, insert at sHilite
  1142.       equateLoc(curFile,sInvert,locC)
  1143.       equateLoc(curFile,eInvert,locB) }
  1144.    refreshDisplay
  1145.    freeBuf(buf46)
  1146.    insertRgn(buf46,sFile,curFile,invert)
  1147.    clearRgn(curFile,invert)
  1148.    insertRgn(curFile,locA,buf46,all)
  1149.    ..copy hilite, delete, insert at locB (mouseDown loc)
  1150.    if (!isEmpty(buf47)) {
  1151.          push(buf47,buf47)
  1152.          putMsg("Stacked old copy/cut") }
  1153.       else
  1154.          putMsg(" ")
  1155.    insertRgn(buf47,sFile,curFile,hilite)
  1156.    clearRgn(curFile,hilite)
  1157.    equateLoc(curFile,sHilite,locB)
  1158.    decLoc(curFile,sHilite)
  1159.    insertRgn(curFile,locB,buf47,all)
  1160.    if (eqLoc(curFile,sHilite,locB))            ..cursor must have been at sFile
  1161.          equateLoc(curFile,sHilite,sFile)
  1162.       else
  1163.          incLoc(curFile,sHilite)
  1164.    moveCursor(curFile,locB)
  1165.    equateLoc(curFile,eHilite,atCursor)
  1166.    runKey(43)                                                ..update locD,locE
  1167.    if (gtLoc(curFile,sPage,sHilite)) vScroll(sHilite)
  1168.    ..putMsg(" ")
  1169.    refreshDisplay
  1170.    >Tuesday 30-Jul-91 19:37:06
  1171.    
  1172. |
  1173. |  adding shft to alt-buttonDown copies the hilight to the cursor
  1174. |  the inserted copy is hilighted to make undo easy
  1175. |
  1176. Copy hilite to new location, hilite insertion
  1177. <shftAlt-buttonDown:
  1178.    if (eqLoc(curFile,sHilite,eHilite)) {
  1179.       putMsg("No hilite to duplicate")
  1180.       return }
  1181.    equateLoc(curFile,atCursor,mouseLoc)
  1182.    if (!isEmpty(buf47)) {
  1183.          push(buf47,buf47)
  1184.          putMsg("Stacked old copy/cut") }
  1185.       else
  1186.          putMsg(" ")
  1187.    insertRgn(buf47,sFile,curFile,hilite)
  1188.    equateLoc(curFile,sHilite,atCursor)
  1189.    equateLoc(curFile,locB,atCursor)
  1190.    decLoc(curFile,sHilite)
  1191.    insertRgn(curFile,atCursor,buf47,all)
  1192.    if (eqLoc(curFile,sHilite,locB))            ..cursor must have been at sFile
  1193.          equateLoc(curFile,sHilite,sFile)
  1194.       else
  1195.          incLoc(curFile,sHilite)
  1196.    equateLoc(curFile,eHilite,atCursor)
  1197.    runKey(43)                                                ..update locD,locE
  1198.    if (gtLoc(curFile,sPage,sHilite)) vScroll(sHilite)
  1199.    putMsg(" ")
  1200.    refreshDisplay
  1201.    >Wednesday 24-Jul-91 10:46:14
  1202.  
  1203. ==== CUT, COPY & PASTE using Buffer A (buf47) ====
  1204.  
  1205. Copy hilite or sentence into Buffer A, stack old
  1206. <ctl-c:
  1207.    if (!isEmpty(buf47)) {
  1208.          push(buf47,buf47)
  1209.          putMsg("Stacked old copy/cut") }
  1210.       else
  1211.          putMsg(" ")
  1212.    runKey(shftCtl-c)
  1213.    equateLoc(curFile,locC,atCursor)
  1214.    >Wednesday 24-Jul-91 10:42:18
  1215.  
  1216. Copy hilite or sentence, adding it into Buffer A at eFile
  1217. <shftCtl-c:
  1218.    if(eqLoc(curFile,sHilite,eHilite)) {                         ..find sentence
  1219.       ..alertUser("no hilite, finding sentence")..debug
  1220.       runKey(alt-rightArrow)                                     ..kills hilite
  1221.       equateLoc(curFile,locA,atCursor)
  1222.       equateLoc(curFile,eHilite,atCursor)
  1223.       runKey(alt-leftArrow)
  1224.       equateLoc(curFile,sHilite,atCursor)
  1225.       equateLoc(curFile,eHilite,locA) }
  1226.    ..alertUser("copying hilite")..debug
  1227.    insertRgn(buf47,eFile,curFile,hilite)              ..copy hilite or sentence
  1228.    moveCursor(curFile,eHilite)
  1229.    runKey(43)                                                ..update locD,locE
  1230.    delay(5)                                                           ..show it
  1231.    equateLoc(curFile,sHilite,eHilite)
  1232.    refreshDisplay
  1233.    >Wednesday 24-Jul-91 10:42:19
  1234.  
  1235. Cut cursor line into Buffer A at eFile, adding if no cursor move (ignores hilite)
  1236. <ctl-d:
  1237.    ..if cursor has moved since last copy/cut stack buf47 first
  1238.    if (!eqLoc(curFile,locC,atCursor)) {
  1239.       if (!isEmpty(buf47))  {
  1240.             push(buf47,buf47)
  1241.             putMsg("Stacked old copy/cut") }
  1242.          else
  1243.             putMsg(" ") }
  1244.    runKey(shftCtl-d)
  1245.    equateLoc(curFile,locC,atCursor)
  1246.    >Wednesday 24-Jul-91 10:42:20
  1247.  
  1248. Cut cursor line, adding it into Buffer A at eFile (ignores hilite)
  1249. <shftCtl-d:
  1250.    if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  1251.    equateLoc(curFile,sHilite,atCursor)
  1252.    if (!is(curFile,eLine)) moveCursor(curFile,eLine)
  1253.    moveCursor(curFile,eChar)
  1254.    equateLoc(curFile,eHilite,atCursor)
  1255.    insertRgn(buf47,eFile,curFile,hilite)
  1256.    clearRgn(curFile,hilite)
  1257.    runKey(43)                                                ..update locD,locE
  1258.    >Wednesday 24-Jul-91 10:42:21
  1259.  
  1260. Cut hilite or sentence into Buffer A, stack old
  1261. <ctl-x:
  1262.    if (!isEmpty(buf47))  {
  1263.          push(buf47,buf47)
  1264.          putMsg("Stacked old copy/cut") }
  1265.       else
  1266.          putMsg(" ")
  1267.    runKey(shftCtl-x)
  1268.    equateLoc(curFile,locC,atCursor)
  1269.    >Wednesday 24-Jul-91 10:42:21
  1270.  
  1271. Cut sentence or hilite always adding it into Buffer A at eFile
  1272. <shftCtl-x:
  1273.    if(eqLoc(curFile,sHilite,eHilite)) {                         ..find sentence
  1274.       runKey(alt-rightArrow)                                     ..kills hilite
  1275.       equateLoc(curFile,locA,atCursor)
  1276.       equateLoc(curFile,eHilite,atCursor)
  1277.       runKey(alt-leftArrow)
  1278.       equateLoc(curFile,sHilite,atCursor)
  1279.       equateLoc(curFile,eHilite,locA) }
  1280.    insertRgn(buf47,eFile,curFile,hilite)              ..copy hilite or sentence
  1281.    moveCursor(curFile,eHilite)
  1282.    clearRgn(curFile,hilite)
  1283.    runKey(43)                                                ..update locD,locE
  1284.    delay(5)                                                           ..show it
  1285.    equateLoc(curFile,sHilite,eHilite)
  1286.    refreshDisplay
  1287.    >Wednesday 24-Jul-91 10:42:22
  1288.  
  1289. Insert Buffer A at cursor (last copy or cut)
  1290. <ctl-v:
  1291.    ..prepare to hilite insertion
  1292.    equateLoc(curFile,eHilite,atCursor)
  1293.    equateLoc(curFile,sHilite,atCursor)
  1294.    decLoc(curFile,sHilite)
  1295.    insertRgn(curFile,atCursor,buf47,all)
  1296.    if (eqLoc(curFile,sHilite,eHilite))         ..cursor must have been at sFile
  1297.          equateLoc(curFile,sHilite,sFile)
  1298.       else
  1299.          incLoc(curFile,sHilite)
  1300.    equateLoc(curFile,locC,atCursor)          ..free buf 47 before next copy/cut
  1301.    runKey(43)                                                ..update locD,locE
  1302.    if (!onScreen(atCursor)) vScroll(eHilite)
  1303.    putMsg(" ")
  1304.    refreshDisplay
  1305.    >Wednesday 31-Jul-91 18:42:33
  1306.  
  1307. Insert Buffer A stack at cursor (unlimited history), scan stack
  1308. <ctl-p:
  1309.    if (!isEmpty(buf47)) {
  1310.          push(buf47,buf47)
  1311.          putMsg("Stacked current copy/cut") }
  1312.       else
  1313.          putMsg(" ")
  1314.    equateNum(n0,47)
  1315.    getStackSize(n0,n1,n2)
  1316.    if (!gtNum(n0,0)) {
  1317.       putMsg("Copy/cut stack is empty")
  1318.       beepDisplay
  1319.       returnFalse }
  1320.    ..putMsg(n0) alertUser("copy/clear stack size")..debug
  1321.    pop(buf47,buf47)
  1322.    runKey(ctl-v)
  1323.    freeBuf(buf51)
  1324.    insertRgn(buf51,sFile,
  1325.    "search=arrowUp/Down, i=insert, d=delete item, c=clear stack, q=quit",all)
  1326.    freeBuf(buf50)
  1327.    toWord(buf50,n0)
  1328.    insertRgn(buf50,eFile,": ",all)
  1329.    insertRgn(buf50,eFile,buf51,all)
  1330.    putMsg(buf50)
  1331.  
  1332.    LABEL(0) ..search/comment/uncomment loop
  1333.    getKeyVal(macroNum,inputChar)
  1334.  
  1335.    LABEL(1)
  1336.    switch(macroNum) {
  1337.       case(77) {                                                    ..downArrow
  1338.          clearRgn(curFile,hilite)
  1339.          if (!isEmpty(buf47)) push(buf47,buf47)
  1340.          rollStack(buf47,-1)
  1341.          pop(buf47,buf47)
  1342.          runKey(ctl-v)
  1343.          putMsg(buf50) }
  1344.       case(76) {                                                      ..upArrow
  1345.          clearRgn(curFile,hilite)
  1346.          if (!isEmpty(buf47)) push(buf47,buf47)
  1347.          rollStack(buf47,1)
  1348.          pop(buf47,buf47)
  1349.          runKey(ctl-v)
  1350.          putMsg(buf50) }
  1351.       case(23) {                                                            ..i
  1352.          if (!isEmpty(buf47)) push(buf47,buf47)
  1353.          putMsg("Quit copy/cut scan. left insert")
  1354.          beepDisplay
  1355.          returnTrue }
  1356.       case(34) {                                                            ..d
  1357.          if (askYesNo("DELETE this block from file AND copy/cutstack?")) {
  1358.             clearRgn(curFile,hilite)
  1359.             freeBuf(buf47)
  1360.             refreshDisplay
  1361.             equateNum(n15,"b")
  1362.             freeBuf(buf50)
  1363.             equateNum(n0,47)
  1364.             getStackSize(n0,n1,n2)
  1365.             toWord(buf50,n0)
  1366.             insertRgn(buf50,eFile,": ",all)
  1367.             insertRgn(buf50,eFile,buf50,all)
  1368.             equateNum(macroNum,77)                               ..move to next
  1369.             goto label(1) } }
  1370.       case(51) {                                                            ..c
  1371.          if (gtNum(n0,0)) {
  1372.             if (askYesNo("CLEAR copy/cut stack?")) {
  1373.                while (gtNum(n0,0)) {
  1374.                   pop(buf47,buf55)
  1375.                   decNum(n0) }
  1376.                if (askYesNo("CLEAR copy/cut paste buffer A also?")) 
  1377.                   freeBuf(buf47) } }
  1378.          putMsg(" ")
  1379.          returnTrue }
  1380.       case(16) {                                                            ..q
  1381.          clearRgn(curFile,hilite)
  1382.          if (!isEmpty(buf47)) push(buf47,buf47)
  1383.          putMsg("QUIT copy/cut scan")
  1384.          returnTrue}
  1385.       default   {
  1386.          clearRgn(curFile,hilite)
  1387.          if (!isEmpty(buf47)) push(buf47,buf47)
  1388.          putMsg("QUIT copy/cut scan")
  1389.          beepDisplay
  1390.          returnTrue} }
  1391.    goto label(0)
  1392.    >Wednesday 24-Jul-91 13:02:49
  1393.  
  1394. ==== DELETE & UNDO using Buffer B (buf45) ====
  1395.  
  1396. Delete char to left of cursor or hilite into Buffer B
  1397. <normal-bs:
  1398.    ..locC records the last location after a DEL, BS, or shft-BS
  1399.    if (eqLoc(curFile,sHilite,eHilite)) {
  1400.          if (!eqLoc(curFile,locC,atCursor)) freeBuf(buf45)   ..clear old delete
  1401.          equateLoc(curFile,locC,atCursor)                  ..record present loc
  1402.          equateLoc(curFile,locB,atCursor)
  1403.          moveCursor(curFile,sChar)                                  ..copy char
  1404.          equateLoc(curFile,locA,atCursor)
  1405.          insertRgn(buf45,sFile,curFile,loc)
  1406.          clearRgn(curFile,loc) }
  1407.       else {
  1408.          freeBuf(buf45)
  1409.          insertRgn(buf45,eFile,curFile,hilite)
  1410.          clearRgn(curFile,hilite) }
  1411.    runKey(43)                                                ..update locD,locE
  1412.    >Saturday 08-Jun-91 20:33:55
  1413.  
  1414. Delete word or part to left into Buffer B
  1415. <shft-bs:
  1416.    if (!eqLoc(curFile,locC,atCursor)) freeBuf(buf45)
  1417.    equateLoc(curFile,locC,atCursor)
  1418.    equateLoc(curFile,eHilite,atCursor)
  1419.    moveCursor(curFile,sWord)
  1420.    equateLoc(curFile,sHilite,atCursor)
  1421.    insertRgn(buf45,sFile,curFile,hilite)
  1422.    clearRgn(curFile,hilite)
  1423.    runKey(43)                                                ..update locD,locE
  1424.    putMsg("Use Shft-DEL to undo")
  1425.    >Saturday 08-Jun-91 20:33:55
  1426.  
  1427. Delete sentence or part to left into Buffer B
  1428. <alt-bs:
  1429.    if (!eqLoc(curFile,locC,atCursor)) freeBuf(buf45)
  1430.    equateLoc(curFile,locC,atCursor)
  1431.    equateLoc(curFile,eHilite,atCursor)
  1432.    runKey(alt-leftArrow)
  1433.    equateLoc(curFile,sHilite,atCursor)
  1434.    ..alertUser("sentence to delete")
  1435.    refreshDisplay
  1436.    delay(5)                                                           ..show it
  1437.    insertRgn(buf45,sFile,curFile,hilite)
  1438.    clearRgn(curFile,hilite)
  1439.    runKey(43)                                                ..update locD,locE
  1440.    putMsg("Use Shft-DEL to undo")
  1441.    >Saturday 08-Jun-91 20:33:56
  1442.  
  1443. Delete paragraph or part to left into Buffer B
  1444. <ctl-bs:
  1445.    if (!eqLoc(curFile,locC,atCursor)) freeBuf(buf45)
  1446.    equateLoc(curFile,locC,atCursor)
  1447.    equateLoc(curFile,eHilite,atCursor)
  1448.    ..move back at least one sentence so that we can join paragraphs
  1449.    runKey(alt-leftArrow)
  1450.    ..find blankLine or change in indent
  1451.    ..first find first !whiteSpace on this line
  1452.    if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  1453.    while (is(curFile,whiteSpace)) moveCursor(curFile,eChar)
  1454.    getPageRowCol(n0,n1,n2)
  1455.    ..putMsg(n2) alertUser("n2 cursor line starts here")
  1456.    While (nothing) {
  1457.       moveCursor(curfile,upLine)
  1458.       if (is(curFile,blankLine)) {
  1459.          moveCursor(curFile,downLine)
  1460.          if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  1461.          goto label(0) }
  1462.       if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  1463.       while (is(curFile,whiteSpace)) moveCursor(curFile,eChar)
  1464.       ..alertUser("found !whiteSpace")
  1465.       getPageRowCol(n0,n1,n3)
  1466.       ..putMsg(n3) alertUser("n3")
  1467.       if (!eqNum(n2,n3)) {
  1468.          if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  1469.          goto label(0) } }
  1470.    LABEL(0)
  1471.    equateLoc(curFile,sHilite,atCursor)
  1472.    alertUser("par to delete")
  1473.    refreshDisplay
  1474.    delay(5)                                                           ..show it
  1475.    insertRgn(buf45,sFile,curFile,hilite)
  1476.    clearRgn(curFile,hilite)
  1477.    runKey(43)                                                ..update locD,locE
  1478.    putMsg("Use Shft-DEL to undo")
  1479.    >Saturday 08-Jun-91 20:33:56
  1480.  
  1481. Delete char under cursor or hilite into Buffer B
  1482. <normal-del:
  1483.    if (eqLoc(curFile,sHilite,eHilite)) {                          ..delete char
  1484.          if (!eqLoc(curFile,locC,atCursor))
  1485.             freeBuf(buf45)                                 ..discard old delete
  1486.          equateLoc(curFile,sHilite,atCursor)
  1487.          moveCursor(curFile,eChar)
  1488.          equateLoc(curFile,eHilite,atCursor)}
  1489.       else {                                           ..delete existing hilite
  1490.          freeBuf(buf45) }
  1491.    insertRgn(buf45,eFile,curFile,hilite)
  1492.    clearRgn(curFile,hilite)
  1493.    runKey(43)                                                ..update locD,locE
  1494.    equateLoc(curFile,locC,atCursor)
  1495.    >Saturday 08-Jun-91 20:33:56
  1496.  
  1497. Insert last block of deletions at cursor (undo from Buffer B)
  1498. <shft-del:
  1499.    ..prepare to hilite insertion
  1500.    equateLoc(curFile,eHilite,atCursor)
  1501.    equateLoc(curFile,sHilite,atCursor)
  1502.    decLoc(curFile,sHilite)
  1503.    insertRgn(curFile,atCursor,buf45,all)
  1504.    if (eqLoc(curFile,sHilite,eHilite))           ..locA must have been at sFile
  1505.          equateLoc(curFile,sHilite,sFile)
  1506.       else
  1507.          incLoc(curFile,sHilite)
  1508.    equateLoc(curFile,locC,sHilite)              ..free buf45 before next delete
  1509.    runKey(43)                                                ..update locD,locE
  1510.    if (gtLoc(curFile,sPage,sHilite)) vScroll(sHilite)
  1511.    putMsg(" ")
  1512.    updateDisplay
  1513.    >Saturday 08-Jun-91 20:33:56
  1514.  
  1515.  
  1516. ==== TABS ====
  1517.  
  1518. Show tab ruler above cursor line
  1519. <shftAlt-tab:
  1520.    seeRuler
  1521.    >Saturday 08-Jun-91 20:34:01
  1522.  
  1523. Set tab ruler using mouse or keys
  1524. <shftCtl-tab:
  1525.    putMsg(
  1526.    "Use mouse click/drag, Tab, Space, BS, Del (anykey=quit,Amiga-ESC=abort)")
  1527.    setRuler putMsg(" ")
  1528.    >Saturday 08-Jun-91 20:34:01
  1529.  
  1530. Switch to/from using spaces for tabs or using real tabs
  1531. <altCtl-tab:
  1532.    flipFlag(curFile,trueTabs)
  1533.    >Saturday 08-Jun-91 20:34:01
  1534.  
  1535. Convert tabs in document to spaces
  1536. <lAmiga-tab:
  1537.    tabsToSpaces
  1538.    >Saturday 08-Jun-91 20:34:01
  1539.  
  1540. Convert spaces in document to TABs
  1541. <rAmiga-tab:
  1542.    spacesToTabs
  1543.    >Saturday 08-Jun-91 20:34:01
  1544.  
  1545. Set TAB table number (0-4) to use for TAB spacing
  1546. <shftAltCtl-tab:
  1547.    getLocal(curFile,n0,tabTable)
  1548.    freeBuf(buf50)
  1549.    insertRgn(buf50,sFIle,"Enter new tab table # (0-4): old=",all)
  1550.    toWord(buf50,n0)
  1551.    putMsg(buf50)
  1552.    if (inputNum(n0) & geNum(n0,0) & geNum(4,n0)) {
  1553.       setLocal(curFile,tabTable,n0)
  1554.       equateNum(tabTable,n0) }
  1555.    >Thursday 11-Jul-91 21:34:30
  1556.  
  1557. bug..indent sometimes hangs up
  1558. bug..must cope with trueTabs in margin
  1559. Indent-Outdent a block of lines
  1560. <shft-tab:
  1561. putMsg("Input incremental indent, +-n:")
  1562. inputNum(n10)
  1563. moveCursor(curFile,sHilite)
  1564. if (gtNum(n10,0)) {                                                  ..+ indent
  1565.       ..putMsg("starting indent")..debug
  1566.       while (gtLoc(curFile,eHilite,atCursor)) {
  1567.          ..alertUser("starting a line")..debug
  1568.          equateNum(n11,n10)
  1569.          while (gtNum(n11,0)) {
  1570.             insertChar(curFile," ")
  1571.             decNum(n11) }
  1572.          if (!is(curFile,eLine)) moveCursor(curFile,eLine)
  1573.          if (!moveCursor(curFile,downline)) return
  1574.          if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  1575.          ..alertUser("finished a line")
  1576.          } }
  1577.    else {                                                     ..- delete indent
  1578.       while (gtLoc(curFile,eHilite,atCursor)) {
  1579.          ..alertUser("starting a line")..debug
  1580.          if (is(curFile,blankLine)) goto label(0)   ..skip empty or spaces only
  1581.          equateNum(n11,n10)
  1582.          while (gtNum(0,n11)) {
  1583.             if (is(curFile,9)) alertUser("trueTab in margin") ..debug
  1584.             if (!is(curFile,whiteSpace)) {
  1585.                vScroll(atCursor)
  1586.                alertUser
  1587.                ("Aborted: On this line the requested deletion > total indent")
  1588.                return }
  1589.             clearChar(curFile)
  1590.             incNum(n11) }
  1591.          LABEL(0)
  1592.          if (!moveCursor(curFile,downline)) return
  1593.          if (eqLoc(curFile,eHilite,atCursor)) return
  1594.          if (!is(curFile,sLine)) moveCursor(curFile,sLine) } }
  1595.          ..alertUser("finished a line")
  1596.    >Sunday 07-Jul-91 23:03:13
  1597.  
  1598. ==== CHAR ====
  1599.  
  1600. Convert char under cursor or hilight to upper case
  1601. <ctl-u:
  1602.    if (gtLoc(curFile,eHilite,sHilite)) {
  1603.          moveCursor(curFile,sHilite)
  1604.          while (gtLoc(curFile,eHilite,atCursor)) {
  1605.             toUpper(curFile)
  1606.             moveCursor(curFile,eChar) } }
  1607.       else {
  1608.          toUpper(curFile)
  1609.          moveCursor(curFile,eChar) }
  1610.    >Friday 21-Jun-91 17:53:08
  1611.  
  1612. Capatalize first letter of each word in hilite
  1613. <altCtl-u:
  1614.    if (gtLoc(curFile,eHilite,sHilite)) {
  1615.          moveCursor(curFile,sHilite)
  1616.          equateNum(n0,0)
  1617.          while (gtLoc(curFile,eHilite,atCursor)) {
  1618.             if (eqNum(n0,0))
  1619.                   toUpper(curFile)
  1620.                else
  1621.                   toLower(curFile)
  1622.             if (!is(curFile,alpha))
  1623.                   equateNum(n0,0)
  1624.                else
  1625.                   equateNum(n0,1)
  1626.             moveCursor(curFile,eChar) }
  1627.          refreshDisplay }
  1628.       else
  1629.          putMsg("NO HILITE")
  1630.    >Friday 21-Jun-91 18:18:33
  1631.  
  1632. Convert char under cursor r hilight to lower case
  1633. <ctl-l:
  1634.    if (gtLoc(curFile,eHilite,sHilite)) {
  1635.          moveCursor(curFile,sHilite)
  1636.          while (gtLoc(curFile,eHilite,atCursor)) {
  1637.             toLower(curFile)
  1638.             moveCursor(curFile,eChar) } }
  1639.       else {
  1640.          toLower(curFile)
  1641.          moveCursor(curFile,eChar) }
  1642.    >Friday 21-Jun-91 17:54:18
  1643.  
  1644. Insert CTRL-character, such as formfeed, etc
  1645. <shftAlt-c:
  1646.    ..31=00011111, so we mask out three hightest bits
  1647.    ..maps [@A..Z[\]^_] and [`a..z{|}~DEL] to [0..31]
  1648.    putMsg("Input a control character:")
  1649.    getChar(n14)
  1650.    if (geNum(31,n14) | (geNum(n14,64) & geNum(127,n14))) {
  1651.        and(n14,n14,31)
  1652.        insertChar(curFile,n14)
  1653.    }
  1654.    putMsg(" ")
  1655.    >Friday 28-Jun-91 20:39:42
  1656.  
  1657. ==== OVERSTRIKE, RIGHT JUSTIFY, AUTOINDENT, WORDWRAP ====
  1658.  
  1659. Toggle overstrike typing mode
  1660. <shft-f5:
  1661.    flipFlag(curFile,overstrike)
  1662.    >Saturday 08-Jun-91 20:34:03
  1663.  
  1664. Toggle the right-justify typing mode
  1665. <ctl-j:
  1666.    flipFlag(curFile,rightJustify)
  1667.    if (getFlag(curFile,rightJustify))
  1668.          putMsg("RightJustify is ON")
  1669.       else
  1670.          putMsg("RightJustify is OFF")
  1671.    >Saturday 08-Jun-91 20:34:03
  1672.  
  1673. Toggle autoindent typing mode
  1674. <alt-f5:
  1675.    flipFlag(curFile,autoIndent)
  1676.    >Sunday 09-Jun-91 17:50:27
  1677.  
  1678. Toggle wordwrap typing mode
  1679. <ctl-f5:
  1680.    flipFlag(curFile,wordWrap)
  1681.    >Sunday 09-Jun-91 17:50:28
  1682.  
  1683. Toggle changed status of curFile
  1684. <lAmiga-f5:
  1685.    flipFlag(curFile,changed)
  1686.    >Tuesday 30-Jul-91 23:06:06
  1687.  
  1688. Toggle displaying of cursor page:row,column
  1689. <lAmiga-f4: 
  1690.    flipFlag(curFile,rowCol)
  1691.    >Tuesday 30-Jul-91 23:06:07
  1692.  
  1693. ==== PAGE FORMAT ====
  1694.  
  1695. Set new line-length for this file only
  1696. <ctl-return:
  1697.    getLocal(curFile,n15,lineLength)               ..save old, n14=0 if no input
  1698.    freeBuf(buf53)
  1699.    insertRgn(buf53,sFile,"Enter new line-length: old=",all)
  1700.    toWord(buf53,n15)
  1701.    putMsg(buf53)
  1702.    if (inputNum(n14))
  1703.          setLocal(curFile,lineLength,n14)
  1704.       else
  1705.          setLocal(curFile,lineLength,n15)
  1706.    equateNum(n15,lineLength)
  1707.    freeBuf(buf53)
  1708.    insertRgn(buf53,sFile,"Set global lineLength to local value? old global=",all)
  1709.    toWord(buf53,n15)
  1710.    if (askYesNo(buf53))
  1711.       equateNum(lineLength,n13)
  1712.    >Saturday 08-Jun-91 20:34:03
  1713.  
  1714. Input a new lines/page value for this file only
  1715. <lAmiga-p:
  1716.    ..determines location of sPage and ePage
  1717.    freeBuf(buf50)
  1718.    insertRgn(buf50,eFile,"Enter new lines/page (1-200): old=",all)
  1719.    getLocal(curFile,n14,pageLines)
  1720.    toWord(buf50,n14)
  1721.    putMsg(buf50)
  1722.    inputNum(n14)
  1723.    if (gtNum(n14,0)) {
  1724.        setLocal(curFile,pageLines,n14)
  1725.        equateNum(pageLines,n14) }
  1726.    >Tuesday 09-Jul-91 19:01:35
  1727.  
  1728. Set top margin for this file only
  1729. <lAmiga-u:
  1730.    freeBuf(buf50)
  1731.    insertRgn(buf50,eFile,"Enter new top margin lines (0-200): old=",all)
  1732.    getLocal(curFile,n14,topMargin)
  1733.    toWord(buf50,n14)
  1734.    putMsg(buf50)
  1735.    if (inputNum(n14)) equateNum(topMargin,n14)
  1736.    setLocal(curFile,topMargin,topMargin)
  1737.    >Tuesday 09-Jul-91 18:59:59
  1738.  
  1739. Set bottom margin for this file only
  1740. <lAmiga-l:
  1741.    freeBuf(buf50)
  1742.    insertRgn(buf50,eFile,"Enter bottom margin lines (0-200):",all)
  1743.    getLocal(curFile,n14,bottomMargin)
  1744.    toWord(buf50,n14)
  1745.    putMsg(buf50)
  1746.    if (inputNum(n14)) equateNum(bottomMargin,n14)
  1747.    setLocal(curFile,bottomMargin,bottomMargin)
  1748.    >Tuesday 09-Jul-91 19:00:01
  1749.  
  1750. Center text in the line.  (Uses current line length.)
  1751. <alt-c:
  1752.    ..clear leading spaces
  1753.    equateLoc(curFile,locA,atCursor)
  1754.    if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  1755.    while (is(curFile,whiteSpace) & !is(curFile,eLine) & !is(curFile,12))
  1756.                clearChar(curFile)
  1757.    equateLoc(curFile,atCursor,locA)
  1758.    if (is(curFile,blankLine)) returnFalse
  1759.    if (!is(curFile,eLine)) moveCursor(curFile,eLine)
  1760.    locToCol(curFile,n13,atCursor)
  1761.    getLocal(curFile,n14,lineLength)
  1762.    if (gtNum(n14,n13)) {
  1763.        moveCursor(curFile,sLine)
  1764.        incNum(n14)
  1765.        sub(n13,n14,n13)
  1766.        div(n13,n13,2)
  1767.        do (n14,1,n13) insertChar(curFile," ") }
  1768.    >Saturday 08-Jun-91 20:34:04
  1769.  
  1770. ==== PARAGRAPH FORMAT ====
  1771.  
  1772. Reformat cursor paragraph, starting at cursor line, skip blankLines
  1773. <ctl-f:
  1774.    ..returnFalse if no text ahead
  1775.    equateLoc(curfile,locC,atCursor)
  1776.    ..skip blank lines, looking for eFile.
  1777.    while (is(curFile,blankLine)) {
  1778.       ..alertUser("skippling blankLines looking for eFile")
  1779.       moveCursor(curFile,downLine)
  1780.       if (!is(curFile,eLine)) moveCursor(curFile,eLine)
  1781.       if (is(curFile,eFile)) returnFalse }
  1782.    equateNum(n3,0)                                       ..n3 flag 0=first line
  1783.  
  1784.    LABEL(2)
  1785.    ..find start of text
  1786.    ..runKey(ctl-q) alertUser("LAB2 n3=0 first !blankLine, n3=1 second")
  1787.    if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  1788.    while (is(curFile,whiteSpace)) moveCursor(curFile,eChar)
  1789.    locToCol(curFile,n0,atCursor)                     ..n0 = indent of this line
  1790.  
  1791.    .. get indent of line (space,tab=whiteSpace)
  1792.    if (eqNum(n3,0)) {                                    .. if doing FIRST line
  1793.       equateLoc(curFile,locB,atCursor)                ..store 1st text location
  1794.       ..alertUser("locB")
  1795.       equateNum(n3,1)                                 ..n3 flag 1 = !first line
  1796.       equateNum(n1,n0)                                      ..n1 = first indent
  1797.       moveCursor(curFile,downLine)                          .. move to 2nd line
  1798.       if (is(curFile,blankLine)) {                            .. no second line
  1799.           equateNum(n3,-1)                       ..n0 flag -1 = second is blank
  1800.           goto label(3)
  1801.       }
  1802.       goto label(2)                   .. go back and get indent of 2nd par line
  1803.    }
  1804.  
  1805.    LABEL(3)
  1806.    moveCursor(curFile,locB)                            .. move back to 1st line
  1807.    equateNum(n2,n0)                                ..n2 = second indent, if any
  1808.    ..runKey(ctl-q) alertUser("LAB3 examined first two lines")
  1809.  
  1810.    if (eqNum(n3,-1) | (eqNum(n1,1) & eqNum(n2,1)))
  1811.          ..if next line is blank just close gaps
  1812.          ..if next line is also not indented, treat as same paragraph
  1813.          { reformat
  1814.          equateLoc(curFile,locB,atCursor) }                  ..store end of par
  1815.       else {
  1816.          if (gtNum(n1,n2)) {
  1817.                .. 2nd line has less indent, x from n2 to n1
  1818.                colToLoc(curFile,atCursor,n2)
  1819.                equateLoc(curFile,locA,atCursor)
  1820.                ..alertUser("locA to clear")
  1821.                }
  1822.             else {
  1823.                ..2nd is indented same or more
  1824.                ..assume 1st is one line paragraph, x from sLine to n1
  1825.                ..mishandles block indented paragraph, see ctrl-b
  1826.                if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  1827.                equateLoc(curFile,locA,atCursor)
  1828.                ..alertUser("locA to clear")
  1829.                equateNum(n2,1) }
  1830.          clearRgn(curFile,loc)             .. wiping out extra 1st line indent
  1831.          while(gtNum(n1,n2)) {insertChar(curFile,"x") decNum(n1) }
  1832.          ..runKey(ctl-q) alertUser("put in x's")..debug
  1833.          moveCursor(curFile,sWord)                          .. made a FAKE WORD
  1834.          equateLoc(curFile,locA,atCursor)                      .. store its loc
  1835.          reformat                               .. now paragrah has SAME indent
  1836.          equateLoc(curFile,locB,atCursor)                   .. store end of par
  1837.          moveCursor(curFile,locA)                       .. go back to fake word
  1838.          while (is(curFile,"x")) {                       .. swap x's for spaces
  1839.             swapChar(curFile," ")
  1840.             moveCursor(curFile,eChar) }
  1841.          equateLoc(curFile,atCursor,locB) }                  .. goto end of par
  1842.    moveCursor(curFile,locC)
  1843.    >Saturday 08-Jun-91 20:34:04
  1844.  
  1845. Reformat paragraph, go to end of paragraph
  1846. <ctl-g:
  1847.    ..returnFalse if ctl-f returnFalse, no text ahead
  1848.    if (!runKey(ctl-f)) returnFalse
  1849.    moveCursor(curFile,locB)
  1850.    moveCursor(curFile,downLine)
  1851.    if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  1852.    >Saturday 08-Jun-91 20:34:05
  1853.  
  1854. Reformat block indented paragraph
  1855. <ctl-b:
  1856.    equateLoc(curFile,locA,atCursor)
  1857.    reformat
  1858.    moveCursor(curFile,locA)
  1859.    >Tuesday 30-Jul-91 22:55:23
  1860.  
  1861. Reformat whole document (ask), return to last atCursor
  1862. <ctl-a:
  1863.    if (!askYesNo("Do you want to reformat the whole file")) return
  1864.    putMsg("Formatting whole document, please wait....")
  1865.    equateLoc(curFile,locD,atCursor)
  1866.    moveCursor(curFile,sFile)
  1867.    while (!eqLoc(curFile,atCursor,eFile)) runKey(ctl-g)   ..reformat, go to end
  1868.    equateLoc(curFile,atCursor,locD)
  1869.    updateDisplay
  1870.    putMsg(" ")
  1871.    updateDisplay
  1872.    >Wednesday 17-Jul-91 10:17:43
  1873.  
  1874. Reformat hanging indent, indented 3 chars, put cursor on outdent of first line
  1875. <ctl-h:
  1876.    ..locate start of text and join all lines
  1877.    ..upFlag(curFile,hideDisplay)
  1878.    equateNum(n15,0)
  1879.    if (gtLoc(curFile,eHilite,sHilite)) {
  1880.       equateNum(n15,1)  ..set flag
  1881.       insertChar(curFile,eLine) ..insert blankLine at end just in case
  1882.       moveCursor(curFile,sHilite) }
  1883.    equateLoc(curFile,locC,atCursor)
  1884.    getPageRowCol(n0,n1,n2)
  1885.    insertChar(curFile,eLine)
  1886.    if (is(curFile,blankLine)) returnFalse
  1887.    LABEL(0)                                         ..join text up to blankLine
  1888.       if (!is(curFile,eLine)) moveCursor(curFile,eLine)
  1889.       if (is(curFile,eFile)) goto label(1)
  1890.       moveCursor(curFile,downLine)
  1891.       if (is(curFile,blankLine)) goto label(1)
  1892.       moveCursor(curFile,upLine)
  1893.       runKey(alt-j)
  1894.       goto label(0)
  1895.    LABEL(1)
  1896.    ..locate end of text to format
  1897.    moveCursor(curFile,locC)
  1898.    moveCursor(curFile,eLine)
  1899.    equateLoc(curFile,locD,atCursor)
  1900.    moveCursor(curFile,sLine)
  1901.    reformat
  1902.    moveCursor(curFile,locC)
  1903.    clearChar(curFile)
  1904.    getlocal(curFile,n10,lineLength)
  1905.    sub(n10,n10,n2)
  1906.    do(n11,1,n10) if (!is(curFile,eLine)) moveCursor(curFile,eChar)
  1907.    while (!is(curFile,whiteSpace)) moveCursor(curFile,sChar)
  1908.    insertChar(curFile,eLine)
  1909.    if (gtLoc(curFile,atCursor,locD)) {
  1910.       moveCursor(curFile,sChar)
  1911.       clearChar(curFile)
  1912.       moveCursor(curFile,locC)
  1913.       returnTrue }
  1914.    while (is(curFile,space)) clearChar(curFile)
  1915.    LABEL(2)
  1916.       if (!is(curFile,eLine)) moveCursor(curFile,eLine)
  1917.       if (is(curFile,eFile)) goto label(4)
  1918.       moveCursor(curFile,downLine)
  1919.       if (is(curFile,blankLine)) goto label(3)
  1920.       moveCursor(curFile,upLine)
  1921.       runKey(alt-j)
  1922.       goto label(2)
  1923.    LABEL(3)
  1924.    moveCursor(curFile,upLine)
  1925.    LABEL(4)
  1926.    if (!is(curFile,sLine)) moveCursor(curFile,sLine)
  1927.    add(n2,n2,2)
  1928.    do(n10,1,n2) insertChar(curFile," ")
  1929.    if (!is(curFile,blankLine)) runKey(ctl-b)
  1930.    if (eqNum(n15,1)) {
  1931.       moveCursor(curFile,locD)
  1932.       ..moveCursor(curFile,sChar)
  1933.       clearChar(curFile) }
  1934.    moveCursor(curFile,locC)
  1935.    ..downFlag(curFile,hideDisplay)
  1936.    >Sunday 28-Jul-91 09:40:01
  1937.  
  1938. ==== SEARCH & REPLACE ====
  1939.  
  1940. Toggle case-sensitivity of search
  1941. <altCtl-f7:
  1942.    flipFlag(curFile,searchCaps)
  1943.    >Sunday 09-Jun-91 17:50:30
  1944.  
  1945. |
  1946. | n0 (TEMP GLOBAL) 1=search fwd, -1=search bkwd
  1947. |
  1948. CsSearch for buf49 match, embedded matches ignored
  1949. <virtual-s:
  1950.    equateLoc(curFile,locA,atCursor)
  1951.    freeBuf(buf50)
  1952.    setSearch(buf49)
  1953.    ..putMsg(buf49) alertUser("search")..debug
  1954.    
  1955.    LABEL(0) ..search loop
  1956.    ..after fwd find atCursor=eInvert, skip this one if now going bkwd
  1957.    ..note fwd search does not find it if cursor on first char
  1958.    if (eqNum(n0,-1) & eqLoc(curFile,atCursor,eInvert))
  1959.          moveCursor(curFile,sInvert)
  1960.    if (search (curFile,sInvert,eInvert,n0)) {
  1961.          ..putMsg(buf49) alertUser("found candidate")..debug
  1962.          ..check for whole word
  1963.          decLoc(curFile,atCursor)
  1964.          ..alertUser("checking left")
  1965.          if (is(curFile,alpha) | is(curFile,digit)) {
  1966.             ..alertUser("alpha|numeric on left")
  1967.             if (eqNum(n0,1)) moveCursor(curFile,eInvert)
  1968.             goto label(0) }                     ..look for another candidate
  1969.          moveCursor(curFile,eInvert)
  1970.          ..alertUser("checking right")
  1971.          if (is(curFile,alpha) | is(curFile,digit)) {
  1972.             ..alertUser("alpha on right")
  1973.             if (eqNum(n0,-1)) moveCursor(curFile,sInvert)
  1974.             goto label(0) }                     ..look for another candidate
  1975.          if (eqNum(n0,1))
  1976.                insertRgn(buf50,sFile,"Next match forward",all)
  1977.             else {
  1978.                moveCursor(curFile,sInvert)
  1979.                insertRgn(buf50,sFile,"Next match backward",all) }
  1980.          runKey(ctl-3) ..cancel hilite
  1981.          putMsg(buf50)
  1982.          refreshDisplay
  1983.          return }
  1984.       else {
  1985.          equateLoc(curFile,sInvert,eInvert)
  1986.          if (eqNum(n0,1))
  1987.                insertRgn(buf50,eFile," CS SEARCH FAILED, no match below here",all)
  1988.             else
  1989.                insertRgn(buf50,eFile," CS SEARCH FAILED, no match above here",all)
  1990.          if (getFlag(curFile,searchCaps)) insertRgn(buf50,sFile," CASESENS",all)
  1991.          insertRgn(buf50,sFile,buf49,all)
  1992.          putMsg(buf50)
  1993.          moveCursor(curFile,locA)
  1994.          if (!onScreen(atCursor)) vScroll(atCursor)
  1995.          return }
  1996.    >Tuesday 30-Jul-91 19:17:48
  1997.  
  1998. |
  1999. |  gadget1 name is | Search  |   File  |
  2000. |  nineteen characters wide
  2001. |  Search = [1..9.5]
  2002. |  File = [9.6..15]
  2003. |
  2004. Search forward or next buffer with a file
  2005. <normal-gadget1:
  2006.    mouseXY(n0,n1)
  2007.    div(n0,n0,40)    ..1/2 character width x 10
  2008.    add(n0,n0,1)     ..map to region number [1..4]
  2009.    switch(n0) {
  2010.       case(1) 
  2011.       case(2) { equateNum(n0,1) runKey(virtual-s) }
  2012.       case(3) 
  2013.       case(4) { runKey(Normal-f1) } }
  2014.       >Sunday 21-Jul-91 12:44:30
  2015.  
  2016. Search backward or previous buffer with a file
  2017. <shft-gadget1:
  2018.    mouseXY(n0,n1)
  2019.    div(n0,n0,40)    ..1/2 character width x 10
  2020.    add(n0,n0,1)     ..map to region number [1..4]
  2021.    switch(n0) {
  2022.       case(1) 
  2023.       case(2) { equateNum(n0,-1) runKey(virtual-s) }
  2024.       case(3) 
  2025.       case(4) { runKey(shft-f1) } }
  2026.       >Sunday 21-Jul-91 12:44:30
  2027.  
  2028. Type in new search wild-card characters
  2029. <shftCtl-f7:
  2030.    putMsg("Input single wild-card char:")
  2031.    getChar(wildCard)
  2032.    putMsg("Input multi wild-card char:")
  2033.    getChar(multiWild)
  2034.    putMsg("White on single wildcards: 0=no, 1=space/tab, 2=all white:")
  2035.    getChar(n14)
  2036.    if (geNum(n14,"0") & geNum("2",n14)) sub(singleWhite,n14,"0")
  2037.    putMsg("White on multi wildcards: 0=no, 1=space/tab, 2=all white:")
  2038.    getChar(n14)
  2039.    if (geNum(n14,"0") & geNum("2",n14)) sub(multiWhite,n14,"0")
  2040.    putMsg("Input all-but delimiter char:")
  2041.    getChar(allBut)
  2042.    putMsg(" ")
  2043.    >Sunday 09-Jun-91 17:50:28
  2044.  
  2045. Type in new search either-or character
  2046. <ctl-f7:
  2047.    putMsg("Input new search either-or char:")
  2048.    getChar(eitherOr)
  2049.    putMsg(" ")
  2050.    >Sunday 09-Jun-91 17:50:28
  2051.  
  2052. |
  2053. | Before clearing or modifying the search string, push the buffer
  2054. | Alt-f7 will pop the buffer if there is no hilite
  2055. | double click also pushes the buffer
  2056. |
  2057. Type in search string (push old) and CsSearch fwd.  EitherOr = $, wilds= ? & *.
  2058. <normal-f7:
  2059.    putMsg("Type in search string:")
  2060.    if (!isEmpty(buf49)) push(buf49,buf49)
  2061.    inputString(buf49)
  2062.    setSearch(buf49)
  2063.    runKey(normal-f9)
  2064.    >Tuesday 16-Jul-91 23:07:57
  2065.  
  2066. Revise search string (push old) and search fwd
  2067. <shft-f7:
  2068.    putMsg("Modify search string:")
  2069.    freeBuf(buf50)
  2070.    insertRgn(buf50,sFile,buf49,all)
  2071.    if (!isEmpty(buf49)) push(buf49,buf50)
  2072.    inputString(buf49)
  2073.    setSearch(buf49)
  2074.    runKey(normal-f9)
  2075.    >Tuesday 16-Jul-91 23:07:59
  2076.  
  2077. Pick up hilite, or pop previous string, (push old, do not search)
  2078. <alt-f7:
  2079.    if (gtLoc(curFile,eHilite,sHilite)) {
  2080.          if (!isEmpty(buf49))  push(buf49,buf49)
  2081.          insertRgn(buf49,sFile,curFile,hilite)
  2082.          equateLoc(curFile,eHilite,sHilite) }
  2083.       else {
  2084.          equateNum(n0,49)
  2085.          getStackSize(n0,n1,n2)
  2086.          putMsg(n0) alertUser("search stack")
  2087.          if (gtNum(n0,0))
  2088.                pop(buf49,buf49)
  2089.             else {
  2090.                putMsg("Search stack is empty.  Search string not changed.")
  2091.                delay(10) } }
  2092.    setSearch(buf49)
  2093.    freeBuf(buf50)
  2094.    if (eqNum(searchCaps,1)) insertRgn(buf50,sFile,"(CASE SENSITIVE)",all)
  2095.    insertRgn(buf50,eFile,"Search string is: ",all)
  2096.    insertRgn(buf50,eFile,buf49,all)
  2097.    putMsg(buf50)
  2098.    refreshDisplay
  2099.    >Tuesday 16-Jul-91 23:08:02
  2100.  
  2101. Type in replace text to use in search-replace
  2102. <normal-f8:
  2103.    freeBuf(buf48)
  2104.    runKey(shft-f8)
  2105.    >Sunday 09-Jun-91 17:50:29
  2106.  
  2107. Revise existing replace text
  2108. <shft-f8:
  2109.    putMsg("Type in or modify replace string:")
  2110.    inputString(buf48)
  2111.    >Sunday 07-Jul-91 15:54:21
  2112.  
  2113. CsSearch forward, mark matched region, put cursor at end of rgn
  2114. <normal-f9:
  2115.    equateNum(n0,1)
  2116.    runKey(virtual-s)
  2117.    >Wednesday 24-Jul-91 23:08:17
  2118.  
  2119. CsSearch backward, mark matched region, put cursor at start of rgn
  2120. <shft-f9:
  2121.    equateNum(n0,-1)
  2122.    runKey(virtual-s)
  2123.    >Wednesday 24-Jul-91 23:08:17
  2124.  
  2125. Search forward, mark matched region, put cursor at end of rgn
  2126. <lAmiga-f9:
  2127.    setSearch(buf49)
  2128.    if (search(curFile,sInvert,eInvert,1)) {
  2129.          equateLoc(curfile,atCursor,eInvert)
  2130.          putMsg("Next match forward")
  2131.          refreshDisplay
  2132.          returnTrue }
  2133.       else {
  2134.          freeBuf(buf50)
  2135.          insertRgn(buf50,sFile," SEARCH FAILED, no match below here",all)
  2136.          if (eqNum(1,searchCaps)) insertRgn(buf50,sFile," (CASE SENSITIVE)",all)
  2137.          insertRgn(buf50,sFile,buf49,all)
  2138.          putMsg(buf50)
  2139.          equateLoc(curFile,sInvert,eInvert)
  2140.          refreshDisplay
  2141.          returnFalse }
  2142.    runKey(virtual-f9)
  2143.    >Wednesday 24-Jul-91 23:08:18
  2144.  
  2145. Search backward, mark matched region, put cursor at end of rgn
  2146. <rAmiga-f9:
  2147.    ..make sure we skip the one the cursor is on
  2148.    equateLoc(curFile,locA,atCursor)
  2149.    if (eqLoc(curFile,atCursor,eInvert)) moveCursor(curFile,sChar)
  2150.    setSearch(buf49)
  2151.    if (search(curFile,sInvert,eInvert,-1)) {
  2152.          equateLoc(curFile,atCursor,eInvert)
  2153.          putMsg("Next match backward")
  2154.          refreshDisplay
  2155.          returnTrue }
  2156.       else {
  2157.          equateLoc(curFile,atCursor,locA)
  2158.          freeBuf(buf50)
  2159.          insertRgn(buf50,sFile," SEARCH FAILED, no match above here",all)
  2160.          if (eqNum(1,searchCaps)) insertRgn(buf50,sFile," (CASE SENSITIVE)",all)
  2161.          insertRgn(buf50,sFile,buf49,all)
  2162.          putMsg(buf50)
  2163.          equateLoc(curFile,sInvert,eInvert)
  2164.          refreshDisplay
  2165.          returnFalse }
  2166.    >Wednesday 24-Jul-91 23:08:19
  2167.  
  2168. Replace matched region with replace text, then search forward
  2169. <normal-f10:
  2170.    if (eqLoc(curFile,sInvert,eInvert)) returnFalse
  2171.    clearRgn(curFile,invert)
  2172.    insertRgn(curFile,sInvert,buf48,all)
  2173.    runKey(lAmiga-f9)
  2174.    >Tuesday 30-Jul-91 22:37:52
  2175.  
  2176. Replace matched region with replace text, then search backward
  2177. <shft-f10:
  2178.    if (eqLoc(curFile,sInvert,eInvert)) returnFalse
  2179.    clearRgn(curFile,invert)
  2180.    insertRgn(curFile,sInvert,buf48,all)
  2181.    runKey(rAmiga-f9)
  2182.    >Tuesday 30-Jul-91 22:37:53
  2183.  
  2184. Replace and continue forward cssearch-replace until search fails
  2185. <alt-f10:
  2186.    while(runKey(normal-f10)) nothing
  2187.    >Sunday 09-Jun-91 17:50:30
  2188.  
  2189. |
  2190. |  makes it easy to check import lists for unused identifiers
  2191. |  picks up hilite or identifier under cursor
  2192. |  records the location of the next identifier in list
  2193. |  make search case sensitive, restores at return
  2194. |
  2195.  
  2196. Check identifier usage, recording loc of next in list at bookmark d
  2197. <shftCtl-i:
  2198.    ..make sure search is case sensitive
  2199.    if (!getFlag(curFile,searchCaps)) {
  2200.       equateNum(n10,1)
  2201.       flipFlag(curFile,searchCaps) }
  2202.    ..if no hilight, hilight word under cursor
  2203.    if (!(gtLoc(curFile,eHilite,sHilite) &
  2204.          eqLoc(curFile,eHilite,atCursor))) {
  2205.       ..find identifier under cursor
  2206.       ..in Modula an identifier is strictly alphanumeric
  2207.       ..note that sWord-eWord includes alpha, digits, and "'"
  2208.       if (!(is(curFile,alpha) | is(curFile,digit))) {
  2209.          putMsg("CURSOR IS NOT ON AN IDENTIFIER")
  2210.          return }
  2211.       while ((is(curFile,alpha) | is(curFile,digit)) & !is(curFile,eFile)) 
  2212.          moveCursor(curFile,eChar)
  2213.       ..alertUser ("right end of id")..debug
  2214.       equateLoc(curFile,eHilite,atCursor)
  2215.       decLoc(curFile,atCursor)
  2216.       while ((is(curFile,alpha) | is(curFile,digit)) & !is(curFile,sFile)) 
  2217.          moveCursor(curFile,sChar)
  2218.       if (!is(curFile,sFile)) moveCursor(curFile,eChar)
  2219.       ..alertUser ("left end of id")..debug
  2220.       equateLoc(curFile,sHilite,atCursor) }
  2221.    ..pick up hilight as search
  2222.    if (!isEmpty(buf49)) push(buf49,buf49)
  2223.    insertRgn(buf49,sFile,curFile,hilite)
  2224.    setSearch(buf49)
  2225.    freeBuf(buf50)
  2226.    insertRgn(buf50,sFile,buf49,all)
  2227.    ..before searching find next id in file (import list?), for next search
  2228.    ..set bookmark d in case we want to return
  2229.    moveCursor(curFile,eHilite)
  2230.    while (!(is(curFile,alpha) | is(curFile,digit)))
  2231.       moveCursor(curFile,eChar)
  2232.    equateLoc(curFile,locI,atCursor)
  2233.    ..alertUser("set bookmark d here")..debug
  2234.    ..search forward
  2235.    equateNum(n0,1)
  2236.    runKey(virtual-s)
  2237.    
  2238.    LABEL(0) ..search loop
  2239.    putMsg("arrowUp/Down=search, s=sFile, e=eFile, n=next in list, q=quit")
  2240.    getKeyVAL(macroNum,inputChar)
  2241.    switch(macroNum) {
  2242.       case(77) {                                                       ..downArrow
  2243.          equateNum(n0,1) }
  2244.       case(76) {                                                         ..upArrow
  2245.          equateNum(n0,-1) }
  2246.       case(33) {                                                               ..s
  2247.          moveCursor(curFile,sFile)
  2248.          equateNum(n0,1) }
  2249.       case(18) {                                                               ..e
  2250.          moveCursor(curFile,eFile)
  2251.          equateNum(n0,-1) }
  2252.       case(54) {                                                               ..n
  2253.          freeBuf(buf50)
  2254.          insertRgn(buf50,sFile,
  2255.             "Quit identifier search, returned to next identifier in list",all)
  2256.          moveCursor(curFile,locI)
  2257.          putMsg(buf50)
  2258.          if (!onScreen(atCursor)) vScroll(atCursor)
  2259.          returnTrue }
  2260.       case(16)                                                                 ..q
  2261.       default {
  2262.          putMsg("Quit identifier search")
  2263.          vScroll(atCursor)
  2264.          beepDisplay
  2265.          returnTrue } }  ..end switch(macroNum)
  2266.    if (!runKey(virtual-s)) {
  2267.       if(askYesNo("Return to next in list?")) {
  2268.          moveCursor(curFile,locI)
  2269.          if (!onScreen(atCursor)) vScroll(atCursor)
  2270.          goto label(0) } }
  2271.    refreshDisplay
  2272.    goto label(0)
  2273.    >Friday 26-Jul-91 10:09:23
  2274.  
  2275. ==== MAKE LIST, REPLACE LIST ====
  2276.  
  2277. Pick up hilight in curFile, make list in buf41
  2278. <ctl-i:
  2279.    ..if no hilite, pick up alphanumeric word
  2280.    if (!gtLoc(curFile,eHilite,sHilite)) {
  2281.       if (is(curFile,whiteSpace)) {
  2282.          putMsg("Cursor is NOT on a word")
  2283.          beepDisplay}
  2284.       while (is(curFile,alpha) | is(curFile,digit)) moveCursor(curFile,sChar)
  2285.       if (!is(curFile,sFile)) moveCursor(curFile,eChar)
  2286.       equateLoc(curFile,sHilite,atCursor)
  2287.       while (is(curFile,alpha) | is(curFile,digit)) moveCursor(curFile,eChar)
  2288.       equateLoc(curFile,eHilite,atCursor) }
  2289.    ..if not already in buf41, add it
  2290.    freeBuf(buf50)
  2291.    insertRgn(buf50,sFile,curFile,hilite)
  2292.    setSearch(buf50)
  2293.    moveCursor(buf41,eFile)
  2294.    if (!search(buf41,sHilite,eHilite,-1)) {
  2295.       insertRgn(buf41,eFile,curFile,hilite)
  2296.       insertChar(buf41,eLine) }
  2297.    >Tuesday 30-Jul-91 16:01:37
  2298.  
  2299. |
  2300. |    Use ctl-i to create your search list
  2301. |    Buf41 can mix three forms:
  2302. |  
  2303. |    search replace
  2304. |    \search phrase\\replace phrase\
  2305. |..  <search phrase><replace phrase>
  2306. |..  In the third form the <> are part of the phrase but in the second form 
  2307. |..  the \\ are not part of the phrase.  The third form is handy for editing
  2308. |..  hypertext files, so you do not have to type \<search>\\<replace>\ in 
  2309. |..  order to exchange hyper words and phrases.
  2310.  
  2311. Replace names in curFile as per list in buf41
  2312. <ctl-e:
  2313. equateNum(n0,0)
  2314. if (askYesNo("Confirm each replacement?")) equateNum(n0,1)
  2315. equateNum(n10,curFile)
  2316. ..now use buf[n10] instead of curFile so debugging works
  2317. moveCursor(buf41,sFile)
  2318. while (gtLoc(buf41,eFile,atCursor)) {                                  ..to end
  2319.    ..get search word
  2320.    equateLoc(buf41,sHilite,atCursor)                          ..always at sLine
  2321.    equateLoc(buf41,sInvert,atCursor)                      ..will display invert
  2322.    equateLoc(buf41,eInvert,atCursor)
  2323.    if (is(buf41,"\\")) {                                    ..phrases are in \\
  2324.          ..alertUser("phrases are in \\")..debug
  2325.          moveCursor(buf41,eChar)
  2326.          equateLoc(buf41,sHilite,atCursor)
  2327.          while (!is(buf41,"\\") & !is(buf41,eLine)) moveCursor(buf41,eChar)
  2328.          if (is(buf41,eLine)) {
  2329.             editBuf(buf41)
  2330.             putMsg("NO \ MARKING END OF SEARCH PHRASE FOUND ON THIS LINE")
  2331.             beepDisplay
  2332.             returnFalse }
  2333.          equateLoc(buf41,eHilite,atCursor)
  2334.          moveCursor(buf41,eChar)
  2335.          while (!is(buf41,"\\") & !is(buf41,eLine)) moveCursor(buf41,eChar)
  2336.          if (is(buf41,eLine)) {
  2337.             editBuf(buf41)
  2338.             putMsg("NO \ MARKING START OF REPLACEMENT PHRASE FOUND ON THIS LINE")
  2339.             beepDisplay
  2340.             returnFalse } }
  2341.    else {if (is(buf41,"<")) {                               ..phrases are in <>
  2342.          ..alertUser("phrases are in <>")..debug
  2343.          moveCursor(buf41,eChar)
  2344.          while (!is(buf41,">") & !is(buf41,eLine)) moveCursor(buf41,eChar)
  2345.          if (is(buf41,eLine)) {
  2346.             editBuf(buf41)
  2347.             putMsg("NO > MARKING END OF SEARCH PHRASE FOUND ON THIS LINE")
  2348.             beepDisplay
  2349.             returnFalse }
  2350.          moveCursor(buf41,eChar)
  2351.          equateLoc(buf41,eHilite,atCursor)
  2352.          while (!is(buf41,"<") & !is(buf41,eLine)) moveCursor(buf41,eChar)
  2353.          if (is(buf41,eLine)) {
  2354.             editBuf(buf41)
  2355.             putMsg("NO < MARKING START OF REPLACEMENT PHRASE FOUND ON THIS LINE")
  2356.             beepDisplay
  2357.             returnFalse } }
  2358.       else {                                         ..words separated by space
  2359.          while(!is(buf41,space) & !is(buf41,eLine)) moveCursor(buf41,eChar)
  2360.          equateLoc(buf41,eHilite,atCursor)
  2361.          while (is(buf41," ") & !is(buf41,eLine)) moveCursor(buf41,eChar) } }
  2362.    freeBuf(buf49)
  2363.    insertRgn(buf49,sFile,buf41,hilite)
  2364.    setSearch(buf49)
  2365.    ..editBuf(buf41) alertUser("search word hilited")..debug
  2366.  
  2367.    ..get replace word
  2368.    equateLoc(buf41,sHilite,atCursor)
  2369.    if (is(buf41,"\\")) {                                    ..phrases are in <>
  2370.          moveCursor(buf41,eChar)
  2371.          equateLoc(buf41,sHilite,atCursor)
  2372.          while (!is(buf41,"\\") & !is(buf41,eLine)) moveCursor(buf41,eChar)
  2373.          if (is(buf41,eLine)) {
  2374.             editBuf(buf41)
  2375.             putMsg("NO \ MARKING END OF REPLACEMENT PHRASE FOUND ON THIS LINE")
  2376.             beepDisplay
  2377.             returnFalse }
  2378.          equateLoc(buf41,eHilite,atCursor)
  2379.          moveCursor(buf41,eChar) }
  2380.    else {if (is(buf41,"<")) {                               ..phrases are in <>
  2381.          moveCursor(buf41,eChar)
  2382.          while (!is(buf41,">") & !is(buf41,eLine)) moveCursor(buf41,eChar)
  2383.          if (is(buf41,eLine)) {
  2384.             editBuf(buf41)
  2385.             putMsg("NO > MARKING END OF REPLACEMENT PHRASE FOUND ON THIS LINE")
  2386.             beepDisplay
  2387.             returnFalse }
  2388.          moveCursor(buf41,eChar)
  2389.          equateLoc(buf41,eHilite,atCursor) }
  2390.       else {                                         ..words separated by space
  2391.          while(!is(buf41,space) & !is(buf41,eLine)) moveCursor(buf41,eChar)
  2392.          equateLoc(buf41,eHilite,atCursor)
  2393.          if (eqLoc(buf41,sHilite,eHilite)) {
  2394.             editBuf(buf41)
  2395.             putMsg("NO REPLACEMENT WORD FOUND ON THIS LINE")
  2396.             returnFalse } } }
  2397.    equateLoc(buf41,eInvert,atCursor)
  2398.    freeBuf(buf48)
  2399.    insertRgn(buf48,sFile,buf41,hilite)
  2400.    ..monitor progress
  2401.    freeBuf(buf50)
  2402.    insertRgn(buf50,sFile,buf41,invert)
  2403.    putMsg(buf50)
  2404.    ..editBuf(buf41) alertUser("replace word hilited")..debug
  2405.  
  2406.    ..editBuf(buf[n10])..debug
  2407.    moveCursor(buf[n10],sFile)
  2408.    ..alertUser("starting search from top of curFile")
  2409.    while (gtLoc(buf[n10],eFile,atCursor)) {
  2410.       if (!search(buf[n10],sHilite,eHilite,1)) goto label(1)
  2411.       ..alertUser("candidate")
  2412.  
  2413.       ..check for whole word, don't replace part of identifier
  2414.       equateLoc(buf[n10],locA,sHilite)
  2415.       equateLoc(buf[n10],locB,eHilite)
  2416.       moveCursor(buf[n10],eWord)
  2417.       ..alertUser("check right")..debug
  2418.       if (gtLoc(buf[n10],atCursor,locB)) {
  2419.          ..alertUser("alphanum on right")..debug
  2420.          goto label(0) }
  2421.       moveCursor(buf[n10],sWord)
  2422.       ..alertUser("check left")..debug
  2423.       if (gtLoc(buf[n10],locA,atCursor)) {
  2424.          ..alertUser("alphanum on left")..debug
  2425.          moveCursor(buf[n10],eWord)
  2426.          goto label(0) }
  2427.       ..search=whole word
  2428.       if (eqNum(n0,1)) {
  2429.             vScroll(atCursor)
  2430.             if (askYesNo("Replace as on msg line?")) {
  2431.                clearRgn(buf[n10],hilite)
  2432.                insertRgn(buf[n10],atCursor,buf48,all) } }
  2433.          else {
  2434.             clearRgn(buf[n10],hilite)
  2435.             insertRgn(buf[n10],atCursor,buf48,all) }
  2436.       ..alertUser("replaced")..debug
  2437.       LABEL(0) }
  2438.    LABEL(1)  ..exchange is done
  2439.    ..editBuf(buf41)..debug
  2440.    ..go to start of next search, if any
  2441.    if (!is(curFile,eLine)) moveCursor(buf41,eLine)
  2442.    if (!moveCursor(buf41,downLine)) {
  2443.       putMsg("Done")
  2444.       returnTrue }
  2445.    moveCursor(buf41,sLine) }
  2446. putMsg("Done")
  2447. >Friday 12-Jul-91 16:24:57
  2448. ==== SESSION PROFILE ====
  2449.  
  2450. Compile a profile of the session
  2451. <shftAltCtl-f1:
  2452.    newFile
  2453.    insertRgn(curFile,eFile,"SESSION PROFILE",all)
  2454.    insertChar(curFile,eLine)
  2455.    insertChar(curFile,eLine)
  2456.    insertRgn(curFile,eFile,"set bookmark a",all)
  2457.    getPageRowCol(n2,n1,n2)
  2458.    while (gtNum(30,n2)) {
  2459.       insertChar(curFile," ")
  2460.       getPageRowCol(n0,n1,n2) }
  2461.    insertRgn(curFile,eFile,"n27 = ",all)
  2462.    toWord(curFile,n27)
  2463.    insertChar(curFile,eLine)
  2464.    insertRgn(curFile,eFile,"set bookmark b",all)
  2465.    getPageRowCol(n2,n1,n2)
  2466.    while (gtNum(30,n2)) {
  2467.       insertChar(curFile," ")
  2468.       getPageRowCol(n0,n1,n2) }
  2469.    insertRgn(curFile,eFile,"n28 = ",all)
  2470.    toWord(curFile,n28)
  2471.    insertChar(curFile,eLine)
  2472.    insertRgn(curFile,eFile,"used bookmark e",all)
  2473.    getPageRowCol(n2,n1,n2)
  2474.    while (gtNum(30,n2)) {
  2475.       insertChar(curFile," ")
  2476.       getPageRowCol(n0,n1,n2) }
  2477.    insertRgn(curFile,eFile,"n21 = ",all)
  2478.    toWord(curFile,n21)
  2479.    insertChar(curFile,eLine)
  2480.    insertRgn(curFile,eFile,"used bookmark -1",all)
  2481.    getPageRowCol(n2,n1,n2)
  2482.    while (gtNum(30,n2)) {
  2483.       insertChar(curFile," ")
  2484.       getPageRowCol(n0,n1,n2) }
  2485.    insertRgn(curFile,eFile,"n22 = ",all)
  2486.    toWord(curFile,n22)
  2487.    insertChar(curFile,eLine)
  2488.    insertRgn(curFile,eFile,"used bookmark 0",all)
  2489.    getPageRowCol(n2,n1,n2)
  2490.    while (gtNum(30,n2)) {
  2491.       insertChar(curFile," ")
  2492.       getPageRowCol(n0,n1,n2) }
  2493.    insertRgn(curFile,eFile,"n23 = ",all)
  2494.    toWord(curFile,n23)
  2495.    insertChar(curFile,eLine)
  2496.    insertRgn(curFile,eFile,"used bookmark a",all)
  2497.    getPageRowCol(n2,n1,n2)
  2498.    while (gtNum(30,n2)) {
  2499.       insertChar(curFile," ")
  2500.       getPageRowCol(n0,n1,n2) }
  2501.    insertRgn(curFile,eFile,"n24 = ",all)
  2502.    toWord(curFile,n24)
  2503.    insertChar(curFile,eLine)
  2504.    insertRgn(curFile,eFile,"used bookmark b",all)
  2505.    getPageRowCol(n2,n1,n2)
  2506.    while (gtNum(30,n2)) {
  2507.       insertChar(curFile," ")
  2508.       getPageRowCol(n0,n1,n2) }
  2509.    insertRgn(curFile,eFile,"n25 = ",all)
  2510.    toWord(curFile,n25)
  2511.    insertChar(curFile,eLine)
  2512.    insertRgn(curFile,eFile,"saved on idle",all)
  2513.    getPageRowCol(n2,n1,n2)
  2514.    while (gtNum(30,n2)) {
  2515.       insertChar(curFile," ")
  2516.       getPageRowCol(n0,n1,n2) }
  2517.    insertRgn(curFile,eFile,"n26 = ",all)
  2518.    toWord(curFile,n26)
  2519.    insertChar(curFile,eLine)
  2520.    moveCursor(curFile,sFile)
  2521.    putMsg("Hit any key to continue")
  2522.    refreshDisplay
  2523.    getKey(n0)
  2524.    freeBuf(curFile)
  2525.    putMsg(" ")
  2526.    >Monday 24-Jun-91 23:10:34
  2527.