home *** CD-ROM | disk | FTP | other *** search
/ Internet File Formats / InternetFileFormatsCD.bin / text / latex / mac / alpha60.hqx / Help / Manual < prev    next >
Encoding:
Text File  |  1995-07-10  |  65.3 KB  |  2,666 lines

  1.            Copyright ⌐ 1990-1995 Pete Keleher. All Rights Reserved
  2.  
  3. The Author(s) of this product are in no way liable for any direct or 
  4. indirect damage caused by the product. 
  5.  
  6. You may freely copy and distribute ALPHA, but please bear in mind that 
  7. ALPHA is Shareware.  If you decide to keep it, please register your copy 
  8. by selecting 'Register' from the 'About╔' dialog.
  9.  
  10. I am collecting user-written Tcl procs and XTCLs in 
  11. pub/faculty/keleher/Alpha/contrib on cs.umd.edu.  If you have written 
  12. anything that you think may be of general interest, please send it to me 
  13. and I will make it available.
  14.  
  15. Alpha contains source from main places, but in particular I'm grateful to 
  16. Ray Johnson and Tim Endres for their working on porting TCL to the mac, 
  17. and to Tom Scavo and Tom Pollard for their Tcl code contributions. 
  18. The following people have also provided considerable code and/or help 
  19. debugging the one or two bugs Alpha has had: Masatsugu Nagata, Karl J.  
  20. Smith, Eric Sink, David C. Black, Richard T. Austin, Henry Spencer, 
  21. and Jerry Fowler.
  22.  
  23. What to do: USE THE MARKS MENU IN THIS FILE!.  This file contains "marks" 
  24. in a popup menu above the vertical scrollbar on the right, that let you 
  25. jump to different sections of this file.  Mouse-down on the curly braces.
  26.  
  27. Also, Alpha supports a limit form of hypertext. Clicking on green 
  28. underlined text executes a command associated with the underlined text, 
  29. usually taking you to other documentation. For example, clicking here 
  30. takes you to more documentation of the hypertext capabilities.
  31.  
  32. Alpha is a very powerful, multi-purpose editor that allows any program- 
  33. or user-defined function to be bound to any keystroke, or placed into 
  34. user-defined menus. Every menu is defined in the macro language Tcl by 
  35. one of the startup files ("alphaBits.tcl" or one of the files sourced 
  36. from inside it). 
  37.  
  38. Alpha uses Dr.  Ousterhout's Tool Command Language (Tcl) as an extension 
  39. language.  Click here for a more complete definition of the language.  Many 
  40. of the functions bound to keystrokes, as well as many of the functions in 
  41. the user-defined menus, are written in Tcl.
  42.  
  43. Callable functions in Alpha come in two different flavors.  First, there 
  44. are the basic Tcl commands, detailed here.  Second there are "Alpha commands",
  45. commands that relate specifically to Alpha. 
  46.  
  47. The only way to get to know the editor and the language is to try different 
  48. things out.  Play around.  Choose the menu item "Misc:List Bindings" to get 
  49. a listing of all the current keystoke bindings.  Look in "procs.tcl" for 
  50. definitions of many of the routines.  Look in "menus.tcl" for 
  51. definitions of most of the menus.  See the section on "GUI Details" for 
  52. more information about the various pieces of Alpha's windows. And 
  53. finally, please feel free to send suggestions/"feature" reports/questions 
  54. to me at keleher@cs.umd.edu.  I am not able to answer US postal mail, but 
  55. if you send it to me I will at least read it.  Have fun!
  56.  
  57.  
  58.  
  59.           Colorizing
  60.  
  61. Version 5.80 and up support automatic "colorizing" of text.  This is 
  62. controlled by the function 'regModeKeywords', which registers keywords to 
  63. colorize in a specific mode.  By default, color schemes are supplied for C, 
  64. C++, Pascal, Tcl, and TeX.  Colorizing can be turned off via the 'coloring' 
  65. flag.
  66.  
  67. You can add words to a given mode by creating a file called prefs.tcl 
  68. in the 'Alpha' subdirectory of the system preferences file, and using 
  69. regModeKeywords w/ the -a option.
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.           File Detritus
  110.  
  111. The primary method of either reading or storing files with Alpha, or any 
  112. other Mac editor, is through the GetFile and PutFile dialogs. However, 
  113. Alpha's dialogs are not exactly like those of other applications. 
  114.  
  115. The GetFile dialog has two additional items: a "Read-only" checkbox and an 
  116. "All Files" checkbox.  The first allows you to open a file as read only.  
  117. Files in the read-only state can not be modified, only read.  A read-only 
  118. file is indicated by a lock icon replacing the grow zone icon.  Read-only 
  119. status can be toggled by command-clicking on the icon.
  120.  
  121. The second checkbox, "All Files", allows Alpha to open any file rather 
  122. than just those of type 'TEXT'. The type of a file can be determined by 
  123. using the 'll' alias in the Tcl shell.
  124.  
  125.  
  126. The PutFile dialog is used to prompt the user for a new name under which to 
  127. save the contents of a window. This dialog has been enhanced by two popup 
  128. menus: "State" and "Format". "State" allows you to specify how much 
  129. information should be saved in the resource fork of files that you use. If 
  130. the state is set to "MPW", window position, current selection, tab sizes, 
  131. and font information are saved into the resource fork of your application 
  132. every time you open and close it, *even if you don't modify the file*. 
  133. Alpha still manages to coexist with build or make files because saving this 
  134. information does not change the modification date of the file. If the state 
  135. is set to "Think", neither the window position nor the current selection 
  136. are saved. If state is set to "None", no information is saved. The default 
  137. value for saved state can by changed by setting the Alpha variable 
  138. 'savedState' to "mpw", "think", or "none". Note that if a given file 
  139. already has mpw information in it when the file is open, Alpha will always 
  140. update that information when the file is closed. Note also that "marks" 
  141. are always saved in the resource fork whenever a file is saved, 
  142. regardless of the setting of the 'savedState' variable.
  143.  
  144. The "Format" menus allows the way Alpha terminates lines to be changed. 
  145. The Mac uses a carriage return to mark the end of a line, Unix uses a 
  146. linefeed, and IBM uses both (of course). Alpha can read and write any of 
  147. these formats, and can convert between them just by opening a file, 
  148. choosing "Save As", and changing the selection in this menu. Note that if 
  149. you are going to be sharing files with a Unix or IBM machine, you 
  150. probably don't want anything in your resource fork, so you'd probably 
  151. want to set 'savedState' to 'none' in your prefs.tcl file.
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.           GUI Details
  164.  
  165. Alpha's windows have several non-standard features. 
  166.  
  167. First, the horizontal scrollbar can be turned on and off via the window 
  168. menu. The default for subsequent windows is controlled via the 
  169. global variable horScrollBar (look under "Modes:Flags").
  170.  
  171. Secondly, above the vertical scrollbar on the right are at least three 
  172. icons.  The bottom-most icon is the "Mode Vars" popup menu (see the Modes 
  173. section of this file).  The next icon is the "Mode" popup menu, which shows 
  174. the window's current mode and allows it to be changed.  The next icon shows 
  175. the "Marks" menu, which lists all marks for the current window and allows 
  176. them to be cleared or automatically created (through the Tcl proc 
  177. 'markFile' that calls mode-specific routines).  Finally, above this icon a 
  178. red disk icon appears if the window is currently dirty.  Clicking on this 
  179. icon saves the file.
  180.  
  181. Directly above the vertical scrollbar is a black bar that can be used to 
  182. split any window into two independent panes showing the same buffer. 
  183. Windows are split by either dragging the black bar or using the 
  184. "Windows:Split Window" menu command. Windows are unsplit the same way. 
  185. Double-clicking on the bar can also be used to toggle whether the window 
  186. is split.
  187.  
  188. Command-clicking on the window name brings up a popup menu that shows the 
  189. complete pathname of the file.  Command-clicking anywhere else on the 
  190. titlebar brings up the mark menu. Option-clicking on the titlebar of a 
  191. window queries the Symantec project manager for include files, if 
  192. running. 
  193.  
  194. Option-clicking and dragging text enables rectangular editing.
  195.  
  196. Control-double-clicking on any type of paren or bracket hilites from the 
  197. paren or bracket to it's mate.  Without the control key held down, only the 
  198. intervening text is selected.
  199.  
  200. Command-double clicking on a word in a C file will try to find the 
  201. definition of the word. The first option is looking up the word in the 
  202. tag file. If the word is not a tag, or no tags have been specified, Alpha 
  203. attempts to lookup the word through the THINK Reference app. If you would like 
  204. Apple's Toolbox Assistant to be used instead, edit the proc 
  205. 'cmdDoubleClick'. In Tcl mode, the verb is looked up in the SystemCode 
  206. and UserCode directories, then in ":Help:Alpha Commands", and then 
  207. finally in ":Help:Tcl Commands".
  208.  
  209. Alpha also supports drag and drop editing.
  210.  
  211. The grow region in the lower right corner is replaced by a lock icon if the 
  212. file is read-only.  Read-only status can be changed by command-clicking in 
  213. this area.
  214.  
  215. See "Status Bar" for information describing the bar running across the 
  216. bottom of the screen.
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.           Marks
  244.  
  245. Alpha allows the user to use "marks" to remember positions in files. Marks 
  246. "float". That is, if a mark is initially at position 312 and then five 
  247. characters are inserted at location 297, the mark's new value will be 317. 
  248. Alpha uses three different types of marks. 
  249.  
  250. The first is generically referred to as "the mark". The mark is set to the 
  251. current insertion point by the command 'setMark' (control-space by 
  252. default). The position in the file indicated by the blinking cursor is 
  253. referred to as the current insertion point. Many commands (such as "cut" 
  254. and "copy") can operate either on the currently selected (hilighted) text, 
  255. or the text between the current insertion point and "the mark". For 
  256. example, if you move the cursor to the beginning of the work "allybaba", 
  257. hit control-space (the status bar should say "Mark set"), move to the end 
  258. of the word and hit option-w (the status bar should say "Region copied"), 
  259. the effect is the same as if you had used the mouse to select the text and 
  260. then selected the "Copy" command from the "Edit" menu.
  261.  
  262. The second type of mark are the permanent marks. Permanent marks are set, 
  263. removed, and moved-to through the three corresponding menu items in the 
  264. "Search" menu. Permanent marks differ from the generic mark in that they 
  265. have names, there can be any number of them, and they are saved in the 
  266. resource fork if the file is subsequently saved.
  267.  
  268. Permanent marks can be access via the "Search:Named Marks" menu items, by 
  269. a popup menu called by mousing down on the curly braces above a vertical 
  270. scrollbar, or by command-mousing on a window's titlebar.
  271.  
  272. The third type of mark is the temporary mark. Like permanent marks, 
  273. temporary marks can be named and there can be any number of them. Unlike 
  274. permanent marks, temporary marks do not "dirty" the file, and they aren't 
  275. saved. So far, temporary marks are used exclusively to implement higher 
  276. order functions in TCL procedures. In the 5.0 release, temporary marks are 
  277. used to implement a "mark stack" and a for loop template.
  278.  
  279. At the time a file is saved, the marks for that file are stored into the 
  280. file's resource fork in an order determined by the variable 
  281. 'markSorting'. The choices are either 0 (no sorting), 1 (sort by file 
  282. position), or 2 (sort alphabetically).
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.           Mark Stack
  296.  
  297. The mark stack is a last-in-first-out (LIFO) stack of temporary marks 
  298. managed by the TCL procedures 'pushMark' and 'popMark'. 'pushMark' creates 
  299. a new temporary mark of the current insertion point and adds it on to the 
  300. top of the stack. 'popMark' removes the top mark from the stack and goes 
  301. toit. A typical use of the mark stack is a 'pushMark' at the current 
  302. position, go look somewhere else in the file, and then 'popMark' to get 
  303. back to where you were. However, the stack is recursive, so there can be 
  304. any number of 'pushMarks' before the marks start to be popped back off the 
  305. stack.
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.           Templates
  347.  
  348. Temporary marks can also be used to with language construct templates. The 
  349. file "template.tcl" contains an example implementing a template for C's 
  350. 'for' command. Depressing control-i will insert a template for the "for" 
  351. command into the current window. Five temporary marks are defined in the 
  352. for structure, three inside the parenthesis, one where the "for" body text 
  353. will be inserted, and one after outside the for body entirely. Depressing 
  354. control-shift-i moves the cursor to the next of the five temporary marks 
  355. allowing quick entry of the entire command.
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.           TCL
  400.  
  401. See the Tcl manual page under the 'Help' menu for a complete description of 
  402. Tcl, the Tcl shell, and it's commands.  Each of the Tcl commands and 
  403. several sections have a mark defined, so you can use the "Mark" menu to 
  404. navigate through the manual page.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.           Key Bindings
  452.  
  453. Any TCL command can be bound to any single keystroke. One way to bind a 
  454. function is with a statement such as:
  455.   
  456.       bind 'c' <modifier string> funcName [<mode>]
  457.           
  458. where c is a character, <modifier string> is an optional string containing 
  459. one or more of:
  460.  
  461.       c   - command modifier
  462.       o   - option modifier
  463.       s   - shift modifier
  464.       z   - control modifier
  465.       e   - escape modifier      
  466.  
  467. Additionally, the modifier string can contain a capital letter specifying 
  468. that the binding is only activated if preceded by control and the lowercase 
  469. version of that letter. This feature allows multiple-key combinations ala 
  470. Emacs. The following line binds cmd-shift-f to the function 'forwardChar': 
  471.  
  472.  bind 'f' <cs> forwardChar 
  473.  
  474. The next line would bind the same function to C-x C-f, assuming that 
  475. control-x is bound to the function 'prefixChar': 
  476.  
  477.  bind 'f' <cX> forwardChar 
  478.  
  479. 'mode' is an optional parameter that specifies, when present, that the 
  480. binding is only active in a given mode, where the current mode is the 
  481. parameter to the last call of 'displayMode' (look in "procs.tcl"). Note 
  482. that given a general binding (no mode specification) and a binding specific 
  483. to the current mode, the last binding to have been created is the one found 
  484. first. 
  485.  
  486. Additionally, most keyboards have keypads and/or Function Keys. These 
  487. keys can be bound using case-insensitive numeric labels using the same 
  488. bind command as above, with the label replacing the character. For 
  489. example, to bind F1 to function 'funcName', the following would work:
  490.  
  491.     bind F1 funcName
  492.  
  493. As above, the binding can include a modifier string. The following labels 
  494. are defined for US keyboards:
  495.  
  496.   Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 Help Home Pgup Del 
  497.   End Pgdn Left Right Up Down Clear Kpad0 Kpad1 Kpad2 Kpad3 Kpad4 Kpad5
  498.   Kpad6 Kpad7 Kpad8 Kpad9 Kpad= Kpad/ Kpad* Kpad- Kpad+ Enter Kpad.
  499.  
  500. The function 'listBindings' will list all of the bindings currently in 
  501. effect in a format suitable for re-loading.
  502.  
  503. The above labels may not be sufficient for all keyboards (attention 
  504. international users). If a hex number is used instead of a character inside 
  505. the single quotes, the binding is done to key codes instead of ascii 
  506. values. The following is a key code version of the same binding: 
  507.  
  508.       bind 0x03 <cs> forwardChar
  509.  
  510. The key code for any given key can be obtained by using the 'keyCode' 
  511. function. 
  512.  
  513. Also, there is an alternate form that allows the specification of an 
  514. ascii code directly:
  515.  
  516.     ascii 0x20 <z> setMark
  517.     
  518. Binds control-space to 'setMark'.
  519.  
  520. Note that menu item command equivalents take precedence over bindings, 
  521. and that the 'bind' command does not affect the command equivalents 
  522. displayed in the menus. Command equivalents can only be changed by using
  523. an external tool like 'ResEdit'. Also note that key code bindings take 
  524. precedence over ascii bindings. 
  525.  
  526. Finally, there are 'unbind' and 'unascii' functions, with identical 
  527. arguments to their counterparts. 
  528.  
  529.  
  530.  
  531.           Menus
  532.  
  533. Alpha's menus are completely reconfigurable. Some of the menu items are 
  534. internal alpha commands, while others are Tcl procs defined in one of the 
  535. files of the "Tcl" subdirectory. Most of these procs are defined in 
  536. "procs.tcl". The following is an explanation of the default menus. The 
  537. explanations of items that are defined as Tcl procs are implemented by the 
  538. Tcl proc specified by "(proc <name>)", and can be found in one of the .tcl 
  539. files. All others are internal functions. 
  540.  
  541. Versions 5.98 and above use Ramon Felciano's Mercury MDEF to display 
  542. menus. In addition to allowing other modifiers to be shown in the menu, 
  543. this MDEF also allows alternates, items that change depending on the 
  544. state of the modifier keys. Alternate items are tagged below by the 
  545. modifier that must be depressed to display it.
  546.  
  547. File
  548.     New                      New file.
  549.     Open╔                   Open file.
  550.     Recent╔                    Menu of recently opened files. These same files
  551.                             can be opened via the 'editFile' (cmd-') proc
  552.                             from the submenu of the filesets menu.
  553.     Close                   Close file.
  554.     Close All (option)        Close all files.
  555.  
  556.     Save                       Save file.
  557.     Save All (option)        Save all files.
  558.     SaveAs╔                   Prompt for name to same file under.
  559.     Revert                   Revert to last saved version, throw away undo history. 
  560.         
  561.     Shell                   Start up command-line shell that interprets Tcl 
  562.                             commands. The shell has a few csh-type features, 
  563.                             such as 'ls', 'rm', etc. commands, as well as file 
  564.                             completion with the TAB key. 
  565.  
  566.     Page Setup╔               Set print options.
  567.     Print                  
  568.         Print╔                Print file directly.
  569.         
  570.         Kodex C Pretty Printer        Print through Kodex app.
  571.         Enscriptor Fancy Printer    Print through Enscriptor app.
  572.         Send PS to 'DropÑPS'        Print through 'DropÑPS' app.
  573.         
  574.     Print All╔    (option)    Print all files.
  575.  
  576.     Quit                       Quit Alpha.
  577.  
  578. Edit
  579.     Undo                    Undo. 
  580.     Redo (option)            Redo. 
  581.     Load                    Execute either the window or the selection as Tcl 
  582.                             source. 
  583.     Cut                        Cut selection to scrap.
  584.     Cut & Append (option)    Cut and append selection to scrap.
  585.     Copy                    Copy selection to scrap.
  586.     Copy & Append (option)    Copy and append selection to scrap.
  587.     Paste                    Paste from scrap.
  588.     Paste Pop (option)        Immediately after a paste, use a previous paste 
  589.                             instead.
  590.  
  591.     Twiddle                    Exchange characters bracketing the selection point.
  592.     Twiddle Words (option)    Exchange words bracketing the selection point.
  593.     Yank                    Paste last deleted text. Concatenates together 
  594.                             consecutive, adjoining deletions.
  595.     Select All                Select entire file.
  596.     Select Paragraph (option)    Select current paragraph.
  597.     Clear                    Delete selection.
  598.  
  599.     Shift Left                Shift selection left one tab.
  600.     Shift Left Space (option)    Shift selection left one space.
  601.     Shift Right                Shift selection right one tab.
  602.     Shift Right Space (option)    Shift selection right one space.
  603.     Balance                    Select text out to the next set of matching braces.
  604.     
  605.     View Saved Settings╔    Any variables or flags that you modify during the
  606.                             course of a session are saved to files in the 
  607.                             system preferences folder when Alpha quits. 
  608.                             This function shows all such saved variables.
  609.     Remove Saved Settings╔    This function allows settings to be removed.
  610.     Edit prefs.tcl        Put your own arbitrary startup code here (used to be 
  611.                             "userStartup.tcl").
  612.                             
  613. Search
  614.     Find..                    Present a search dialog.
  615.     Search Start (option)    Return selection point to where the last search 
  616.                             started. 
  617.     Find Again                Search forward again w/ same settings.
  618.     Find Again Backward (option)    Search backward again w/ same settings.
  619.     Find in Next File        Restart multiple-file search in next file after 
  620.                             stopping at a match.
  621.  
  622.     Enter Search String        Use the current selection as the search text.
  623.     Enter Replace String (option)    Use the current selection as replace text.
  624.  
  625.     Replace                    Replace the selection.
  626.     Replace and Find Again.    Replace the selection and search again forward.
  627.     Replace All (option)    Replace all of occurances of the search string 
  628.                             in the rest of the file.
  629.     Replace in Fileset (control)    Global replace in fileset.
  630.     
  631.     Hilite                    Select text between current insertion and the 
  632.                             generic "mark". Or, if there is already a selection, 
  633.                             unselect the text, place the insertion at the 
  634.                             beginning of the unselection, and place the 
  635.                             "mark" at the end of the unselection. The function 
  636.                             'exchangePointAndMark' (by default mapped to the 
  637.                             "5" on the keypad and control-x,control-x) exchanges 
  638.                             the character positions of the insertion and the 
  639.                             "mark". 
  640.  
  641.     Named Marks
  642.         Set╔
  643.         Goto╔
  644.         Remove╔
  645.     Unnamed Marks
  646.         Set╔
  647.         Exchange Point and Mark
  648.     Mark Stack
  649.         Push                Push current pos onto a "stack".
  650.         Pop                    Pop last pos from stack and go to it.
  651.         
  652.     Registers
  653.         Point To Register    Create a single-char-named temporary mark at 
  654.                             insertion.
  655.         Jump To Register    Jump to mark made as above.
  656.     
  657. Utils
  658.     File Utils
  659.         Insert Path Name╔    Prompt for a file and insert complete pathname in 
  660.                             window.
  661.         Insert File╔        Insert the text of another file.
  662.         File Remove╔        Remove a file.
  663.         File Info╔            Display/edit info about a file.
  664.         Word Count            Count lines, words, chars in window (proc wordCount).
  665.     Compare
  666.         Windows                Compare top two windows, sending output to a third. 
  667.                             Selecting a line in the third window and hitting 
  668.                             return (or enter) moves that line to the top of 
  669.                             the window.
  670.         Files                Same as above, but prompts for files.
  671.         Directories            As above, but works for entire directories. 
  672.     Emacs
  673.     Ascii Etc
  674.         Key Code╔            Wait for key press and insert keycode and modifier 
  675.                             string suitable for key binding.
  676.         Key Ascii╔            Same as above, but use ascii form.
  677.         Get Ascii╔            Display ascii code for char to right of insertion.
  678.         Insert Ascii╔        Prompt for ascii code and insert character.
  679.         .....                Many emacs movement commands.
  680.         
  681.     Evaluate╔                Evaluate complex command.
  682.     Kbd Macros
  683.         Start Keyboard Macro    Start creating anonymous macro.
  684.         End Keyboard Macro        Finish.
  685.         Execute Keyboard Macro    Execute.
  686.         Dump Macro                Dump to current file.
  687.  
  688.     Sort Lines                Sort selected lines (proc sortLines).
  689.     Spellcheck Window
  690.  
  691.     Matching Lines            Grab all lines from current position on that match a 
  692.                             regular expression and dump in new buffer (proc 
  693.                             matchingLines). 
  694.     Goto Match                If cursor on line in output of batch search or 
  695.                             "Matching Lines", goto the match specified by 
  696.                             that line.
  697.                             
  698.     Named Clipboards
  699.         Copy╔
  700.         Cut╔
  701.         Paste╔
  702.         
  703.     Install
  704.         Electric Alias        Loads David Black's "electric alias" routines, see 
  705.                             the appropriate help file.
  706.         Mac Perl            Permanently loads the Tom Pollard's perl mode.
  707.         HTML                Permanently loads the Scott Brim's HTML mode.
  708.  
  709.     List Functions            List all functions currently defined, both
  710.                             "core" functions (those coded in C), and those
  711.                             coded in the supplied Tcl files.
  712.                             
  713. Mode
  714.     Flags                    A submenu of Tcl flags to be turned on and off. 
  715.                             Look under "Variables" for explanations of 
  716.                             individual flags (proc editFlag). Selecting any
  717.                             flag w/ the option key down shows docs for that 
  718.                             flag. 
  719.     Vars                    Same as Flags, except these variables may be 
  720.                             arbitrary integers or strings (proc editVar).
  721.                             Selecting any flag w/ the option key down shows 
  722.                             docs for that flag. 
  723.  
  724.     Lookup Name                Look up and display definition of the selected 
  725.                             word. If in "C" or "C++" mode, use the file pointed 
  726.                             to by 'tagFile'. If in "Tcl" or "Shel" mode, look
  727.                             in "Alpha Commands", "Tcl Commands", and the "Tcl"
  728.                             subdirectory.
  729.     Describe Binding╔        Wait for a keystroke, then display that keystroke's 
  730.                             binding.
  731.     List Bindings            Create a new file containing all current key bindings.
  732.     App Paths                List of paths to other applications. Allows 
  733.                             paths to be viewed, changed, or reset.
  734.  
  735.     Set Font Tabs╔            Change font and/or tabs for current file.
  736.         
  737.     Switch To                Bring other apps to front.
  738.     ToolServer Shell        Start a window that sends 'DOSC' events to Apple's 
  739.                             toolserver. 
  740.     
  741.  
  742. Convert
  743.     Fill Paragraph            "Fill" paragraph that contains the insertion (proc 
  744.                             fillParagraph).
  745.     Wrap Paragraph (option)    Break lines longer than 'fillColumn' in paragraph 
  746.                             containing insertion pt (proc wrapParagraph).
  747.     Fill Region                "Fill" selection subject to 'leftFillColumn' and 
  748.                             'fillColumn', (proc fillRegion).
  749.     Wrap Region (option)    Break lines longer than 'fillColumn' in selection 
  750.                             (proc wrapRegion).
  751.  
  752.     Zap Invisibles            Delete all chars in file w/ ASCII code < 32, except 
  753.                             for LF, TAB and CR.
  754.     Tabs To Spaces            Convert tabs to space runs.
  755.     Spaces To Tabs            Convert space runs to tabs.
  756.  
  757.     Strings
  758.         Insert Prefix            Prepend string 'prefixString' to every line in 
  759.                                 selection (proc insertPrefix).
  760.         Remove Prefix (option)    Remove prefix string from lines in selection 
  761.                                 (proc removePrefix). 
  762.         Insert Suffix            Append string 'suffixString' to every line in 
  763.                                 selection (proc insertSuffix).
  764.         Remove Suffix (option)    Remove suffix string from lines in selection 
  765.                                 (proc removeSuffix). 
  766.         Set Prefix╔                Change prefix string (proc setPrefix).
  767.         Set Suffix╔                Change suffix string (proc setSuffix).
  768.     Comment Line            Comment out line, considering mode.
  769.     Uncomment Line (option)    Un-comment line, considering mode.
  770.     Comment Box                Create a comment box around selected text.
  771.     UnComment Box (option)    Remove such a comment box.
  772.         
  773.     Downcase Region            Downcase all chars in region.
  774.     Upcase Region            Upcase all chars in region.
  775.  
  776.  
  777. Help
  778.     Editor help files (proc helpMenu).
  779.     
  780. Wins (an icon with three windows)
  781.     Arrange                    Rearrange open windows.
  782.  
  783.     Zoom                    Zoom windows in and out.
  784.     Single Page (option)    Resize as single page.
  785.     Iconify                    Toggle iconification of front window.
  786.     Split Window            Split window into two panes, or unsplit.
  787.     Toggle Scrollbar        Toggle the horizontal scrollbar on the frontmost 
  788.                             window. The scrollbar can be enabled/disabled on 
  789.                             subsequent variables by changing the value of 
  790.                             the 'horScrollBar' flag.
  791.  
  792.     Next Window                Select next window (proc nextWindow).
  793.     Prev Window (option)    Select previous window.
  794.     Swap With Next            Swap topmost two windows (proc swapWithNext).
  795.     Choose A Window            Choose window to select from list (proc 
  796.                             chooseAWindow).
  797.  
  798. File Sets            
  799.         Edit File            Edit a file from one of the filesets.
  800.  
  801.         (hierarchical menus containing fileset and their files, select file to 
  802.          edit)
  803.  
  804.         Utilities
  805.             Choose                Set current fileset.
  806.             Create Fileset        Create a fileset on the fly.
  807.             Delete FileSet        Delete a fileset.
  808.  
  809.             Create Fileset From Wins    Builds a new fileset containing all
  810.                                 currently open windows.
  811.             Open Entire Fileset            Opens all files in a specified fileset.
  812.             
  813.             Create Think Fileset Create a fileset containing the source files
  814.                                 of the current Symantec project.
  815.             Create Warrior Fileset Create a fileset containing the source files
  816.                                 of the current CodeWarrior project.
  817.  
  818.             Find Tag            Find a function definition.
  819.             Create Tag File        Create a "tag" file specifying where functions
  820.                                 are defined.
  821.  
  822.             Replace In Fileset    Global search-and-replace through a fileset. Does
  823.                                 not update open windows unless told to.
  824.                                 
  825.             Regbuild Fileset Menu    Rebuilds the menu. Filesets created with 
  826.                                 globbing (all except the Symantec and 
  827.                                 CodeWarrior filesets) are re-globbed and 
  828.                                 reflect changes in the directories.
  829.                                 
  830.     
  831.           Menus, User-Defined 
  832.  
  833. All of Alpha's menus are defined in the initialization files that Alpha 
  834. loads on startup.  They can be altered or discarded at well.  Alpha's menu 
  835. commands allow the the user to build custom menus which contain names of 
  836. functions, macros, or arbitary TCL commands that just HAVE to be in the 
  837. menus, as opposed to being merely callable through the bindings.  The 
  838. syntax is dead simple.  Menus can be nested, allowing heirachical menus to 
  839. be defined.  See the 'alphaBits.tcl' file for examples (only the first 
  840. three Alpha menus are hard-coded into the Application, the others are set 
  841. up through the alphaBits.tcl file).  The following meta characters can be 
  842. embedded in the strings:
  843.  
  844.    Meta-character     Usage
  845.    --------------     -----
  846.  
  847.     ; or Return       Separates multiple items.
  848.     ^                 Followed by an icon number, adds 
  849.                       that icon to the item.
  850.     !                 Followed by a character, marks the
  851.                       item with that character.
  852.     <                 Followed by B, I, U, O, E, or S,  
  853.                       sets the character style of the item.
  854.     /                 Followed by a character, sets up
  855.                       a keyboard equivalent.
  856.     (                 Disables the item.
  857.  
  858.  
  859. The following modifiers can be used to require other combinations of modifiers
  860. than just the command key. Control-option, for instance, is specified by 
  861. putting the string "<B<I" in the menu item. The menu symbol for shift is 
  862. an upward outline arrow, control is the outlined ^ symbol ("Files:Close All"
  863. has one), and option is the wavy line with the dot in the upper right 
  864. ("Wins:Iconify" has one). The following are characters that can follow 
  865. the '<' and what they signify.
  866.  
  867.     B        - control key required
  868.     I        - option key required
  869.     U        - shift key required (only for alpha-numerics!)
  870.     O        - command key required
  871.     S        - isDynamicItem is part of dynamic item.
  872.     E        - forces item to start new dynamic item.
  873.  
  874.  
  875. Please ignore the following:
  876.  
  877.     a    Enter            n    F10
  878.     b    Return            o    F11
  879.     c    Tab                p    F12    
  880.     d    Num Lock        q    F13
  881.     e    F1                r    F14
  882.     f    F2                s    F15
  883.     g    F3                t    Help
  884.     h    F4                u    Del
  885.     i    F5                v    Forward Del
  886.     j    F6                w    Home
  887.     k    F7                x    End
  888.     l    F8                y    Page Up
  889.     m    F9                z    Page Down
  890.     
  891.     128    Up                130    Left
  892.     129    Down            131    Right
  893.     
  894.  
  895.  
  896. The menu creation syntax is :
  897.  
  898.     menu <-n name> <-i num> [-p procName] [-m] "Tcl list of items"
  899.  
  900. Where the arguments have the followings meanings:
  901.   '-s'            Save previous search string and flags.
  902.   '-i <num>'    Resource id of icon suite to use for menu title.
  903.   '-n <name>'    Name of menu.
  904.   '-m'            No menu form. If not supplied, each menu item is split into 
  905.                   words at each capitalized letter.
  906.   '-p <pname>'     Rather that having alpha call a Tcl proc named by the menu 
  907.                   item's text, this option tells Alpha to call the tcl proc 
  908.                   named by 'pname' with two arguments: the menu name, and the
  909.                   text of the menu item chosen.
  910.   '-M <mode>'    Bindings only take effect in specified mode.
  911.   
  912. Once the menus are created, they can be inserted and  deleted from the 
  913. menu bar by the syntax:
  914.  
  915.    insertMenu "name"
  916.    deleteMenu "name"
  917.  
  918. as well as through macros.
  919.  
  920.  
  921. As alluded to above, Alpha attempts to make procedure names readable in the 
  922. menus by separating words at any capitalized letter. For example, 
  923. 'findFile' becomes "Find File". This function is turned off by the '-m' 
  924. option. 
  925.  
  926. Menu items can be enabled and disabled through the TCL command 
  927. 'enableMenuItem'. Menu items checkmarks can be turned on and off via 
  928. 'markMenuItem'. Menu items can be appended via 'addMenuItem' and deleted 
  929. via 'deleteMenuItem'. See the "Alpha Commands" help file for syntax. 
  930.  
  931. As explained above, the Mac ToolBox uses various keys to specify text 
  932. style and key equivalents. Sometimes you may want these characters 
  933. included in your text literally. If an ampersand ('&') is the last 
  934. character in a menu item, Alpha coerces the string so that these special 
  935. characters are not interpreted.
  936.  
  937. If an ellipsis ('╔') is the last character in a menu item (except possible 
  938. for the above ampersand), it is stripped off before searching for the 
  939. function corresponding to the chosen item.
  940.  
  941.  
  942. #================================================================================
  943. # Just for the heck of it, the following is a script that I put in my 
  944. # prefs.tcl file. It creates a menu for all the .tex files in my 
  945. # thesis directory, minus the dirname and .tex extension.
  946. #
  947. set THESIS "Internal:Textures:thesis"
  948. proc thesisMenuProc {menu item} {
  949.     global THESIS
  950.     edit -r -m $THESIS:$item.tex
  951. }
  952.  
  953. set files ""
  954. foreach f [glob $THESIS:*.tex] {
  955.     lappend files [file rootname [file tail $f]]
  956. }
  957. menu -n Thesis -m -p thesisMenuProc $files
  958. unset files
  959. #================================================================================
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.           Event Hooks
  970.  
  971. Alpha calls the TCL procs "openHook", "saveHook", "saveasHook", "closeHook", 
  972. "activateHook", "deactivateHook", "suspendHook", and "resumeHook" when the 
  973. corresponding events occur. With the exception of "saveasHook", the proc 
  974. are all called with the complete pathname as the sole argument. 
  975. "saveasHook" is called with the old pathname as the first argument and the 
  976. new pathname as the second argument. Default implementations for these 
  977. commands are in the file 'modes.tcl'. These commands can be modified to 
  978. perform arbitrary commands, including saving of files, backups, 
  979. implementations of per-window variables, etc. 
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.           Searches
  1024.  
  1025. ALPHA has a full repertoire of searching commands.  The 'find' command 
  1026. brings up a dialog allowing the search and replacement text to be 
  1027. specified.  The dialog also allows 'Forward', 'Ignore Case', 'Reg Expr', 
  1028. and 'Word Match' options to be set.  These options can be toggled via the 
  1029. keyboard by clover-<first letter of option>.  For example, clover-w toggles 
  1030. the 'Word Match' option.
  1031.  
  1032. The 'Mult Files' option tells Alpha to search through all files in a given 
  1033. file set.  Filesets can be specified in 'procs.tcl' (see the section on 
  1034. filesets) or on the fly, via the "Create Fileset╔" item of the "File 
  1035. Sets:Utilities" sub-menu. Filesets can be chosen via the popup fileset menu.
  1036.  
  1037. In addition to the current filesets, the fileset menu has an entry called 
  1038. "Directory Scan". Selecting this menu item enables the "Scan Options" 
  1039. button. This button, in turn, allows the specification of a directory and 
  1040. a file pattern to be searched instead of a fileset. To set the directory, 
  1041. hit the "Dir:" button. The pattern is used to select files of the 
  1042. selected directory. The '*' wildcard character can be used to replace any 
  1043. sequence of characters. For example, the pattern '*.c' will select any 
  1044. file ending with ".c". If this doesn't work, be sure that you executed 
  1045. all of the following steps:
  1046.         1) select "Directory Scan" in the popup menu of the find dialog
  1047.         2) Hit the "Scan Options" button.
  1048.         3) Select a directory via the "Dir:" button.
  1049.  
  1050. All multiple searches can be "Batch" searches, a list of all matches in the 
  1051. fileset are displayed in a new window.  A particular match can be displayed 
  1052. by moving the cursor to a line in the file of matches and selecting "Goto 
  1053. Match" from the Utils menu (also bound to control-c control-c).
  1054.  
  1055. And finally, Alpha allows a library of useful search and replace texts to 
  1056. be defined as a tcl list of lists (each sublist containing a name, search 
  1057. text, and replacement text). This list, the 'patternLibrary' variable 
  1058. defined at the end of 'procs.tcl', is used to create a popup menu in the 
  1059. find dialog allowing these patterns to be easily entered.
  1060.  
  1061. Once the text and options have been set, the 'Search' menu contains several 
  1062. commands for repeated searching, replacing, etc. 
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.           Regular Expressions
  1076.  
  1077. If the variable 'regExpr' is true, the search functions interpret the 
  1078. search text as regular expressions, which have the following elements:
  1079.  
  1080.  c        literal char.
  1081.  ^        beginning of line.
  1082.  $        end of line.
  1083.  .        any character except carriage return.
  1084.  [...]    character class, can use ranges such as '0-9'.
  1085.           inside classes. Matches one character of the 
  1086.           enclosed choices. Ex: '[ac0-2]' matches 'a', 
  1087.           'c', '0', '1', or '2'.
  1088.  [^...]   negated character class, matches anything but
  1089.           the enclosed characters. ']' can be included
  1090.           by putting it immediately after the '^'.
  1091.  \t       tab.
  1092.  \r       carriage return or line break.
  1093.  *        zero or more occurrences of the previous
  1094.           pattern. Ex: 'ab*' matches 'a', 'ab', 'abb',
  1095.           'abbb' etc.
  1096.  +        one or more occurrences of the previous 
  1097.           pattern. 
  1098.  ?        zero or one occurrences of the previous 
  1099.           pattern. Ex: 'ab?' matches 'a' or 'ab'.
  1100.  a|b      matches either a or b. If enclosed in
  1101.           parenthesis, the extent of the alternated
  1102.           expressions is limited. Ex: (pete|bob) 
  1103.           matches either 'pete' or 'bob'.
  1104.  (...)    The interior elements are grouped together. 
  1105.  
  1106. Regular expressions constructed from the above elements can be 
  1107. concatenated to create larger expressions. 
  1108.  
  1109. The parenthesis also define substrings of the total matched string that 
  1110. can be used either later during substitution. The substring delimited by 
  1111. the pair of parenthesis that includes the nth left paren is denoted \n, 
  1112. where n is 1, 2, .... 9.  '\0' and '&' both refer to the matched text.
  1113.  
  1114. EXAMPLE: 
  1115. The following regular expression will match either 'aabox' or 'bbbox':
  1116.  
  1117.               (aa|bb)box
  1118.  
  1119. See here for more details.  Regular expressions can be very difficult to 
  1120. master, but they the following section shows how useful they can be.
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.           Searches, Incremental
  1129.  
  1130. Emacs users will be happy that both forward and backward incremental 
  1131. searches are implemented. Incremental searches bypass the normal search 
  1132. dialog and search for the current text after each keystroke. The result is 
  1133. often much faster and less intrusive. Executing either while an incremental 
  1134. search is in progress causes the search to proceed to the next instance of 
  1135. the current text. Incremental search mode is exited when any other command 
  1136. (executed through the menus or through bindings that include at least one of 
  1137. the control key and the option key) is executed, or when the escape or 
  1138. delete key is used. Typing control-w while incremental search is active 
  1139. causes all the characters to the end of the next word boundary to be 
  1140. added to the search.
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.           Tags, 'C'
  1180.  
  1181. ALPHA supports the use of tags to find declarations of functions. When 
  1182. searching for a tag, ALPHA looks for the tag file specified by the 
  1183. "tagFile" string variable. ALPHA's tag generating routines use the regular 
  1184. expression in the string variable "funcExpr" to look for function 
  1185. declarations. In other words, we don't parse the text. If you declare your 
  1186. functions differently, you can change " funcExpr" to suit your own style. 
  1187. Alpha currently uses the following regular expression to find C function 
  1188. declarations:
  1189.  
  1190.               ^[^ \t#\r/@][^\r]*\([^\r]*\)$
  1191.  
  1192. (NOTE: the above expressions won't pick up many C++ method definitions. To 
  1193. pick them up, add a question mark '?' after the last right parenthesis.) 
  1194. Although complicated, this expression makes sense if you slowly wade 
  1195. through it. The string that we are looking for must take up an entire 
  1196. line. It must begin with a character other than '\t', '#', '\r', '/', ' ', 
  1197. or '@'. There must be a set of parenthesis.   
  1198.  
  1199. Note that not only can you customize this to your style of 'C' 
  1200. declarations, you could also use it to generate tags for other languages. 
  1201. The only thing you need to bear in mind is that the tag routines use the 
  1202. complete word previous to the first '(' in the selected line as the 
  1203. function's name. If there is no '(' in the selected line, the last word in 
  1204. the line is used. Therefore, Pascal procedures w/ or w/o parameters can be 
  1205. identified.
  1206.  
  1207. Caveat: Apple's list manager can't handle more than 32k of text in the 
  1208. entire list, so there is a practical limit of 2000 or so tags in your 
  1209. project.
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.           Backups
  1235.  
  1236. If the 'backup' variable is set in preferences files, or from the 
  1237. Utils:Flags menu, Alpha backs up each file before saving new 
  1238. modifications. By default, the backup file is in the same directory, and 
  1239. its name is formed by suffixing a tilde to the name of the saved file. 
  1240. Backups are actually performed in the 'saveHook' proc (see above), in the 
  1241. file procs.tcl. The Tcl variables 'backDir' and 'backExtension' can be 
  1242. used to modify this behavior.
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.           Fill Routines
  1286.  
  1287. The "fill" and "wrap" routines reformat text to specified line lengths. 
  1288. This is useful in two case. First, word processors such as Microsoft Word 
  1289. only insert carriage returns at the end of paragraphs. Secondly, while 
  1290. typing and inserting text into pre-existing paragraphs, the line lengths 
  1291. become unequal. 
  1292.  
  1293. The "wrap" routine handles word processor documents quickly by merely 
  1294. inserting carriage returns as necessary to ensure all lines in the 
  1295. selected region are shorter than specified by the variable 'fillColumn'. 
  1296. Alpha asks the user if wrapping should be done whenever the user opens 
  1297. files that have lines longer than 'paraColumn' characters.
  1298.  
  1299. The TCL routines 'fillRegion' and 'fillParagraph' go further. Not only do 
  1300. they break lines, but they also coalesce lines to eliminate short lines. 
  1301. Both routines work by stripping the relevent text of white space, then 
  1302. re-inserting white space and carriage returns so that no line extends past 
  1303. 'fillColumn' characters in length and begins with 'leftFillColumn' spaces 
  1304. characters. Both routines are implemented in the file 'procs.tcl', and 
  1305. therefore different definitions of paragraphs can be accomodated by 
  1306. modifying the appropriate TCL procedures.
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.           Word Breaking
  1339.  
  1340. Alpha allows you to redefine it's internal notion of what a word is, 
  1341. through the variables 'wordBreak', and 'wordBreakPreface'. 'wordBreak' is 
  1342. set to a regular expression that defines a word to you. 'wordBreakPreface' 
  1343. should be a regular expression that matches exactly one of any characters 
  1344. that are not in your word definition. 
  1345.  
  1346. For instance, the default definition of 'wordBreak' is '[a-zA-Z0-9_]+'. 
  1347. This matches any contiguous sequence of contiguous alphanumeric 
  1348. characters, plus underscore.
  1349.  
  1350. The default value for wordBreakPreface is '[^a-zA-Z0-9_]', basically just 
  1351. the negation of any any of the characters in your 'wordBreak' definition. 
  1352.  
  1353. The need for both these variables in backward searches can be seen as 
  1354. follows. Suppose your window's text is "hey hello", and the current 
  1355. insertion is between the two 'l's. Now, searching backwards for the above 
  1356. 'wordBreak' definition will take the insertion to between the 'e' and the 
  1357. first 'l', not really where we want to say is the start of the word. By 
  1358. contrast, if we search backwards for 'wordBreak' and 'wordBreakPreface' 
  1359. concatenated together, and then move forward one character after a 
  1360. successful search, we end up right before the 'h' in 'hello', just where 
  1361. we want to be.
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.           File Sets
  1393.  
  1394. File Sets are lists of files that Alpha uses for multiple-file searches and 
  1395. tag searches, among other things.  Typically, a user will set up several 
  1396. different file sets, perhaps one specifying all the source files in a 
  1397. project, another specifying all the Mac include files, and another 
  1398. specifying all the UNIX include files.  When a command using file sets is 
  1399. initiated, Alpha evaluates the command "getCurrFileSet", which returns a 
  1400. list of complete pathnames to search.
  1401.  
  1402. Functions that use file sets operate on the "current" fileset, which is 
  1403. specified by the 'fileSet' variable. The current file set can also be 
  1404. switched by using  the "File Set" heirarchical menu. 
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.           Macros, Keyboard
  1444.  
  1445. Defining and Using Keyboard Macros ALPHA supports keyboard macros which 
  1446. record a sequence of keystrokes to be played back later w/ the function 
  1447. 'executeKeyboardMacro' (this function is also in the 'Utilities' menu) or 
  1448. written into a buffer by selecting 'Dump Macro' from the 'Utilities' menu. 
  1449. The dump function prompts you for a macro name, which must consist only of 
  1450. letters of the alphabet, digits, and '_'. 
  1451.  
  1452. These macro declarations can then be edited, loaded, and bound to 
  1453. keystrokes. Loading a macro or a binding is accomplished by hiliting the 
  1454. text and selecting the "Load Selection" item of the 'Customize' window. If 
  1455. no text is hilited, the entire window is loaded by the same command. 
  1456. Macros can be bound to keys in exactly the same manner as functions (see 
  1457. above). 
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.           Undo + Redo
  1498.  
  1499. ALPHA supports unlimited undo and redo. This means that most changes can 
  1500. be undone, and then redone, at will. Bear in mind that once you create new 
  1501. modifications, all changes that you have undone but not redone are lost. 
  1502. Another point to bear in mind is that saving a buffer to disk currently 
  1503. flushes the undo buffer. 
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.           THINK and Alpha
  1549.  
  1550. Yes! Finally Think has support for external editors (7.0 or better).  To 
  1551. make this work, put an alias of Alpha in the "Tools" subdirectory of the 
  1552. directory the project manager is in, and name the alias "Editor".  
  1553. Secondly, check the "Use External Editor" button in the project manager's 
  1554. option dialog.  You do not have to check the "Always Check File Dates" 
  1555. button.
  1556.  
  1557. Any open window events will now be vectored to Alpha, and from within 
  1558. Alpha you can initiate compiles, disassembles, makes, etc. Errors are 
  1559. reported back to Alpha.
  1560.  
  1561. Look in :Tcl:SystemCode:"think.tcl" for the code controlling much of the 
  1562. interactions between THINK and Alpha.  If you improve anything, please send 
  1563. it back to me.
  1564.  
  1565. If a window contains a file that is part of the a project that is 
  1566. currently open in the Think Project Manager, selecting "Open Header" from 
  1567. the Think menu will put up a list of include files. The same files can be 
  1568. accessed by option-clicking on the window's title-bar.
  1569.  
  1570. A fileset consisting of the source to a think project can be created 
  1571. through the "File:File Sets" menu.
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.           Rectangular Editing
  1602.  
  1603. If the option key is pressed while the mouse is dragged,  a rectangular 
  1604. section of text is selected instead of the normal selection. This 
  1605. rectangular selection may extend over multiple lines, but contains only 
  1606. text between the column of the drag start and the column of the drag end. 
  1607. The drag cannot end on a column or row less than the start. This selection 
  1608. can be extended by option-shift-mouse, but not dragged further.
  1609.  
  1610. The rectangular selection can be deleted, copied, and pasted. This is very 
  1611. useful for tables and arrays, such as in LaTeX. Usually, the operation 
  1612. will be intuitive. However, if you use proportional fonts the selection 
  1613. may appear ragged. If some of the line contain tabs, the result may not be 
  1614. want you want. Converting tabs to spaces in the desired region before 
  1615. attempting rectangular selection usually fixes the problems. 
  1616.  
  1617. The most natural semantics of rectangular selection aren't obvious. I 
  1618. chose to implement it in a similar fashion to that of Microsoft Word. 
  1619. Preditor does it in another way, and has many bugs (and it's  commercial, 
  1620. hah!).
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.           LaTeX
  1655.  
  1656. See the "LaTeX Help" file under the help menu.
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.           Option Key
  1706.  
  1707. Several option combinations are "dead keys" (option-e, option-o....), they 
  1708. are used to create bizarre (sorry to y'all non-Amuricans) characters through
  1709. multiple keystrokes. 
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.           System Software 7.0
  1756.  
  1757. Alpha is 32-bit clean and high-level event aware. 
  1758.  
  1759. Under 7.0, Alpha uses temporary memory to accommodate large files. This 
  1760. allows you to open multi-megabyte files even when Alpha's partition is set 
  1761. only at 512k, if the system has that much memory available. Note that 
  1762. using temporary memory makes that much memory unavailable to other 
  1763. applications. Contrary to all admonishments, Alpha does not unlock 
  1764. temporary memory across WaitNextEvent calls and may eventually use all the 
  1765. memory in your system. You can turn this feature off through 'tempMem'.
  1766.  
  1767. Note, however, that the clipboard is allocated by the system in Alpha's 
  1768. heap, and therefore cannot take advantage of temporary memory.
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.           Apple Events
  1807.  
  1808. See the Help file on AppleEvents.
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.           MPW
  1859.  
  1860. Alpha's 'dosc' capability (see the function "dosc") can be used to send 
  1861. events to MPW's ToolServer. Using about ten lines of C code and the ~40 
  1862. lines of Tcl code in 'mpw.tcl', I created a pseudo mpw shell (look under 
  1863. the "Misc" menu). This shell uses Alpha's 'dosc' function to package each 
  1864. shell command up into an Apple Event and send it to the ToolServer, which 
  1865. then evaluates the command and returns the result to be displayed in the 
  1866. shell. I'm rather new to Apple Events and the ToolServer, so there are 
  1867. probably a few rough edges. 
  1868.  
  1869. If anyone has extensive docs for ToolServer I'd appreciate looking at them. 
  1870. I only have the application because I am a beta tester for another product 
  1871. that supports ToolServer. I was given the application for the beta testing, 
  1872. but not any docs. And of course, I can *not* give away copies of 
  1873. ToolServer because it is a licensed Apple product.
  1874.  
  1875. Finally, Tom Moertel (thor@vivaldi.psu.edu) has written and provided a set 
  1876. of tools that make life easier while writing code in Alpha for the MPW 
  1877. environment. The tools make extensive use of Apple Events, so you must be 
  1878. using MPW 3.3a or greater. (Earlier versions cannot receive commands via 
  1879. Apple Events.) 
  1880.  
  1881.   With the MPW-Alpha package you can:
  1882.   
  1883.     o  Send TCL commands to Alpha from MPW
  1884.     o  Use MPW 411 from Alpha for instant access to programming help
  1885.     o  Automagically locate source code errors from your last MPW compile
  1886.     o  Use the MPW CDent tool to reformat (grind) C/C++ source code
  1887.        from within Alpha
  1888.  
  1889. This package is available via anonymous ftp from cs.umd.edu.
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.           File Formats
  1910.  
  1911. Alpha reads and writes files stored in three (or maybe four) different 
  1912. formats. The three main formats are mac (lines end with a carriage 
  1913. return), unix (lines end with linefeed), and IBM pc (lines end with both 
  1914. carriage return and linefeed. Typical, isn't it?).
  1915.  
  1916. Alpha will transparently read and write all three of these formats. You 
  1917. don't have to do anything special to use different formats, but the 
  1918. 'SaveAs...' dialog allows you to specify the format that a file is written 
  1919. in through the 'Format' button.
  1920.  
  1921. The fourth file format is just a modification of the ordinary mac format. 
  1922. Word processors such as Microsoft Word and MacWrite only put carriage 
  1923. returns at the end of paragraphs, so that they can wrap  the paragraphs on 
  1924. the fly. This is what is referred to as 'paragraph format' in the rest of 
  1925. the help text. Alpha does not transparently convert to and from this 
  1926. format because there are valid reasons why someone might want to edit a 
  1927. paragraph formatted file while not in paragraph mode. 
  1928.  
  1929. Therefore, when Alpha detects reads a paragraph-mode file, it asks the 
  1930. user whether or not to remap it. Files can be mapped back to paragraph 
  1931. mode by setting 'fillColumn' to a very large number and executing 
  1932. 'fillRegion' on the text.
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.           Printing
  1960.  
  1961. Version 6.0 and above have many printing options available. Printing is 
  1962. accomplished via a submenu under the File menu. The menus allows printing 
  1963. either via Alpha or several other applications.
  1964.  
  1965. If printing through alpha, the variables 'printHeader', 'printHeaderTime', 
  1966. and 'printHeaderFullPath' control whether and what type of header is 
  1967. printed at the top of each page.  These flags are actually used in the proc 
  1968. printHeaderProc to create the string that appears on the left side of the 
  1969. top of the page.  'leftMargin', 'topMargin', and 'bottomMargin' control 
  1970. margins on the printed page.
  1971.  
  1972. 'printerFont' and 'printerFontSize' allows the size and type of the 
  1973. printed font to be specified.
  1974.  
  1975. The external apps that Alpha is currently configured to use are 
  1976. "Enscriptor", an app that allows multi-column and other options, "Kodex", 
  1977. a "C" pretty printer, and "DropÑPS", which prints postscript files. All 
  1978. options operate on the frontmost window. These applications are not 
  1979. supplied w/ Alpha, but can be downloaded from any comprehensive mac site. 
  1980. They can also be downloaded from Alpha's home site. "Enscriptor" and 
  1981. "Kodex" are shareware apps written by John Cho. "DropÑPS" is a freeware 
  1982. app written by some evil commercial text editor guru.
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.           Random Tips
  2026.  
  2027. - When a window is "dirty" (has unsaved changes), a
  2028.   red disk icon appears just below the titlebar in the
  2029.   upper right corner of the window, and a diamond 
  2030.   appears next to the corresponding item in the Windows
  2031.   menu. 
  2032.  
  2033. - All dialogs that have editable text can use the Cut, 
  2034.   Copy, and Paste menu command equivalents.
  2035.  
  2036. - In all dialogs, non-editable controls can be selected 
  2037.   by typing Command-<first char of control>. If there 
  2038.   are no editable controls in the dialog, simply typing 
  2039.   the first letter of the desired control suffices. PgUp,
  2040.   PgDown, Home, and End keys now work for most list dialogs.
  2041.  
  2042. - Set the flag 'undoOn' to 0 in order to speed up long 
  2043.   replace-all and macro modifications.
  2044.  
  2045. - After a piece of text has been yank'd or paste'd, the 
  2046.   'mark' is set to the beginning of the new text and the
  2047.   selection is at the end. 'markHilite' will now hilite 
  2048.   the entire insertion. This is especially useful when
  2049.   moving code. Cut the code, insert at a new position,
  2050.   select the inserted text by selecting "Edit:Hilite", and 
  2051.   then use "Edit:Shift Left" and "Edit: Shift Right" to move
  2052.   the text to the proper indentation.
  2053.  
  2054. - Most help files have marks in them, which let you quickly
  2055.   navigate to places of interest. You can access these marks
  2056.   by command-clicking on the title-bar or on the "{}" icon
  2057.   above the vertical scrollbar.
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.           Variables 
  2079.  
  2080. There are two different kinds of variables in the Alpha world: global 
  2081. vars and mode vars. Mode vars can have different values in each mode, and 
  2082. are modified by the "Mode Vars" popup menu via the American flag just 
  2083. above vertical scrollbar. Changing one of these variables changes the 
  2084. variable's value for all windows of the current mode.
  2085.  
  2086. Global variables are accessed via the "Mode:Flags" and "Mode:Vars" menus. 
  2087. Changing one of these variables affects all windows.
  2088.  
  2089. Alpha records which variables are modified in the course of a session and 
  2090. prompts the user to save them prior to quitting.
  2091.  
  2092.  
  2093. Mode Vars
  2094.  
  2095. autoMark       Ñ Automatically mark windows on open if they don't have marks.
  2096. elecLBrace     Ñ Electric 'C' left brace on.
  2097. elecRBrace     Ñ Electric 'C' right brace on.
  2098. electricSemi   Ñ Electric 'C' semicolon on.
  2099. fillColumn     Ñ Number of columns use as limit for
  2100.                  "fill" routines. See 'leftFillColumn'
  2101. funcExpr       Ñ Set to the regular expression that 
  2102.                  ALPHA uses to find function 
  2103.                  declarations.
  2104. leftFillColumn Ñ Number of blanks left at beginning of 
  2105.                  lines by 'fill' routines. 
  2106. wordBreak       Ñ Regular expression used to defines words for all internal 
  2107.                  operations. 
  2108. wordBreakPreface Ñ Prepended to 'wordBreak' when looking backwards for a 
  2109.                  word. See the "Word Break" section of this file for more 
  2110.                  information.
  2111. wordWrap       Ñ if true, lines exceeding 'fillColumn'
  2112.                  in length are automatically wrapped
  2113.                  during normal text insertion (typing)
  2114. wrapBreak       Ñ Reg expr used for automatic word wrapping.
  2115. wrapBreakPreface Ñ Reg expr used for automatic word wrapping.
  2116. Global Vars
  2117. autoHScroll       Ñ Automatically scroll horizontal scrollbar
  2118.                  to follow insertion.
  2119. autoSave       Ñ If TRUE, buffers (except untitled buffers) are automatically
  2120.                  saved every 'changesLim' changes.
  2121. backDir           Ñ Directory in which to store backup files.
  2122. backExtension  Ñ Suffix to append to backup files.
  2123. backup         Ñ if TRUE, the default Tcl proc 'saveHook' makes a backup 
  2124.                  of a file before the data is written. The default backup
  2125.                  scheme has extension "~".
  2126. blinkCursor    Ñ Cursor blinks
  2127. blockCursor    Ñ if true, Alpha uses a block cursor instead of a vertical 
  2128.                  line. 
  2129. bottomMargin   Ñ Bottom print margin.
  2130. bwWindows      Ñ if true, Alpha will use 1-bit windows
  2131.                  even if color is available. This speeds
  2132.                  refresh quite a bit on slow color 
  2133.                  machines such as the IIsi.
  2134. changesLim     Ñ number of changes to a window before 
  2135.                  garbage collection or autosave is done.
  2136. coloring       Ñ enable keyword coloring.
  2137. def{Height,Left,Top,Width} Ñ If 'fullScreen' set, default size
  2138.                  of windows.
  2139. defaultFont    Ñ font to use on new windows and files 
  2140.                  which don't have associated font 
  2141.                  specification resources.
  2142. diffFlags       Ñ Command line args to pass to GNU diff.
  2143. dragAndDrop       Ñ Enable drag and drop.
  2144. fontSaving     Ñ if '-1', Alpha never saves font info,
  2145.                  if '1', Alpha always saves font info,
  2146.                  '0', Alpha saves font info if the font
  2147.                  or size is different than the default.
  2148. fontSize       Ñ Default size of fonts used to display 
  2149.                  files.
  2150. forceMainScreenÑ If true, forces windows to main screen. Useful if you 
  2151.                  have a small screen and windows habitually are too large.
  2152. fullNames      Ñ Windows display pathnames instead of 
  2153.                  mere file names.
  2154. fullScreen     Ñ If on, all windows are start in the 
  2155.                  same place, and have the dimension 
  2156.                  specified by 'defHeight' and 
  2157.                  'defWidth'.
  2158. horScrollBar   Ñ If set, use horizontal scrollbar.
  2159. iconifyOnSwitchÑ Iconify all windows when suspending.
  2160. indentOnCR     Ñ Auto-indent on carriage return.
  2161. infoWindowsDirtyÑ Dirty/Clean state of description windows.
  2162. intelCutPaste  Ñ Enable intelligent cut and paste.
  2163. lockStatus       Ñ Disable status window dragging.
  2164. maskCapsLock   Ñ Mask caps lock bit on key depresses.
  2165. moveInsertion  Ñ if true, 'pageBack' and 'pageForward'
  2166.                  move the insertion point
  2167. numWinsToTile  Ñ specifies the number of windows tile
  2168.                  commands should affect.
  2169. paraColumn     Ñ Alpha automatically wraps files
  2170.                 that contains lines longer than this. 
  2171. posActivate    Ñ If true, then merely moving the mouse
  2172.                  over a window activates. For those
  2173.                  X11-twm lovers.
  2174. powerThumb       Ñ If true, vertical scrollbars have power thumbs.
  2175. printerFont       Ñ Font to print documents.
  2176. printerFontSizeÑ Size to print documents.
  2177. projectorAware Ñ Respect projector resources.
  2178. savedState       Ñ set to either "mpw", "think", or "none" depending on how 
  2179.                  much information you wish Alpha to save in the resource 
  2180.                  fork of the files you edit. See the "Files" section of 
  2181.                  this file for more information.
  2182. showInvisibles Ñ Show spaces, tabs, crs.
  2183. showMode       Ñ Display current mode in status window.
  2184. showPlatform   Ñ Display Mac/IBM/Unix for current window.
  2185. showRowCol     Ñ if set, row and col are continuously
  2186.                  displayed in the title bar. 
  2187. sortColumn     Ñ column to use for sort routine.
  2188. sortedIsDefaultÑ if set, sorted is the default for 
  2189.                  function and section menus.
  2190. suppressHeader Ñ Suppress header on printed pages.
  2191. tagFile        Ñ complete path-name of tag file
  2192. tile{Height,Left,Top,Width} Ñ rectangle to tile windows
  2193.                  within.
  2194. tempMem        Ñ Enable use of system temporary memory.
  2195. undoOn         Ñ used to turn undo on and off. When undo
  2196.                  is turned off, all undo info is lost.
  2197.                  Useful when doing global replaces, etc.
  2198.  
  2199.  
  2200.  
  2201.           Spellchecking
  2202.  
  2203. Alpha has the capability to interact with the spell-check 'Excalibur', 
  2204. written by Robert Gottshall and Rick Zaccone.  The menu item 'Spellcheck 
  2205. Window' is always available in the "Utils" menu.  Selecting this item will 
  2206. start up Excalibur and send an OpenDoc event describing the current window.  
  2207. For version 1.4 and earlier, if Alpha has to launch Excalibur you will need 
  2208. to dismiss Excalibur's opening dialog by hitting the Cancel button.  
  2209. Subsequent selections of the menu item will switch right into Excalibur 
  2210. with the correct file displayed.  In future versions, this will become even 
  2211. more automatic.
  2212.  
  2213. Excalibur is free, but not in the public domain.  It can be obtained from 
  2214. all the usual Internet ftp sites, as well as cs.umd.edu under 
  2215. pub/faculty/keleher/Alpha.
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.           International Users
  2253.  
  2254. Everything should work. If it doesn't, please tell me.
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.           Drag and Drop
  2304.  
  2305. Alpha supports drag and drop cut, copy, clear, and paste. To use this 
  2306. feature, select some text, then move the cursor over the selected text. 
  2307. The cursor should then turn into an open hand. Mouse down, and move the 
  2308. cursor to the place you wish to paste the text. When the mouse is 
  2309. released, the hilited text is moved to the new location.
  2310.  
  2311. Option-mouse does a "copy" instead. You can also drag selections between 
  2312. windows and to and from other applications, including the finder. Text 
  2313. can be deleted by dragging it to the trash can. 
  2314.  
  2315. You MUST have Apple's "Macintosh Drag And Drop" installed.
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.           Status Bar
  2354.  
  2355. The stripe across the bottom of the screen is a floating window that 
  2356. displays status information, certain prompts (option-x, and see the func 
  2357. 'statusPrompt'), and the current row and column.
  2358.  
  2359. You can't make this window go away. However, both 'sizeWin' and 'moveWin' 
  2360. accept "StatusWin" as a window specification and will act on this window, 
  2361. so you can move the window offscreen if you really wish. The height
  2362. parameter to 'sizeWin' is ignored.
  2363.  
  2364. The status bar can be dragged if the flag 'lockStatus' is turned off.
  2365.  
  2366. Clicking over the row and column indicators allows you to jump to a 
  2367. particular line.
  2368.  
  2369. Finally, if you turn horizontal scrollbars off (via the 'horScrollBar' 
  2370. flag in the "Mode:Flags" menu, you haven't lost any real estate. 
  2371. Furthermore, when tiling windows vertically, you actually have *more* 
  2372. real estate. 
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.  
  2387.  
  2388.  
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.           Modes
  2407.  
  2408. Each window in Alpha is always in a single "mode", such as the "C++" 
  2409. mode, or the "TeX" mode. A mode describes bindings and variable values 
  2410. particular to that mode. By default, the mode of the frontmost window is 
  2411. displayed on the status bar, and can be changed by the Mode Menu, which 
  2412. is accessed via the second icon above the vertical scroll bar in each 
  2413. window.
  2414.  
  2415. Alpha sets modes for new windows based on file name suffixes.  For instance, 
  2416. "files.c" is started up in mode "C" because of the ".c" suffix.  Below 
  2417. are the standard suffixes recognized by Alpha. You can add more suffixes 
  2418. in your prefs.tcl file by duplicating the lines adding these suffixes 
  2419. in :Tcl:SystemCode:modes.tcl. The default mode is "Text".
  2420.  
  2421.     .h, .c, .r                        C
  2422.     .cc, .cp, .cpp, .CPP, .C        C++
  2423.     .f .fcm .for .FOR                Fort
  2424.     .tcl                            Tcl
  2425.     .tex, .sty, .ltx, .dtx, .ins    TeX
  2426.     .pl                                Perl
  2427.     .html .HTML                        HTML
  2428.     
  2429. Bindings for a specific mode can be specified by passing the desired mode 
  2430. as the last argument to a 'bind' command (see "Key Bindings"). 
  2431.  
  2432. Alpha has two different types of immediately visible flags and variables. 
  2433. "Global" variables don't change from mode to mode. These are listed in 
  2434. "Modes:Flags" and "Modes:Vars". Any change there affects 
  2435. every mode.
  2436.  
  2437. "Mode" flags and variables are instantiated separately for each mode.  
  2438. These are inspected and set via the "Mode Vars" popup menu, called by 
  2439. clicking on the flag icon above the vertical scrollbar. Changing these 
  2440. values affects every window in that mode, but doesn't affect windows
  2441. in other modes.
  2442.  
  2443. The variables displayed in the "Mode Vars" popup menu are all the variables 
  2444. that the current mode cares about.  The "Set Mode Menus╔" item allows you 
  2445. to specify which of the extra menus should be present whenever the 
  2446. frontmost window is in that mode.  Select multiple menus by shift-clicking.
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.           File Comparison
  2457.  
  2458. Version 5.94 and above can create UNIX "diffs" of two text files. Among 
  2459. other things, diffs allow you to easily pinpoint what has changed between 
  2460. two different versions of the same file. 
  2461.  
  2462. Alpha's interface (under the "Utils" menu) allows you to compare either 
  2463. the two topmost windows, or two arbitrary files (later, Alpha will be 
  2464. able to compare entire directories). Alpha opens the two files in windows 
  2465. at the top of the screen with the diff file at the bottom. You can 
  2466. navigate between individual differences in the diff file by using the Up 
  2467. and Down arrows. Pressing either a carriage return or the Enter key 
  2468. displays the affected portions of the two files in the above windows.
  2469.  
  2470. I'm currently using a hack of QUED's GNU diff port.  My hack allows 
  2471. it to work as an AppleEvent server.  However, it handles most errors by 
  2472. quitting without responding, and handles only a single message before 
  2473. quitting. It also doesn't deal with directories. 
  2474.  
  2475. The interface is a 'dosc' script event containing the command-line 
  2476. arguments that would be used in running 'diff' from a UNIX shell (see 
  2477. here).  The result is the diff.  On the command line, file names containing 
  2478. spaces can be specified by delimiting the entire file name with double 
  2479. quotes.  The source for my version of the diff application (crude though it 
  2480. is), is available in pub/faculty/keleher/Alpha on cs.umd.edu.
  2481.  
  2482. Bugs: The files must have line Mac terminations.
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.           HyperText
  2494.  
  2495. Alpha's hypertext is both more and less powerful than systems that use 
  2496. markup languages such as HTML. It's more powerful because the action 
  2497. taken upon hitting a hypertext link is any arbitrary Tcl script rather 
  2498. than just navigation. It's less powerful because the generality doesn't 
  2499. allow a standard notion of going "back" or "forward". In any case, two 
  2500. points:
  2501.     1) The hypertext is only intended for Alpha documentation, and links 
  2502.     should not need to be created by anyone who isn't writing docs.
  2503.     
  2504.     2) The whole thing is basically an answer looking for a problem. 
  2505.     Existing code made adding the whole thing the work of an hour and a half 
  2506.     and I couldn't resist. Much more fun that looking for bugs or creating 
  2507.     more documentation. 
  2508.     
  2509. If you *must* create hypertext links, use the insertColorEscape command.
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.           Limitations
  2550.  
  2551. - Apple's listproc seems to have a total size limit of 32k characters. 
  2552.   This effectively limits tag searches to about 4000 function names.
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.           Preferences
  2604.  
  2605. Alpha saves settings between sessions by writing them to files in an 
  2606. "Alpha" sub-folder of the system preferences folder.  Additionally, Alpha 
  2607. will source a file called "prefs.tcl" from this sub-folder if it exists.  
  2608. You can view or remove the settings currently being saved there at any time 
  2609. via the "View/Remove Saved Settings╔" from the Edit menu. You can edit 
  2610. the prefs.tcl file via the "Edit prefs.tcl" item. 
  2611.  
  2612. Never add manually add text to the defs.tcl or arrdefs.tcl files in the 
  2613. preferences folder. These files are automatically generated and read by 
  2614. the addDef etc. functions. If you need to save variable definition from 
  2615. Tcl code, addDef etc. is your friend. 
  2616.  
  2617. If you want to have arbitary code executed on startup, you can manually 
  2618. place this in the prefs.tcl file.
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.