home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8707 / 2 < prev    next >
Encoding:
Internet Message Format  |  1990-07-13  |  45.1 KB

  1. From: paul@cgh.UUCP (Paul Homchick)
  2. Newsgroups: comp.sources.misc
  3. Subject: MicroEMACS 3.8i Documentation (Scribe format) 2 of 2
  4. Message-ID: <2762@ncoast.UUCP>
  5. Date: 3 Jul 87 00:09:08 GMT
  6. Sender: allbery@ncoast.UUCP
  7. Lines: 1298
  8. Approved: allbery@ncoast.UUCP
  9. X-Archive: comp.sources.misc/8707/2
  10.  
  11. MicroEmacs 3.8i Documentation in MicroSCRIBE format.
  12.               +++ Part Two of Two +++
  13. (Differs from the original uEmacs distribution by fixing some spelling
  14.  errors and formattating problems)
  15. -----snip-----snip-----snip-----snip-----snip-----snip-----snip-----snip-----
  16. @chapter(Screen Formatting)
  17.  
  18. @section<Wrapping Text>
  19.  
  20. As we learned in the introduction, EMACS is not a word processor, but an
  21. editor.  Some simple formatting options are available however, although
  22. in most cases they will not affect the appearance of the finished text
  23. @index(wrapping text) when it is run through the formatter.  We have
  24. already encountered WRAP mode which wraps lines longer than a certain
  25. length (default is 75 characters).  You will recall that WRAP is enabled
  26. by entering @b{^X-M} and responding to the command line prompt with
  27. @b{wrap}. 
  28.  
  29. You can also set your own wrap margin with the command @b{^X-F}
  30. @i(set-fill-column) @index(set-fill-column).  Notice EMACS responds
  31. "[Fill column is 1]." Now try typing some text.  You'll notice some very
  32. strange things happening -- your text wraps at every word!! This effect
  33. occurs because the set wrap margin command must be preceded by a
  34. numeric argument or EMACS sets it to the first column.  Thus any text
  35. you type that extends past the first column will wrap at the most
  36. convenient line break. 
  37.  
  38. To reset the wrap column to 72 characters, press the @b{<META>} key and
  39. enter 72.  EMACS will respond "Arg: 72".  Now press @b<^X-F>.  EMACS
  40. will respond "[Fill column is 72]".  Your text will again wrap at the
  41. margin you've been using up to this point.
  42.  
  43. @section<Reformatting Paragraphs>
  44.  
  45. After an intensive editing session, you may find that you have
  46. paragraphs containing lines of differing lengths.  Although this
  47. disparity will not affect the formatted text, aesthetic and technical
  48. concerns may make it desirable to have consistent paragraph blocks on
  49. the screen.  If you are in WRAP mode, you can reformat a paragraph with
  50. the command @b{M-Q} @i(fill-paragraph) @index(fill-paragraph).  This
  51. command 'fills' the current paragraph reformatting it so all the lines
  52. are filled and wrap logically.  The process is complex, and (especially
  53. with longer paragraphs) may take a little time. 
  54.  
  55. @section<Changing Case>
  56.  
  57. There may be occasions when you find it necessary to change the case of
  58. the text you've entered.  EMACS allows you to change the case of even
  59. large amounts of text with ease.  Let's try and convert a few of the
  60. office traditionalists to the joy of word processing.  Type in the
  61. following text:
  62.  
  63. @quotation{Throw away your typewriter and learn to use a word processor. 
  64. Word processing is relatively easy to learn and will increase your
  65. productivity enormously.  Enter the Computer Age and find out just how
  66. much fun it can be!!}
  67.  
  68. Let's give it a little more impact by capitalizing the first four words. 
  69. The first step is to define the region of text just as you would if you
  70. were doing an extensive deletion.  Set the mark at the beginning of the
  71. paragraph with @b{M-<space>} @i(set-mark) and move the cursor to the
  72. space beyond "typewriter." Now enter @b{^X-^U} @i(case-region-upper). 
  73. Your text should now look like this:
  74.  
  75. @quotation{THROW AWAY YOUR TYPEWRITER and learn to use a word processor. 
  76. Word processing is relatively easy to learn and will increase your
  77. productivity enormously.  Enter the Computer Age and find out just how
  78. much fun it can be!!}
  79.  
  80. If you want to change the text back to lower case, type @b{^X-^L}
  81. @i(case-region-lower) @index(case-region-lower).  You can also
  82. capitalize individual words.  To capitalize the word "fun", position the
  83. cursor in front of the word and type @b{M-U} @i(case-word-upper)
  84. @index(case-word-upper).  The word is now capitalized.  To change it
  85. back to lower case, move the cursor back to the beginning of the word
  86. and type @b{M-L} @i(case-word-lower) @index(case-word-lower). 
  87.  
  88. You may also capitalize individual letters in EMACS.  The command
  89. @b{M-C} @i(case-word-capitalize) @index(case-word-capitalize)
  90. capitalizes the first letter after the point.  This command would
  91. normally be issued with the cursor positioned in front of the first
  92. letter of the word you wish to capitalize.  If you issue it in the
  93. middle of a word, you can end up with some strAnge looking text. 
  94.  
  95. @section<Tabs>
  96.  
  97. Unless your formatter is instructed to take screen text literally (as
  98. MicroSCRIBE does in the 'verbatim' environment for example), tabs in
  99. EMACS generally affect screen formatting only. 
  100.  
  101. When EMACS is first started, it sets the default tab to every eighth
  102. column.  As long as you stay with default, every time you press the tab
  103. key a tab character, @b(^I) is inserted.  This character, like other
  104. control characters, is invisible -- but it makes a subtle and
  105. significant difference to your file and editing. 
  106.  
  107. For example, in default mode, press the tab key and then type the word
  108. @b{Test}.  "Test" appears at the eighth column.  Move your cursor to the
  109. beginning of the word and delete the backward character.  The word
  110. doesn't move back just one character, but flushes to the left margin. 
  111. The reason for this behavior is easily explained.  In tab default, EMACS
  112. inserts a 'real' tab character when you press the tab key.  This
  113. character is inserted at the default position, but NO SPACES are
  114. inserted between the tab character and the margin (or previous tab
  115. character).  As you will recall, EMACS only recognizes characters (such
  116. as spaces or letters) and thus when the tab character is removed, the
  117. text beyond the tab is flushed back to the margin or previous tab mark.
  118.  
  119. This situation changes if you alter the default configuration.  The
  120. default value may be changed by entering a numeric argument before
  121. pressing the tab key.  As we saw earlier, pressing the @b{META} key and
  122. entering a number allows you to specify how EMACS performs a given
  123. action.  In this case, let's specify an argument of 10 and hit the tab
  124. key. 
  125.  
  126. Now hit the tab key again and type @b{Test}.  Notice the word now
  127. appears at the tenth column.  Now move to the beginning of the word and
  128. delete the backward character.    "Test" moves back by one character. 
  129.  
  130. EMACS behaves differently in these circumstances because the @b(^I)
  131. @index(tab handling) @i(handle-tab) @index(handle-tab) function deals
  132. with tabbing in two distinct ways.  In default conditions, or if the
  133. numeric argument of zero is used, @i(handle-tab) inserts a true tab
  134. character.  If, however, a non-zero numeric argument is specified,
  135. @i(handle-tab) inserts the correct number of spaces needed to position
  136. the cursor at the next specified tab position.  It does NOT insert the
  137. single tab character and hence any editing functions should take account
  138. of the number of spaces between tabbed columns. 
  139.  
  140. Many times you would like to take a line which has been created using
  141. the tab character and change it to use just spaces.  The command
  142. @b(^X-^D) @i(detab-line) @index(detab-line) changes any tabs from the
  143. point to the end of the current line into the right number of spaces so
  144. the line does not change.  This is very useful for times when the file
  145. must be printed or transferred to a machine which does not understand
  146. tabs. 
  147.  
  148. Also, the inverse command, @b(^X-^E) @i(entab-lines) @index(entab-lines)
  149. changes multiple spaces to tabs where possible.  This is a good way to
  150. shrink the size of large documents, especially with data tables.  Both
  151. of these commands can take a numeric argument which will be interpreted
  152. as the number of lines to en/detab. 
  153. @newpage
  154. @heading(Chapter @value(chapter) Summary)
  155.  
  156. In Chapter @value(chapter) introduced some of the formatting features of
  157. EMACS. Text-wrap, paragraph reformatting, and tabs were discussed in
  158. some detail.  The commands in the following table were covered in the
  159. chapter. 
  160.  
  161. @begin{verbatim}
  162.  
  163. @u(Key Binding        Keystroke            Effect)
  164. Add-Mode/WRAP        @b{^X-M}[WRAP]    Add wrap mode to current buffer
  165.  
  166. Delete-Mode/WRAP    @b{^X-^M}[WRAP]    Remove wrap mode from current buffer
  167.  
  168. Set-Fill-Column        @b{^X-F}     Set fill column to given numeric
  169.                     argument  
  170.  
  171. Fill-Paragraph        @b{M-Q}        Logically reformats the current
  172.                     paragraph
  173.  
  174. Case-Word-Upper     @b{M-U}        Text from point to end of the
  175.                     current word is changed to uppercase
  176.  
  177. Case-Word-Lower     @b{M-L}        Text from point to end of the 
  178.                     current word is changed to lowercase
  179.  
  180. Case-Word-Capitalize    @b{M-C}        First word (or letter) after the
  181.                     point is capitalized
  182.  
  183. Case-Region-Upper    @b{^X-^U}    The current region is uppercased
  184.  
  185. Case-Region-Lower    @b{^X-^L}    The current region is lowercased
  186.  
  187. Handle-Tab        @b{^I}        Tab interval is set to the given
  188.                     numeric argument
  189. Entab-Line        @b(^X-^E)    Changes multiple spaces to tabs
  190.                     characters where possible
  191. Detab-Line        @b(^X-^D)    Changes tab characters to the
  192.                     appropriate number of spaces
  193. @end{verbatim}
  194. @chapter(Keyboard Macros)
  195.  
  196. In many applications, it may be necessary to repeat a series of
  197. characters or commands frequently.  For example, a paper may require the
  198. frequent repetition of a complex formula or a long name.  You may also
  199. have a series of EMACS commands that you invoke frequently.  Keyboard
  200. macros offer a convenient method of recording and repeating these
  201. commands. 
  202.  
  203. Imagine, for example, you are writing a scholarly paper on @i{Asplenium
  204. platyneuron}, the spleenwort fern.  Even the dedicated botanist would
  205. probably find it a task bordering on the agonizing to type
  206. @i{Asplenium platyneuron} frequently throughout the paper.  An
  207. alternative method is 'record' the name in a keyboard macro.  Try it
  208. yourself.
  209.  
  210. The command @b{^X-(} @i(begin-macro) @index(begin-macro) starts
  211. recording the all the keystrokes and commands you input.  After you've
  212. typed it, enter @b{Asplenium platyneuron}.  To stop recording, type
  213. @b{^X-)} @i(end-macro) @index(end-macro).  EMACS has stored all the
  214. keystrokes between the two commands.  To repeat the name you've stored,
  215. just enter @b{^X-E} @i(execute-macro) @index(execute-macro), and the
  216. name "Asplenium platyneuron" appears.  You can repeat this action as
  217. often as you want, and of course as with any EMACS command, you may
  218. precede it with a numerical argument. 
  219.  
  220. Because EMACS records keystrokes, you may freely intermix commands and
  221. text.  Unfortunately, you can only store one macro at a time.  Thus, if
  222. you begin to record another macro, the previously defined macro is
  223. lost. Be careful to ensure that you've finished with one macro before
  224. defining another.  If you have a series of commands that you would like
  225. to 'record' for future use, use the macro or procedure facilities
  226. detailed in chapter <X>.
  227. @newpage
  228. @heading(Chapter @value(chapter) Summary)
  229.  
  230. Chapter @value(chapter) covered keyboard macros.  You learned how to
  231. record keystrokes and how to repeat the stored sequence. 
  232.  
  233. @begin{verbatim}
  234. @u(Key Binding        Keystroke        Effect)
  235.  
  236. Start-Macro        @b{^X-(}    Starts recording all keyboard input
  237.  
  238. End-Macro        @b{^X-)}    Stops recording keystrokes for macro
  239.  
  240. Execute-Macro        @b{^X-E}    Entire sequence of recorded
  241.                     keystrokes is replayed
  242. @end{verbatim}
  243. @chapter(MicroEMACS Macros)
  244.  
  245.     Macros are programs that are used to customize the editor and to
  246. perform complicated editing tasks.  They may be stored in files or
  247. buffers and may be executed using an appropriate command, or bound to a
  248. particular keystroke.  Portions of the standard start-up file are
  249. implement via macros, as well as the example menu system.  The
  250. @i(execute-macro-<n>) @index(execute-macro-<n>) commands cause the
  251. macro, numbered from 1 to 40, to be executed.  The @i(execute-file)
  252. @index(execute-file) command allows you to execute a macro stored in a
  253. disk file, and the @i(execute-buffer) @index(execute-buffer) command
  254. allows you to execute a macro stored in a buffer.  Macros are stored for
  255. easy execution by executing files that contain the store-macro command. 
  256.  
  257.     There are many different aspects to the macro language within
  258. MicroEMACS.  Editor commands are the various commands that manipulate
  259. text, buffers, windows, etc, within the editor.  Directives are commands
  260. which control what lines get executed within a macro.  Also there are
  261. various types of variables.  Environmental variables both control and
  262. report on different aspects of the editor.  User variables hold string
  263. values which may be changed and inspected.  Buffer variables allow text
  264. to be placed into variables.  Interactive variable allow the program to
  265. prompt the user for information.  Functions can be used to manipulate
  266. all these variables. 
  267.  
  268. @section(Variables)
  269.  
  270.     Variables in MicroEMACS can be used to return values within
  271. expressions, as repeat counts to editing commands, or as text to be
  272. inserted into buffers and messages.  The value of these variables is set
  273. using the set (^X-A) command.  For example, to set the current fill
  274. column to 64 characters, the following macro line would be used:
  275.  
  276.     set $fillcol 64
  277.  
  278.     or to have the contents of @b(%name) inserted at the point in the
  279. current buffer, the command to use would be:
  280.  
  281.     insert-string %name
  282. @newpage
  283. @subsection(Environmental Variables)
  284.  
  285.     "What good is a quote if you can't change it?"
  286.  
  287.     These variables are used to change different aspects of the way
  288. the editor works.  Also they will return the current settings if used as
  289. part of an expression.  All environmental variable names begin with a
  290. dollar sign ($) and are in lower case.
  291.  
  292. @begin(description)
  293. $fillcol@\Current fill column
  294.  
  295. $pagelen@\Number of screen lines used currently
  296.  
  297. $curwidth@\Number of columns used currently
  298.  
  299. $curcol    @\Current column of point in current buffer
  300.  
  301. $curline@\Current line of point in current buffer
  302.  
  303. $flicker@\Flicker Flag set to TRUE if IBM CGA set to FALSE for most others
  304.  
  305. $cbufname@\Name of the current buffer
  306.  
  307. $cfname    @\File name of the current buffer
  308.  
  309. $sres@\Current screen resolution (CGA, MONO or EGA on the IBM-PC driver.
  310. LOW, MEDIUM, HIGH or DENSE on the Atari ST1040,
  311. NORMAL on all others)
  312.  
  313. $debug    @\Flag to trigger macro debugging (try it... you'll like it!)
  314.  
  315. $status    @\return status of the success of the last command
  316. (TRUE or FALSE) usually used with !force
  317.  
  318. $palette@\string used to control the palette register
  319. settings on graphics versions.    The usually form
  320. consists of groups of three octal digits
  321. setting the red, green, and blue levels.
  322.  
  323. $asave    @\The number of inserted characters between
  324. automatic file-saves in ASAVE mode.
  325.  
  326. $acount    @\The countdown of inserted characters until
  327. the next save-file.
  328.  
  329. $lastkey@\Last keyboard character typed
  330.  
  331. $curchar@\Character currently at the point
  332.  
  333. $discmd    @\Flag to disable the echoing of messages
  334. on the command line
  335.  
  336. $version@\Contains the current MicroEMACS version number
  337.  
  338. $progname@\Always contains the string "MicroEMACS" for
  339. standard MicroEMACS. Could be something else
  340. if used as part of someone else's program
  341.  
  342. $seed@\integer seed of the random number generator
  343.  
  344. $disinp    @\Flag to disable the echoing of characters during command line input
  345. @end(description)
  346.  
  347.     Obviously, many more of these variables will be available in
  348. future releases of MicroEMACS. (Yes, send a vote for your favorite new
  349. environmental variables today).
  350.  
  351. @subsection(User variables)
  352.  
  353.     User variables allow you, the user, to store strings and
  354. manipulate them.  These strings can be pieces of text, numbers (in text
  355. form), or the logical values @b(TRUE) and @b(FALSE).  These variables
  356. can be combined, tested, inserted into buffers, and otherwise used to
  357. control the way your macros execute.  At the moment, up to 100 user
  358. variables may be in use in one editing session.  All users variable
  359. names must begin with a percent sign (%) and may contain any printing
  360. characters.  Only the first 10 characters are significant (i.e
  361. differences beyond the tenth character are ignored).  Most operators
  362. will truncate strings to a length of 128 characters. 
  363.  
  364. @subsection(Buffer Variables)
  365.  
  366.     Buffer variables are special in that they can only be queried
  367. and cannot be set.  What buffer variables are is a way to take text from
  368. a buffer and place it in a variable. For example, if I have a buffer by
  369. the name of RIGEL2, and it contains the text:
  370.  
  371. @begin(verbatim)
  372. @begin(group)
  373.     Richmond
  374.     Lafayette
  375.     <*>Bloomington        (where <*> is the current point)
  376.     Indianapolis
  377.     Gary
  378.     =* MicroEMACS 3.8i (WRAP) == rigel2 == File: /data/rigel2.txt =====
  379. @end(group)
  380. @end(verbatim)
  381.  
  382.     and within a command I reference #rigel2, like:
  383.  
  384.     insert-string #rigel2
  385.  
  386.     MicroEMACS would start at the current point in the RIGEL2
  387. buffer and grab all the text up to the end of that line and pass that
  388. back.  Then it would advance the point to the beginning of the next line.
  389. Thus, after our last command executes, the string "Bloomington" gets
  390. inserted into the current buffer, and the buffer RIGEL2 now looks like
  391. this:
  392.  
  393. @begin(verbatim)
  394. @begin(group)
  395.     Richmond
  396.     Lafayette
  397.     Bloomington
  398.     <*>Indianapolis        (where <*> is the current point)
  399.     Gary
  400.     =* MicroEMACS 3.8i (WRAP) == rigel2 == File: /data/rigel2.txt =====
  401. @end(group)
  402. @end(verbatim)
  403.  
  404.     as you have probably noticed, a buffer variable consists of the
  405. buffer name, preceded by a pound sign (#).
  406.  
  407. @subsection(Interactive variables)
  408.  
  409.     Interactive variables are actually a method to prompt the user
  410. for a string.  This is done by using an at sign (@@) followed either with
  411. a quoted string, or a variable containing a string.  The string is the
  412. placed on the bottom line, and the editor waits for the user to type in
  413. a string.  Then the string typed in by the users is returned as the
  414. value of the interactive variable.  For example:
  415.  
  416. @begin(verbatim)
  417.     set %quest "What file? "
  418.     find-file @@%quest
  419. @end(verbatim)
  420.  
  421.     will ask the user for a file name, and then attempt to find it.
  422.  
  423. @section(Functions)
  424.  
  425.     Functions can be used to manipulate variables in various ways. 
  426. Functions can have one, two, or three arguments.  These arguments will
  427. always be placed after the function on the current command line.  For
  428. example, if we wanted to increase the current fill column by two, using
  429. emacs's set (^X-A) command, we would write:
  430.  
  431. @begin(group)
  432. @begin(verbatim)
  433.     set $fillcol &add $fillcol 2
  434.      \    \      \      \     \____second operand
  435.       \     \    \      \_________first operand
  436.        \      \     \_______________function to execute
  437.         \      \_____________________variable to set
  438.          \___________________________set (^X-A) command
  439. @end(verbatim)
  440. @end(group)
  441.  
  442.     Function names always begin with the ampersand (&) character,
  443. and are only significant to the first three characters after the
  444. ampersand.  Functions will normal expect one of three types of
  445. arguments, and will automatically convert types when needed.
  446.  
  447. @begin(description)
  448. <num>@\an ascii string of digits which is interpreted as a numeric value. 
  449. Any string which does not start with a digit or a minus sign (-) will be
  450. considered zero. 
  451.  
  452. <str>@\An arbitrary string of characters.  At the moment, strings are
  453. limited to 128 characters in length. 
  454.  
  455. <log>@\A logical value consisting of the string "TRUE" or "FALSE". 
  456. Numeric strings will also evaluate to "FALSE" if they are equal to zero,
  457. and "TRUE" if they are non-zero.  Arbitrary text strings will have the
  458. value of "FALSE". 
  459. @end(description)
  460.  
  461.     A list of the currently available functions follows: (Once
  462. again, send in those votes on what kind of functions you would like to
  463. see added!) Functions are always used in lower case, the uppercase
  464. letters in the function table are the short form of the function (i.e
  465. &div for ÷).
  466.  
  467. @begin(verbatim)
  468. Numeric Functions:    (returns <num>)
  469.  
  470. &ADD        <num> <num>    Add two numbers
  471. &SUB        <num> <num>    Subtract the second number from the first
  472. &TIMes        <num> <num>    Multiply two numbers
  473. &DIVide        <num> <num>    Divide the first number by the second
  474.                 giving an integer result
  475. &MOD        <num> <num>    Return the reminder of dividing the
  476.                 first number by the second
  477. &NEGate        <neg>        Multiply the arg by -1
  478. &LENgth        <str>        Returns length of string
  479. &ASCii        <str>        Return the ascii code of the first
  480.                 character in <str>
  481. &RND        <num>        Returns a random integer between 1 and <num>
  482. &ABS        <num>        Returns the absolute value of <num>
  483.  
  484. String manipulation functions:    (returns <str>)
  485.  
  486. &CAT        <str> <str>    Concatenate the two strings to form one
  487. &LEFt        <str> <num>    return the <num> leftmost characters
  488.                 from <str>
  489. &RIGht        <str> <num>    return the <num> rightmost characters
  490.                 from <str>
  491. &MID        <str> <num1> <num2>
  492.                 Starting from <num1> position in <str>,
  493.                 return <num2> characters.
  494. &UPPer        <str>        Uppercase <str>
  495. &LOWer        <str>        lowercase <str>
  496. &CHR        <num>        return a string with the character
  497.                 represented by ascii code <num>
  498. >K                return a string containing a single
  499.                 keystroke from the user
  500.  
  501. Logical Testing functions:    (returns <log>)
  502.  
  503. &NOT        <log>        Return the opposite logical value
  504. &AND        <log1> <log2>    Returns TRUE if BOTH logical arguments
  505.                 are TRUE
  506. &OR        <log1> <log2>    Returns TRUE if either argument
  507.                 is TRUE
  508. &EQUal        <num> <num>    If <num> and <num> are numerically
  509.                 equal, return TRUE
  510. &LESs        <num1> <num2>    If <num1> is less than <num2>, return
  511.                 TRUE.
  512. &GREater    <num1> <num2>    If <num1> is greater than, or equal to
  513.                 <num2>, return TRUE.
  514. &SEQual        <str1> <str2>    If the two strings are the same, return
  515.                 TRUE.
  516. &SLEss        <str1> <str2>    If <str1> is less alphabetically than
  517.                 <str2>, return TRUE.
  518. &SGReater    <str1> <str2>    If <str1> is alphabetically greater than
  519.                 or equal to <str2>, return TRUE.
  520.  
  521. Special Functions:
  522.  
  523. &INDirect    <str>        Evaluate <str> as a variable.
  524. @end(verbatim)
  525.  
  526.     This last function deserves more explanation. The &IND function
  527. evaluates its argument, takes the resulting string, and then uses it as
  528. a variable name.  For example, given the following code sequence:
  529.  
  530. @begin(verbatim)
  531.     ; set up reference table
  532.  
  533.     set %one    "elephant"
  534.     set %two    "giraffe"
  535.     set %thee    "donkey"
  536.  
  537.     set %index "two"
  538.     insert-string &ind %index
  539. @end(verbatim)
  540.  
  541.     the string "giraffe" would have been inserted at the point in
  542. the current buffer.  This indirection can be safely nested up to about
  543. 10 levels.
  544.  
  545. @section(Directives)
  546.  
  547.     Directives are commands which only operate within an executing
  548. macro, i.e they do not make sense as a single command. As such, they
  549. cannot be called up singly or bound to keystroke. Used within macros,
  550. they control what lines are executed and in what order.
  551.  
  552.     Directives always start with the exclamation mark (!) character
  553. and must be the first thing placed on a line. Directives executed singly
  554. (via the execute-command-line command) interactively will be ignored.
  555.  
  556. @subsection(!ENDM Directive)
  557.  
  558.     This directive is used to terminate a macro being stored. For
  559. example, if a file is being executed contains the text:
  560.  
  561. @begin(verbatim)
  562.     ;    Read in a file in view mode, and make the window red
  563.  
  564.     26    store-macro
  565.         find-file @@"File to view: "
  566.         add-mode "view"
  567.         add-mode "red"
  568.     !endm
  569.  
  570.     write-message "[Consult macro has been loaded]"
  571. @end(verbatim)
  572.  
  573.     only the lines between the store-macro command and the !ENDM
  574. directive are stored in macro 26.
  575.  
  576. @subsection(!FORCE Directive)
  577.  
  578.     When MicroEMACS executes a macro, if any command fails, the
  579. macro is terminated at that point. If a line is preceded by a !FORCE
  580. directive, execution continues weather the command succeeds or not. For
  581. example:
  582.  
  583. @begin(verbatim)
  584.     ;    Merge the top two windows
  585.  
  586.     save-window        ;remember what window we are at
  587.     1 next-window        ;go to the top window
  588.     delete-window        ;merge it with the second window
  589.     !force restore-window    ;This will continue regardless
  590.     add-mode "red"
  591. @end(verbatim)
  592.  
  593. @subsection(!IF, !ELSE, and !ENDIF Directives)
  594.  
  595.     This directive allows statements only to be executed if a
  596. condition specified in the directive is met.  Every line following the
  597. !IF directive, until the first !ELSE or !ENDIF directive, is only
  598. executed if the expression following the !IF directive evaluates to a
  599. TRUE value.  For example, the following macro segment creates the
  600. portion of a text file automatically.  (yes believe me, this will be
  601. easier to understand then that last explanation....)
  602.  
  603. @begin(verbatim)
  604.     !if &sequal %curplace "timespace vortex"
  605.         insert-string "First, rematerialize~n"
  606.     !endif
  607.     !if &sequal %planet "earth"    ;If we have landed on earth...
  608.         !if &sequal %time "late 20th century"  ;and we are then
  609.             write-message "Contact U.N.I.T."
  610.         !else
  611.             insert-string "Investigate the situation....~n"
  612.             insert-string "(SAY 'stay here Sara')~n"
  613.         !endif
  614.     !else
  615.         set %conditions @@"Atmosphere conditions outside? "
  616.         !if &sequal %conditions "safe"
  617.             insert-string &cat "Go outside......" "~n"
  618.             insert-string "lock the door~n"
  619.         !else
  620.             insert-string "Dematerialize..try somewhere else"
  621.             newline
  622.         !endif
  623.     !endif
  624. @end(verbatim)
  625.  
  626. @subsection(!GOTO Directive)
  627.  
  628.     Flow can be controlled within a MicroEMACS macro using the !GOTO
  629. directive. It takes as an argument a label. A label consists of a line
  630. starting with an asterisk (*) and then an alphanumeric label.  Only
  631. labels in the currently executing macro can be jumped to, and trying to
  632. jump to a non-existing label terminates execution of a macro.  For
  633. example..
  634.  
  635. @begin(verbatim)
  636.     ;Create a block of DATA statements for a BASIC program
  637.  
  638.         insert-string "1000 DATA "
  639.         set %linenum 1000
  640.  
  641.     *nxtin
  642.         update-screen        ;make sure we see the changes
  643.         set %data @@"Next number: "
  644.         !if &equal %data 0
  645.             !goto finish
  646.         !endif
  647.  
  648.         !if &greater $curcol 60
  649.             2 delete-previous-character
  650.             newline
  651.             set %linenum &add %linenum 10
  652.             insert-string &cat %linenum " DATA "
  653.         !endif
  654.  
  655.         insert-string &cat %data ", "
  656.         !goto nxtin
  657.  
  658.     *finish
  659.  
  660.         2 delete-previous-character
  661.         newline
  662. @end(verbatim)
  663.  
  664. @subsection(!RETURN Directive)
  665.  
  666.     The !RETURN Directive causes the current macro to exit, either
  667. returning to the caller (if any) or to interactive mode.  For example:
  668.  
  669. @begin(verbatim)
  670.     ;    Check the monitor type and set %mtyp
  671.  
  672.     !if &sres "CGA"
  673.         set %mtyp 1
  674.         !return
  675.     !else
  676.         set %mtyp 2
  677.     !endif
  678.  
  679.     insert-string "You are on a MONOCHROME machine!~n"
  680. @end(verbatim)
  681. @appendix(MicroEMACS commands)
  682.  
  683.     Below is a complete list of the commands in EMACS, the keys
  684. normally used to do the command, and what the command does.  Remember,
  685. on some computers there may also be additional ways of using a command
  686. (cursor keys and special function keys for example). 
  687.  
  688. @begin(verbatim)
  689. @u(Command        Binding        Meaning)
  690. abort-command         ^G    This allows the user to abort out of any
  691.                 command that is waiting for input
  692.  
  693. add-mode         ^X-M    Add a mode to the current buffer
  694.  
  695. add-global-mode      M-M    Add a global mode for all new buffers
  696.  
  697. apropos          M-A    List out commands whose name contains
  698.                 the string specified
  699.  
  700. backward-character     ^B    Move one character to the left
  701.  
  702. begin-macro         ^X-(    Begin recording a keyboard macro
  703.  
  704. beginning-of-file     M-<    Move to the beginning of the file in
  705.                 the current buffer
  706.  
  707. beginning-of-line     ^A    Move to the beginning of the current line
  708.  
  709. bind-to-key         M-K    Bind a key to a function
  710.  
  711. buffer-position      ^X-=    List the position of the cursor in the
  712.                 current window on the command line
  713.  
  714. case-region-lower     ^X-^L    Make a marked region all lower case
  715.  
  716. case-region-upper     ^X-^U    Make a marked region all upper case
  717.  
  718. case-word-capitalize     M-C    Capitalize the following word
  719.  
  720. case-word-lower      M-L    Lower case the following word
  721.  
  722. case-word-upper      M-U    Upper case the following word
  723.  
  724. change-file-name     ^X-N    Change the name of the file in the
  725.                 current buffer
  726.  
  727. change-screen-size     M-^S    Change the number of lines of the screen
  728.                 currently being used
  729.  
  730. change-screen-width     M-^T    Change the number of columns of the
  731.                 screen currently being used
  732.  
  733. clear-and-redraw     ^L    Clear the physical screen and redraw it
  734.  
  735. clear-message-line    (none)    Clear the command line
  736.  
  737. copy-region         M-W    Copy the currently marked region into
  738.                 the kill buffer
  739.  
  740. count-words         M-^C    Count how many words, lines and
  741.                 characters are in the current marked region
  742.  
  743. ctlx-prefix         ^X    Change the key used as the ^X prefix
  744.  
  745. delete-blank-lines     ^X-^O    Delete all blank lines around the cursor
  746.  
  747. delete-buffer         ^X-K    Delete a buffer which is not being
  748.                 currently displayed in a window
  749.  
  750. delete-mode         ^X-^M    Turn off a mode in the current buffer
  751.  
  752. delete-global-mode     M-^M    Turn off a global mode
  753.  
  754. delete-next-character     ^D    Delete the character following the cursor
  755.  
  756. delete-next-word     M-D    Delete the word following the cursor
  757.  
  758. delete-other-windows     ^X-1    Make the current window cover the entire
  759.                 screen
  760.  
  761. delete-previous-character^H    Delete the character to the left of the
  762.                 cursor
  763.  
  764. delete-previous-word     M-^H    Delete the word to the left of the cursor
  765.  
  766. delete-window         ^X-0    Remove the current window from the screen
  767.  
  768. describe-bindings    (none)    Make a list of all legal commands
  769.  
  770. describe-key         ^X-?    Describe what command is bound to a
  771.                 keystroke sequence
  772.  
  773. detab-line         ^X-^D    Change all tabs in a line to the
  774.                 equivalent spaces
  775.  
  776. end-macro         ^X-)    stop recording a keyboard macro
  777.  
  778. end-of-file         M->    Move cursor to the end of the current buffer
  779.  
  780. end-of-line         ^E    Move to the end of the current line
  781.  
  782. entab-line         ^X-^E    Change multiple spaces to tabs where
  783.                 possible
  784.  
  785. exchange-point-and-mark  ^X-^X    Move cursor to the last marked spot,
  786.                 make the original position be marked
  787.  
  788. execute-buffer        (none)    Execute a buffer as a macro
  789.  
  790. execute-command-line    (none)    Execute a line typed on the command
  791.                 line as a macro command
  792.  
  793. execute-file         FNB    Execute a file as a macro
  794.  
  795. execute-macro         ^X-E    Execute the keyboard macro (play back
  796.                 the recorded keystrokes)
  797. execute-macro-<n>    (none)    Execute numbered macro <N> where <N> is
  798.                 an integer from 1 to 40
  799.  
  800. execute-named-command     M-X    Execute a command by name
  801.  
  802. execute-procedure     M-^E    Execute a procedure by name
  803.  
  804. exit-emacs         ^X-^C    Exit EMACS. If there are unwritten,
  805.                 changed buffers EMACS will ask to confirm
  806.  
  807. fill-paragraph         M-Q    Fill the current paragraph
  808.  
  809. filter-buffer         ^X-#    Filter the current buffer through an
  810.                 external filter
  811.  
  812. find-file         ^X-^F    Find a file to edit in the current window
  813.  
  814. forward-character     ^F    Move cursor one character to the right
  815.  
  816. goto-line         M-G    Goto a numbered line
  817.  
  818. goto-matching-fence     M-^F    Goto the matching fence
  819.  
  820. grow-window         ^X-^    Make the current window larger
  821.  
  822. handle-tab         ^I    Insert a tab or set tab stops
  823.  
  824. hunt-forward         FN=    Hunt for the next match of the last
  825.                 search string
  826.  
  827. hunt-backward         FN>    Hunt for the last match of the last
  828.                 search string
  829.  
  830. help             M-?    Read EMACS.HLP into a buffer and display it
  831.  
  832. i-shell          ^X-C    Shell up to a new command processor
  833.  
  834. incremental-search     ^X-S    Search for a string, incrementally
  835.  
  836. insert-file         ^X-^I    insert a file at the cursor in the
  837.                 current file
  838.  
  839. insert-space         ^C    Insert a space to the right of the cursor
  840.  
  841. insert-string        (none)    Insert a string at the cursor
  842.  
  843. kill-paragraph         M-^W    Delete the current paragraph
  844.  
  845. kill-region         ^W    Delete the current marked region, moving
  846.                 it to the kill buffer
  847.  
  848. kill-to-end-of-line     ^K    Delete the rest of the current line
  849.  
  850. list-buffers         ^X-^B    List all existing buffers
  851.  
  852. meta-prefix         <ESC>    Key used to precede all META commands
  853.  
  854. move-window-down     ^X-^N    Move all the lines in the current window down
  855.  
  856. move-window-up         ^X-^P    Move all the lines in the current window up
  857.  
  858. name-buffer         M-^N    Change the name of the current buffer
  859.  
  860. newline          ^M    Insert a <NL> at the cursor
  861.  
  862. newline-and-indent     ^J    Insert a <NL> at the cursor and indent
  863.                 the new line the same as the preceding line
  864.  
  865. next-buffer         ^X-X    Bring the next buffer in the list into
  866.                 the current window
  867.  
  868. next-line         ^N    Move the cursor down one line
  869.  
  870. next-page         ^V    Move the cursor down one page
  871.  
  872. next-paragraph         M-N    Move cursor to the next paragraph
  873.  
  874. next-window         ^X-O    Move cursor to the next window
  875.  
  876. next-word         M-F    Move cursor to the beginning of the
  877.                 next word
  878.  
  879. open-line         ^O    Open a line at the cursor
  880.  
  881. pipe-command         ^X-@@    Execute an external command and place
  882.                 its output in a buffer
  883.  
  884. previous-line         ^P    Move cursor up one line
  885.  
  886. previous-page         ^Z    Move cursor up one page
  887.  
  888. previous-paragraph     M-P    Move back one paragraph
  889.  
  890. previous-window      ^X-P    Move the cursor to the last window
  891.  
  892. previous-word         M-B    Move the cursor to the beginning of the
  893.                 word to the left of the cursor
  894.  
  895. query-replace-string     M-^R    Replace all of one string with another
  896.                 string, interactively querying the user
  897.  
  898. quick-exit         M-Z    Exit EMACS, writing out all changed buffers
  899.  
  900. quote-character      ^Q    Insert the next character literally
  901.  
  902. read-file         ^X-^R    Read a file into the current buffer
  903.  
  904. redraw-display         M-^L    Redraw the display, centering the
  905.                 current line
  906.  
  907. resize-window         ^X-W    Change the number of lines in the
  908.                 current window
  909.  
  910. restore-window        (none)    Move cursor to the last saved window
  911.  
  912. replace-string         M-R    Replace all occurrences of one string
  913.                 with another string from the cursor
  914.                 to the end of the buffer
  915.  
  916. reverse-incremental-search^X-R    Search backwards, incrementally
  917.  
  918. run             M-^E    Execute a named procedure
  919.  
  920. save-file         ^X-^S    Save the current buffer if it is changed
  921.  
  922. save-window        (none)    Remember current window (to restore later)
  923.  
  924. scroll-next-up         M-^Z    Scroll the next window up
  925.  
  926. scroll-next-down     M-^V    Scroll the next window down
  927.  
  928. search-forward         ^S    Search for a string
  929.  
  930. search-reverse         ^R    Search backwards for a string
  931.  
  932. select-buffer         ^X-B    Select a buffer to display in the
  933.                 current window
  934.  
  935. set             ^X-A    Set a variable to a value
  936.  
  937. set-encryption-key     M-E    Set the encryption key of the current buffer
  938.  
  939. set-fill-column      ^X-F    Set the current fill column
  940.  
  941. set-mark            Set the mark
  942.  
  943. shell-command         ^X-!    Execute an external command
  944.  
  945. shrink-window         ^X-^Z    Make the current window smaller
  946.  
  947. split-current-window     ^X-2    Split the current window in two
  948.  
  949. store-macro        (none)    Store the following macro lines to a
  950.                 numbered macro
  951.  
  952. store-procedure        (none)    Store the following macro lines to a
  953.                 named procedure
  954.  
  955. transpose-characters     ^T    Transpose the character at the cursor
  956.                 with the character to the left
  957.  
  958. trim-line         ^X-^T    Trim any trailing whitespace from line
  959.  
  960. unbind-key         M-^K    Unbind a key from a function
  961.  
  962. universal-argument     ^U    Execute the following command 4 times
  963.  
  964. unmark-buffer         M-~    Unmark the current buffer (so it is
  965.                 no longer changed)
  966.  
  967. update-screen        (none)    Force a screen update during macro execution
  968.  
  969. view-file         ^X-^V    Find a file,and put it in view mode
  970.  
  971. wrap-word         M-FNW    Wrap the current word, this is an
  972.                 internal function
  973.      
  974. write-file         ^X-^W    Write the current buffer under a new
  975.                 file name
  976.  
  977. write-message        (none)    Display a string on the command line
  978.  
  979. yank             ^Y    yank the kill buffer into the current
  980.                 buffer at the cursor
  981. @end(verbatim)
  982. @appendix(MicroEMACS Bindings)
  983.  
  984.     Below is a complete list of the key bindings used in MicroEMACS.
  985. This can be used as a wall chart reference for MicroEMACS commands.
  986.  
  987. @begin(verbatim)
  988. @center(@b[Default Key Bindings for MicroEmacs 3.8i])
  989.  
  990.  ^A   Move to start of line          ESC A   Apropos (list some commands)
  991.  ^B   Move backward by characters     ESC B   Backup by words
  992.  ^C   Insert space              ESC C   Initial capitalize word
  993.  ^D   Forward delete              ESC D   Delete forward word
  994.  ^E   Goto end of line              ESC E   Reset Encryption Key
  995.  ^F   Move forward by characters      ESC F   Advance by words
  996.  ^G   Abort out of things          ESC G   Go to a line
  997.  ^H   Backward delete              
  998.  ^I   Insert tab/Set tab stops
  999.  ^J   Insert CR-LF, then indent             
  1000.  ^K   Kill forward              ESC K   Bind Key to function
  1001.  ^L   Refresh the screen          ESC L   Lower case word
  1002.  ^M   Insert CR-LF              ESC M   Add global mode
  1003.  ^N   Move forward by lines          ESC N   Goto End paragraph
  1004.  ^O   Open up a blank line          
  1005.  ^P   Move backward by lines          ESC P   Goto Beginning of paragraph
  1006.  ^Q   Insert literal              ESC Q   Fill current paragraph
  1007.  ^R   Search backwards              ESC R   Search and replace
  1008.  ^S   Search forward
  1009.  ^T   Transpose characters               
  1010.  ^U   Repeat command four times       ESC U   Upper case word
  1011.  ^V   Move forward by pages          ESC V   Move backward by pages
  1012.  ^W   Kill region              ESC W   Copy region to kill buffer
  1013.  ^Y   Yank back from killbuffer       ESC X   Execute named command
  1014.  ^Z   Move backward by pages          ESC Z   Save all buffers and exit
  1015.  
  1016.  ESC ^C   Count words in region       ESC ~   Unmark current buffer
  1017.  ESC ^F   Goto matching fence          ESC !   Reposition window
  1018.  ESC ^H   Delete backward word          ESC <   Move to start of buffer
  1019.  ESC ^K   Unbind Key from function    ESC >   Move to end of buffer
  1020.  ESC ^L   Reposition window          ESC .   Set mark
  1021.  ESC ^M   Delete global mode          ESC space    Set mark
  1022.  ESC ^N   Rename current buffer       ESC rubout   Delete backward word
  1023.  ESC ^R   Search & replace w/query      rubout   Backward delete
  1024.  ESC ^S   Change screen rows
  1025.  ESC ^T   Change screen columns
  1026.  ESC ^V   Scroll next window down
  1027.  ESC ^W   Delete Paragraph
  1028.  ESC ^Z   Scroll next window up
  1029.  
  1030.  ^X ?    Describe a key           ^X !   Run 1 command in a subjob
  1031.  ^X =    Show the cursor position   ^X @@   Pipe DOS command to buffer
  1032.  ^X ^    Enlarge display window       ^X #   Filter buffer thru DOS filter
  1033.  ^X 0    Delete current window       ^X (   Begin macro
  1034.  ^X 1    Delete other windows       ^X )   End macro
  1035.  ^X 2    Split current window
  1036.                    ^X A   Set variable value
  1037.  ^X ^B     Display buffer list       ^X B   Switch a window to a buffer
  1038.  ^X ^C     Exit MicroEMACS       ^X C   Start a new command processor
  1039.                    ^X D   Suspend MicroEMACS (BSD4.2 only)
  1040.                    ^X E   Execute macro
  1041.  ^X ^F     Find file           ^X F   Set fill column
  1042.  ^X ^I     Insert file
  1043.                    ^X K   Delete buffer
  1044.  ^X ^L     Lower case region
  1045.  ^X ^M     Delete Mode           ^X M   Add a mode
  1046.  ^X ^N     Move window down       ^X N   Rename current filename
  1047.  ^X ^O     Delete blank lines       ^X O   Move to the next window
  1048.  ^X ^P     Move window up        ^X P   Move to the previous window
  1049.  ^X ^R     Get a file from disk       ^X R   Incremental reverse search
  1050.  ^X ^S     Save current file       ^X S   Incremental forward search
  1051.  ^X ^U     Upper case region
  1052.  ^X ^V     View file
  1053.  ^X ^W     Write a file to disk       ^X W   resize Window
  1054.  ^X ^X     Swap "." and mark       ^X X   Use next buffer
  1055.  ^X ^Z     Shrink window           ^X Z   Enlarge display window
  1056.  
  1057. Only under PCDOS:
  1058.  <ALT>-S Hunt forward         SHIFT <F1> - <F10>
  1059.  <ALT>-R Hunt backward         Execute macros 1 - 10
  1060.  
  1061. @u(Usable Modes)
  1062. WRAP     Lines going past right margin "wrap" to a new line
  1063. VIEW     Read-Only mode where no modifications are allowed
  1064. CMODE     Change behavior of some commands to work with C better
  1065. EXACT     Exact case matching on search strings
  1066. OVER     Overwrite typed characters instead of inserting them
  1067. CRYPT     Current buffer will be encrypted on write, decrypted on read
  1068. MAGIC     Use regular expression matching in searches
  1069. ASAVE     Save the file every 256 inserted characters
  1070.  
  1071. WHITE/CYAN/MAGENTA/YELLOW/BLUE/RED/GREEN/BLACK    Sets foreground color
  1072. white/cyan/magenta/yellow/blue/red/green/black    Sets background color
  1073. @end(verbatim)
  1074. @newpage
  1075. @appendix(Supported machines)
  1076.  
  1077.     The following table lists all the hardware/compilers for which I
  1078. currently support MicroEMACS.  This is not exclusive of all machines
  1079. which MicroEMACS will run on, but I have either run it myself, or had a
  1080. first hand report of it running.
  1081.  
  1082. @begin(verbatim)
  1083. @u(Hardware    OS        Compiler    Comments)
  1084. VAX 780        UNIX V5        native
  1085.         UNIX V7        native
  1086.         BSD 4.2        native        job control supported
  1087.         *VMS        native        only some terminals supported
  1088.  
  1089. NCR Tower    UNIX V5        native
  1090.  
  1091. Fortune 32:16    UNIX V7        native
  1092.  
  1093. IBM-PC        MSDOS 2/3.2    Lattice    2.15    Large CODE/Large DATA
  1094.                  AZTEC 3.4e    Small CODE/Large DATA
  1095.                 *MSC 4.0
  1096.                 *MWC 86
  1097.  
  1098. HP150        MSDOS        Lattice 2.15    Function key labels
  1099.                         for the touch screen
  1100.  
  1101. HP110        MSDOS        Lattice 2.15
  1102.                 Aztec 3.4e
  1103.  
  1104. *Data General 10
  1105.         MSDOS        Lattice 2.15
  1106.  
  1107. *Texas Instruments Professional
  1108.         MSDOS        Lattice 2.15
  1109.  
  1110. Amiga        Intuition    Lattice 3.03    no mouse or menus yet
  1111.                 *Aztec 3
  1112.  
  1113. ST520        TOS        Lattice 3.10    no menus yet,
  1114.                         no shell commands
  1115.  
  1116. @ux[Systems to be supported (i.e some code is already written:)]
  1117. Macintosh    Finder 5.0    Aztec
  1118.  
  1119. *means that I do not own or have access to the listed compiler and/or
  1120.  machine and must rely upon others to help support it. 
  1121. @end(verbatim)
  1122. @newpage
  1123. @appendix(Machine Dependent Notes)
  1124.  
  1125.     This appendix lists some notes specific to individual
  1126. implementations of MicroEMACS. Every attempt has been made to allow
  1127. EMACS to be identical on all machines, but we have also tried to take
  1128. advantage of function keys, cursor keys, mice, and special screen modes
  1129. where possible.
  1130.  
  1131. @appendixsection(IBM-PC/XT/AT and its clones)
  1132.  
  1133.     The IBM-PC family of computers is supported with a variety of
  1134. different display adapters.  EMACS will attempt to discover what adapter
  1135. is connected and use the proper driver for it.    Below is a list of the
  1136. currently supported video adapters:
  1137.  
  1138. @begin(verbatim)
  1139. @u(Adapter            $sres        Original mode used)
  1140. Monochrome Graphics Adapter    MONO        MONO
  1141. Color Graphics Adapter        CGA        CGA
  1142. Enhanced graphics Adapter    EGA        CGA
  1143. @end(verbatim)
  1144.  
  1145.     EMACS also takes advantage of various function keys and the keys
  1146. on the keypad on an IBM-PC.  The function keys are initially not bound
  1147. to any particular functions (except by the emacs.rc startup file), but
  1148. the keypad keys do default to the following:
  1149.  
  1150. @begin(verbatim)
  1151. @u(Keypad key    Function)
  1152. Home        beginning-of-file
  1153. CSRS UP        previous-line
  1154. Pg Up        previous-page
  1155. CSRS LEFT    backward-character
  1156. CSRS RIGHT    forward-character
  1157. End        end-of-file
  1158. CSRS DOWN    next-line
  1159. Pg Dn        Next-page
  1160. @end(verbatim)
  1161.  
  1162.     All these special keys are indicated in EMACS macros by use of
  1163. the @b(FN) prefix.  Below is a list of many of the keys and the codes
  1164. used to specify them.  Also the codes may be gotten by using the
  1165. describe-key (^X ?) command on the suspect key.
  1166. @newpage
  1167. @begin(verbatim)
  1168.             IBM PC function keys in MicroEmacs
  1169.  
  1170.     function    Function    ^function    Alt-function
  1171.  f1)      FN;          FNT          FN^          FNh
  1172.  f2)      FN<          FNU          FN_          FNi
  1173.  f3)      FN=          FNV          FN`          FNj
  1174.  f4)      FN>          FNW          FNa          FNk
  1175.  f5)      FN?          FNX          FNb          FNl
  1176.  f6)      FN@@          FNY          FNc          FNm
  1177.  f7)      FNA          FNZ          FNd          FNn
  1178.  f8)      FNB          FN[          FNe          FNo
  1179.  f9)      FNC          FN\          FNf          FNp
  1180. f10)      FND          FN]          FNg          FNq
  1181.  
  1182. home)      FNG                  FNw
  1183. CuUp)      FNH
  1184. PgUp)      FNI                  FN {Alt 132}
  1185. CuLf)      FNK                  FNs
  1186.  5  )
  1187. CuRt)      FNM                  FNt
  1188.  End)      FNO                  FNu
  1189. CuDn)      FNP
  1190. PgDn)      FNQ                  FNv
  1191.  Ins)      FNR
  1192.  Del)      FNS
  1193. @end(verbatim)
  1194. @newpage
  1195. @appendixsection(Atari 520/1040ST)
  1196.  
  1197.     The ATARI ST family of computers have a dual personality.  They
  1198. may use either a monochrome or a color screen.    EMACS supports two
  1199. screen resolutions on each monitor. 
  1200.  
  1201. @begin(verbatim)
  1202. @u(Monitor $sres size #color $palette format)
  1203. Color    LOW    40x25    16    000111222333444555666777
  1204.     MEDIUM    80x25    4    000111222333
  1205. Mono    HIGH    80x25    2    000
  1206.     DENSE    80x40    2    000
  1207. @end(verbatim)
  1208.  
  1209.     The $palette environment variable can be used to change what
  1210. color is associated with each color name.  With a color monitor, each
  1211. group of three digits indicates an octal number specifying the RED,
  1212. GREEN and BLUE levels of that color.  Each color digit can vary from 0
  1213. to 7.  For example, the initial setting of $palette in LOW resolution is:
  1214.  
  1215. @begin(verbatim)
  1216.     000700070770007707077777
  1217.  
  1218.     which broken up is:
  1219.  
  1220.     000 700 070 770 007 707 077 777
  1221.  
  1222.     which means:
  1223.  
  1224.     000    Black
  1225.     700    Red
  1226.     070    Green
  1227.     770    Yellow
  1228.     007    Blue
  1229.     707    Magenta
  1230.     077    Cyan
  1231.     777    White
  1232. @end(verbatim)
  1233.  
  1234. @quotation[@i(Note: DENSE mode is not yet supported in 3.8i.  It will be
  1235. soon)]
  1236.  
  1237.     Also the mouse generates FN prefix codes when moved, or when one
  1238. of the two buttons is pressed.    Initially the movement of the mouse is
  1239. bound to movement of the cursor, and the left mouse button generates a
  1240. set-mark (M-space) command.  The cursor keys and the function keys are
  1241. bound similarly to IBM-PC.
  1242. @newpage
  1243. @appendixsection(Amiga 1000)
  1244.  
  1245.     The Commodore AMIGA 1000 version of MicroEMACS does not have
  1246. extensive support of the mouse or of pull down menus as of yet.  It does
  1247. however come up in a window, and it is possible to re-size it to run in
  1248. different sized windows.  The @b(M-^S) @i(change-screen-size)
  1249. @index(change-screen-size) takes its numeric argument as the new number
  1250. of lines for EMACS to use.  The @b(M-^T) @i(change-screen-width)
  1251. @index(change-screen-width) command allows you to change the number of
  1252. columns EMACS will use.  The defaults for these are 23 lines and 77
  1253. characters across for a full screen window.
  1254.  
  1255. @center(Note about Compiling MicroEMACS)
  1256.  
  1257. @begin(quotation)
  1258.     If you are compiling the sources on the AMIGA to produce an
  1259. executable image, and you are using the Lattice compiler, be sure to
  1260. give the CLI command 'STACK 40000' before compiling to make sure the
  1261. compiler has sufficient stack space to successfully complete
  1262. compilation.
  1263. @end(quotation)
  1264. @newpage
  1265. @appendixsection(UNIX V5, V7, and BSD4.[23])
  1266.  
  1267.     MicroEMACS under UNIX utilizes the @b(TERMCAP) @index(termcap)
  1268. library to provide machine independent screen functions.  Make sure that
  1269. termcap is available and properly set on your account before attempting
  1270. to use MicroEMACS. 
  1271.  
  1272.     Under systems which support job control, you can use the
  1273. @b(^X-D) @i(suspend-emacs) @index(suspend-emacs) command to place EMACS
  1274. into the background.  This carries a much smaller overhead than bringing
  1275. up a new shell under EMACS.  EMACS will properly redraw the screen when
  1276. you bring it back to the foreground.
  1277.  
  1278.     With the addition of some very machine/operating system specific
  1279. code, EMACS can prevent two or more people from modifying the same file
  1280. at the same time.  @index(file locking) The upper level of a set of
  1281. functions to provide file locking exist in the source file @b(LOCK.C). 
  1282. It requires two machine specific functions written and linked into EMACS
  1283. for it to operate properly. 
  1284.  
  1285. @begin(verbatim)
  1286.     char *dolock(fname)
  1287.  
  1288.     char *fname;
  1289.  
  1290.     dolock() locks a file, preventing others from modifying it. If
  1291.     it succeeds, it returns NULL, otherwise it returns a pointer to
  1292.     a string in the form "LOCK ERROR: explanation".
  1293.  
  1294.     char *undolock(fname)
  1295.  
  1296.     char *fname;
  1297.  
  1298.     undolock() unlocks a file, allowing others to modifying it. If
  1299.     it succeeds, it returns NULL, otherwise it returns a pointer to
  1300.     a string in the form "LOCK ERROR: explanation".
  1301. @end(verbatim)
  1302. -----snip-----snip-----snip-----snip-----snip-----snip-----snip-----snip-----
  1303.  
  1304. -- 
  1305.                             Paul Homchick
  1306. Chimitt Gilman Homchick, Inc.; One Radnor Station, Suite 300; Radnor, PA 19087
  1307.              {seismo!bpa | ihnp4!cbmvax} !vu-vlsi!cgh!paul
  1308.