home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume1 / 8711 / 17 < prev    next >
Internet Message Format  |  1990-07-13  |  63KB

  1. Path: uunet!husc6!hao!ames!necntc!ncoast!allbery
  2. From: nwd@j.cc.purdue.edu (Daniel Lawrence)
  3. Newsgroups: comp.sources.misc
  4. Subject: MicroEmacs 3.9 Manual (6 of 6)
  5. Message-ID: <5819@ncoast.UUCP>
  6. Date: 26 Nov 87 04:18:25 GMT
  7. Sender: allbery@ncoast.UUCP
  8. Lines: 1874
  9. Approved: allbery@ncoast.UUCP
  10. X-Archive: comp.sources.misc/8711/17
  11.  
  12. X          &SLEss          <str1> <str2>   If <str1> is less alphabetically than
  13. X                                          <str2>, return TRUE.
  14. X          &SGReater       <str1> <str2>   If <str1> is alphabetically greater than
  15. X                                          or equal to <str2>, return TRUE.
  16. X          &FINd           <str>           Does the named file <str> exist?
  17. X
  18. X          Special Functions:
  19. X
  20. X          &INDirect       <str>           Evaluate <str> as a variable.
  21. X
  22. X                  This last function deserves  more  explanation.  The &IND
  23. X          function evaluates its argument, takes the resulting  string, and
  24. X          then  uses  it  as a variable  name.    For  example,  given  the
  25. X          following code sequence:
  26. X
  27. X                  ; set up reference table
  28. X
  29. X                  set %one        "elephant"
  30. X                  set %two        "giraffe"
  31. X
  32. X
  33. X                                                                         52
  34. X
  35. X
  36. X
  37. X
  38. X
  39. X
  40. X          MicroEMACS Macros                     MicroEMACS Reference Manual
  41. X
  42. X
  43. X                  set %three      "donkey"
  44. X
  45. X                  set %index "two"
  46. X                  insert-string &ind %index
  47. X
  48. X                  the string "giraffe"  would  have  been  inserted  at the
  49. X          point  in the current buffer.  This  indirection  can  be  safely
  50. X          nested up to about 10 levels.
  51. X
  52. X
  53. X          12.4  Directives
  54. X
  55. X
  56. X                  Directives  are  commands which only  operate  within  an
  57. X          executing macro, ie they  do  not make sense as a single command.
  58. X          As such, they cannot  be  called up singly or bound to keystroke.
  59. X          Used within macros, they control what lines are  executed  and in
  60. X          what order.
  61. X
  62. X                  Directives  always  start  with  the exclamation mark (!)
  63. X          character  and  must  be  the  first  thing  placed  on  a  line.
  64. X          Directives executed interactively  (via  the execute-command-line
  65. X          command) will be ignored.
  66. X
  67. X
  68. X          12.4.1  !ENDM Directive
  69. X
  70. X
  71. X                  This directive is used to terminate a macro being stored.
  72. X          For example, if a file is being executed contains the text:
  73. X
  74. X                  ;       Read in a file in view mode, and make the window red
  75. X
  76. X                  26      store-macro
  77. X                          find-file @"File to view: "
  78. X                          add-mode "view"
  79. X                          add-mode "red"
  80. X                  !endm
  81. X
  82. X                  write-message "[Consult macro has been loaded]"
  83. X
  84. X                  only the lines between the  store-macro  command  and the
  85. X          !ENDM  directive  are  stored in macro 26.  Both numbered macroes
  86. X          and named procedures (via the store-procedure command)  should be
  87. X          terminated with this directive.
  88. X
  89. X
  90. X          12.4.2  !FORCE Directive
  91. X
  92. X
  93. X                  When MicroEMACS executes a macro, if  any  command fails,
  94. X          the macro is terminated at that point. If a line is  preceeded by
  95. X          a !FORCE  directive,  execution  continues  weather  the  command
  96. X          succeeds or not. For example:
  97. X
  98. X
  99. X          53
  100. X
  101. X
  102. X
  103. X
  104. X
  105. X
  106. X          MicroEMACS Reference Manual                     MicroEMACS Macros
  107. X
  108. X
  109. X                  ;       Merge the top two windows
  110. X
  111. X                  save-window             ;remember what window we are at
  112. X                  1 next-window           ;go to the top window
  113. X                  delete-window           ;merge it with the second window
  114. X                  !force restore-window   ;This will continue regardless
  115. X                  add-mode "red"
  116. X
  117. X
  118. X          12.4.3  !IF, !ELSE, and !ENDIF Directives
  119. X
  120. X
  121. X                  This directive allows statements only to be executed if a
  122. X          condition  specified  in  the  directive  is  met.    Every  line
  123. X          following  the !IF directive, until the  first  !ELSE  or  !ENDIF
  124. X          directive, is only  executed  if the expression following the !IF
  125. X          directive evaluates to a TRUE  value.  For example, the following
  126. X          macro segment creates  the  portion of a text file automatically.
  127. X          (yes believe me, this will be easier to understand then that last
  128. X          explanation....)
  129. X
  130. X                  !if &sequal %curplace "timespace vortex"
  131. X                          insert-string "First, rematerialize~n"
  132. X                  !endif
  133. X                  !if &sequal %planet "earth"     ;If we have landed on earth...
  134. X                          !if &sequal %time "late 20th century"  ;and we are then
  135. X                                  write-message "Contact U.N.I.T."
  136. X                          !else
  137. X                                  insert-string "Investigate the situation....~n"
  138. X                                  insert-string "(SAY 'stay here Sara')~n"
  139. X                          !endif
  140. X                  !else
  141. X                          set %conditions @"Atmosphere conditions outside? "
  142. X                          !if &sequal %conditions "safe"
  143. X                                  insert-string &cat "Go outside......" "~n"
  144. X                                  insert-string "lock the door~n"
  145. X                          !else
  146. X                                  insert-string "Dematerialize..try somewhen else"
  147. X                                  newline
  148. X                          !endif
  149. X                  !endif
  150. X
  151. X
  152. X          12.4.4  !GOTO Directive
  153. X
  154. X
  155. X                  Flow can be controlled within  a  MicroEMACS  macro using
  156. X          the !GOTO directive.  It  takes  as  an argument a label. A label
  157. X          consists  of a line starting with an asterisk  (*)  and  then  an
  158. X          alphanumeric label.  Only labels in the currently executing macro
  159. X          can  be jumped to, and trying to jump  to  a  non-existing  label
  160. X          terminates execution of a macro.  For example..
  161. X
  162. X                  ;Create a block of DATA statements for a BASIC program
  163. X
  164. X
  165. X                                                                         54
  166. X
  167. X
  168. X
  169. X
  170. X
  171. X
  172. X          MicroEMACS Macros                     MicroEMACS Reference Manual
  173. X
  174. X
  175. X                          insert-string "1000 DATA "
  176. X                          set %linenum 1000
  177. X
  178. X                  *nxtin
  179. X                          update-screen           ;make sure we see the changes
  180. X                          set %data @"Next number: "
  181. X                          !if &equal %data 0
  182. X                                  !goto finish
  183. X                          !endif
  184. X
  185. X                          !if &greater $curcol 60
  186. X                                  2 delete-previous-character
  187. X                                  newline
  188. X                                  set %linenum &add %linenum 10
  189. X                                  insert-string &cat %linenum " DATA "
  190. X                          !endif
  191. X
  192. X                          insert-string &cat %data ", "
  193. X                          !goto nxtin
  194. X
  195. X                  *finish
  196. X
  197. X                          2 delete-previous-character
  198. X                          newline
  199. X
  200. X
  201. X          12.4.5  !WHILE and !ENDWHILE Directives
  202. X
  203. X
  204. X                  This directive allows  you  to  set  up  repetitive tasks
  205. X          easily  and  efficiently.  If  a  group of statements need to  be
  206. X          executed while a certain condition is true, enclose  them  with a
  207. X          while loop. For example,
  208. X
  209. X                  !while &less $curcol 70
  210. X                          insert-string &cat &cat "[" #stuff "]"
  211. X                  !endwhile
  212. X
  213. X                  places items from buffer "item" in the current line until
  214. X          the cursor is at or past  column  70.   While loops may be nested
  215. X          and can contain and be the targets of !GOTOs with no ill effects.
  216. X          Using a  while  loop  to  enclose  a  repeated task will run much
  217. X          faster than the corresponding construct using !IFs.
  218. X
  219. X
  220. X          12.4.6  !BREAK Directive
  221. X
  222. X
  223. X                  This  directive  allows  the  user  to abort out  of  the
  224. X          currently most inner while loop, regardless of the condition.  It
  225. X          is  often used to abort processing for  error  conditions.    For
  226. X          example:
  227. X
  228. X          ;       Read in files and substitute "begining" with "beginning"
  229. X
  230. X
  231. X          55
  232. X
  233. X
  234. X
  235. X
  236. X
  237. X
  238. X          MicroEMACS Reference Manual                     MicroEMACS Macros
  239. X
  240. X
  241. X                  set %filename #list
  242. X                  !while ¬ &seq %filename "<end>"
  243. X          !force          find-file %filename
  244. X                          !if &seq $status FALSE
  245. X                                  write-message "[File read error]"
  246. X                                  !break
  247. X                          !endif
  248. X                          beginning-of-file
  249. X                          replace-string "begining" "beginning"
  250. X                          save-file
  251. X                          set %filename #list
  252. X                  !endwhile
  253. X
  254. X                  This  while loop will process files  until  the  list  is
  255. X          exhausted or there is an error while reading a file.
  256. X
  257. X
  258. X          12.4.7  !RETURN Directive
  259. X
  260. X
  261. X                  The !RETURN Directive causes the current  macro  to exit,
  262. X          either returning to the caller (if any) or  to  interactive mode.
  263. X          For example:
  264. X
  265. X                  ;       Check the monitor type and set %mtyp
  266. X
  267. X                  !if &sres "CGA"
  268. X                          set %mtyp 1
  269. X                          !return
  270. X                  !else
  271. X                          set %mtyp 2
  272. X                  !endif
  273. X
  274. X                  insert-string "You are on a MONOCHROME machine!~n"
  275. X
  276. X
  277. X
  278. X
  279. X
  280. X
  281. X
  282. X
  283. X
  284. X
  285. X
  286. X
  287. X
  288. X
  289. X
  290. X
  291. X
  292. X
  293. X
  294. X
  295. X
  296. X
  297. X                                                                         56
  298. X
  299. X
  300. X
  301. X
  302. X
  303. X
  304. X          MicroEMACS Command Line Switches and Startup Files     MicroEMACS
  305. X                                                           Reference Manual
  306. X
  307. X
  308. X
  309. X
  310. X
  311. X
  312. X
  313. X
  314. X                                     Appendix A
  315. X
  316. X                 MicroEMACS Command Line Switches and Startup Files
  317. X
  318. X
  319. X                  When EMACS first executes, it always searches for a file,
  320. X          called .emacsrc under most UNIX systems or emacs.rc on most other
  321. X          systems which it will execute as EMACS macros before it  reads in
  322. X          the named source files. This file normally contains EMACS macroes
  323. X          to  bind  the  function keys to useful functions and load various
  324. X          usefull macros.  The  contents  of  this  file will probably vary
  325. X          from system to system and can be modified by the user as desired.
  326. X
  327. X                  When searching for this file,  EMACS looks for it in this
  328. X          order.  First, it attempts to find a definition for "HOME" in the
  329. X          environment.   It will look in that directory  first.    Then  it
  330. X          searches all the directories  listed  in  the  "PATH" environment
  331. X          variable.    Then  it looks through a list of predefined standard
  332. X          directories which vary  from  system to system.  Finally, failing
  333. X          all  of  these,  it looks in the current directory.  This is also
  334. X          the same method EMACS uses to  look  up any files to execute, and
  335. X          to find it's help file EMACS.HLP.
  336. X
  337. X                  On  computers  that  call  up  EMACS via a  command  line
  338. X          process, such as MSDOS and  UNIX, there are different things that
  339. X          can  be  added  to  the  command  line  to  control the way EMACS
  340. X          operates. These can be switches,  which are a dash ('-') followed
  341. X          by a letter, and  possible  other  parameters,  or a startup file
  342. X          specifier, which is an at sign '@' followed by a file name.
  343. X
  344. X          @<file>        This causes the named file to be  executed instead
  345. X                         of  the standard emacs.rc file before emacs  reads
  346. X                         in any other files.  More than one of these can be
  347. X                         placed on  the  command  line,  and  they  will be
  348. X                         executed in the order that they appear.
  349. X
  350. X          -A             This flag causes emacs  to  automatically  run the
  351. X                         startup file "error.cmd" instead of emacs.rc. This
  352. X                         is  used  by  various   C   compilers   for  error
  353. X                         processing (for example, Mark Williams C).
  354. X
  355. X          -E             The following source files on the command line can
  356. X                         be edited (as opposed to being in VIEW mode). This
  357. X                         is mainly used to cancel  the  effects  of  the -v
  358. X                         switch used previously in the same command line.
  359. X
  360. X
  361. X
  362. X
  363. X          57
  364. X
  365. X
  366. X
  367. X
  368. X
  369. X
  370. X          MicroEMACS Reference Manual  MicroEMACS Command Line Switches and
  371. X                                                              Startup Files
  372. X
  373. X
  374. X          -G<num>        Upon entering EMACS, position  the  cursor  at the
  375. X                         <num> line of the first file.
  376. X
  377. X          -K<key>        This key  tells emacs to place the source files in
  378. X                         CRYPT  mode  and  read it in using  <key>  as  the
  379. X                         encryption key.  If no  key  is  listed immediatly
  380. X                         after the  -K switch, EMACS will prompt for a key,
  381. X                         and not echo it as it is typed.
  382. X
  383. X          -R             This  places EMACS in "restricted mode" where  any
  384. X                         commands allowing the user to  read  or  write any
  385. X                         files other than the ones  listed  on  the command
  386. X                         line are disabled.  Also all commands allowing the
  387. X                         user access to  the operating system are disabled.
  388. X                         This  makes  EMACS  very   useful   as   a  "safe"
  389. X                         environment for use within other  applications and
  390. X                         especially used as a  remote  editor  for a BBS or
  391. X                         electronic bulletin board system.
  392. X
  393. X          -S<string>     After EMACS is started, it  automatically searches
  394. X                         for <string> in the first source file.
  395. X
  396. X          -V             This tells EMACS that  all  the  following sources
  397. X                         files on the  command  line should be in VIEW mode
  398. X                         to prevent any changes being made to them.
  399. X
  400. X
  401. X
  402. X
  403. X
  404. X
  405. X
  406. X
  407. X
  408. X
  409. X
  410. X
  411. X
  412. X
  413. X
  414. X
  415. X
  416. X
  417. X
  418. X
  419. X
  420. X
  421. X
  422. X
  423. X
  424. X
  425. X
  426. X
  427. X
  428. X
  429. X                                                                         58
  430. X
  431. X
  432. X
  433. X
  434. X
  435. X
  436. X          MicroEMACS commands                   MicroEMACS Reference Manual
  437. X
  438. X
  439. X
  440. X
  441. X
  442. X
  443. X
  444. X
  445. X                                     Appendix B
  446. X
  447. X                                 MicroEMACS commands
  448. X
  449. X
  450. X                  Below  is  a  complete list of the commands in EMACS, the
  451. X          keys normally used to do the command, and what the  command does.
  452. X          Remember, on some computers there  may also be additional ways of
  453. X          using  a  command  (cursor  keys  and special function  keys  for
  454. X          example).
  455. X
  456. X          Command                         Binding         Meaning
  457. X          abort-command            ^G     This allows the user to abort out of any
  458. X                                          command that is waiting for input
  459. X
  460. X          add-mode                 ^X-M   Add a mode to the current buffer
  461. X
  462. X          add-global-mode          M-M    Add a global mode for all new buffers
  463. X
  464. X          apropos                  M-A    List out commands whose name contains
  465. X                                          the string specified
  466. X
  467. X          backward-character       ^B     Move one character to the left
  468. X
  469. X          begin-macro              ^X-(   Begin recording a keyboard macro
  470. X
  471. X          beginning-of-file        M-<    Move to the beginning of the file in
  472. X                                          the current buffer
  473. X
  474. X          beginning-of-line        ^A     Move to the beginning of the current line
  475. X
  476. X          bind-to-key              M-K    Bind a key to a function
  477. X
  478. X          buffer-position          ^X-=   List the position of the cursor in the
  479. X                                          current window on the command line
  480. X
  481. X          case-region-lower        ^X-^L  Make a marked region all lower case
  482. X
  483. X          case-region-upper        ^X-^U  Make a marked region all upper case
  484. X
  485. X          case-word-capitalize     M-C    Capitalize the following word
  486. X
  487. X          case-word-lower          M-L    Lower case the following word
  488. X
  489. X          case-word-upper          M-U    Upper case the following word
  490. X
  491. X          change-file-name         ^X-N   Change the name of the file in the
  492. X                                          current buffer
  493. X
  494. X
  495. X          59
  496. X
  497. X
  498. X
  499. X
  500. X
  501. X
  502. X          MicroEMACS Reference Manual                   MicroEMACS commands
  503. X
  504. X
  505. X          change-screen-size       M-^S   Change the number of lines of the screen
  506. X                                          currently being used
  507. X
  508. X          change-screen-width      M-^T   Change the number of columns of the
  509. X                                          screen currently being used
  510. X
  511. X          clear-and-redraw         ^L     Clear the physical screen and redraw it
  512. X
  513. X          clear-message-line      (none)  Clear the command line
  514. X
  515. X          copy-region              M-W    Copy the currently marked region into
  516. X                                          the kill buffer
  517. X
  518. X          count-words              M-^C   Count how many words, lines and
  519. X                                          characters are in the current marked region
  520. X
  521. X          ctlx-prefix              ^X     Change the key used as the ^X prefix
  522. X
  523. X          delete-blank-lines       ^X-^O  Delete all blank lines around the cursor
  524. X
  525. X          delete-buffer            ^X-K   Delete a buffer which is not being
  526. X                                          currently displayed in a window
  527. X
  528. X          delete-mode              ^X-^M  Turn off a mode in the current buffer
  529. X
  530. X          delete-global-mode       M-^M   Turn off a global mode
  531. X
  532. X          delete-next-character    ^D     Delete the character following the cursor
  533. X
  534. X          delete-next-word         M-D    Delete the word following the cursor
  535. X
  536. X          delete-other-windows     ^X-1   Make the current window cover the entire
  537. X                                          screen
  538. X
  539. X          delete-previous-character^H     Delete the character to the left of the
  540. X                                          cursor
  541. X
  542. X          delete-previous-word     M-^H   Delete the word to the left of the cursor
  543. X
  544. X          delete-window            ^X-0   Remove the current window from the screen
  545. X
  546. X          describe-bindings       (none)  Make a list of all legal commands
  547. X
  548. X          describe-key             ^X-?   Describe what command is bound to a
  549. X                                          keystroke sequence
  550. X
  551. X          detab-line               ^X-^D  Change all tabs in a line to the
  552. X                                          equivelant spaces
  553. X
  554. X          end-macro                ^X-)   stop recording a keyboard macro
  555. X
  556. X          end-of-file              M->    Move cursor to the end of the current
  557. X                                          buffer
  558. X
  559. X
  560. X
  561. X                                                                         60
  562. X
  563. X
  564. X
  565. X
  566. X
  567. X
  568. X          MicroEMACS commands                   MicroEMACS Reference Manual
  569. X
  570. X
  571. X          end-of-line              ^E     Move to the end of the current line
  572. X
  573. X          entab-line               ^X-^E  Change multiple spaces to tabs where
  574. X                                          possible
  575. X
  576. X          exchange-point-and-mark  ^X-^X  Move cursor to the last marked spot,
  577. X                                          make the original position be marked
  578. X
  579. X          execute-buffer          (none)  Execute a buffer as a macro
  580. X
  581. X          execute-command-line    (none)  Execute a line typed on the command
  582. X                                          line as a macro command
  583. X
  584. X          execute-file             FNB    Execute a file as a macro
  585. X
  586. X          execute-macro            ^X-E   Execute the keyboard macro (play back
  587. X                                          the recorded keystrokes)
  588. X          execute-macro-<n>       (none)  Execute numbered macro <N> where <N> is
  589. X                                          an integer from 1 to 40
  590. X
  591. X          execute-named-command    M-X    Execute a command by name
  592. X
  593. X          execute-procedure        M-^E   Execute a procedure by name
  594. X
  595. X          execute-program         ^X-$    Execute a program directly (not through
  596. X                                          an intervening shell)
  597. X
  598. X          exit-emacs               ^X-^C  Exit EMACS. If there are unwritten,
  599. X                                          changed buffers EMACS will ask to confirm
  600. X
  601. X          fill-paragraph           M-Q    Fill the current paragraph
  602. X
  603. X          filter-buffer            ^X-#   Filter the current buffer through an
  604. X                                          external filter
  605. X
  606. X          find-file                ^X-^F  Find a file to edit in the current window
  607. X
  608. X          forward-character        ^F     Move cursor one character to the right
  609. X
  610. X          goto-line                M-G    Goto a numbered line
  611. X
  612. X          goto-matching-fence      M-^F   Goto the matching fence
  613. X
  614. X          grow-window              ^X-^   Make the current window larger
  615. X
  616. X          handle-tab               ^I     Insert a tab or set tab stops
  617. X
  618. X          hunt-forward             FN=    Hunt for the next match of the last
  619. X                                          search string
  620. X
  621. X          hunt-backward            FN>    Hunt for the last match of the last
  622. X                                          search string
  623. X
  624. X          help                     M-?    Read EMACS.HLP into a buffer and display it
  625. X
  626. X
  627. X          61
  628. X
  629. X
  630. X
  631. X
  632. X
  633. X
  634. X          MicroEMACS Reference Manual                   MicroEMACS commands
  635. X
  636. X
  637. X          i-shell                  ^X-C   Shell up to a new command processor
  638. X
  639. X          incremental-search       ^X-S   Search for a string, incrementally
  640. X
  641. X          insert-file              ^X-^I  insert a file at the cursor in the
  642. X                                          current file
  643. X
  644. X          insert-space             ^C     Insert a space to the right of the cursor
  645. X
  646. X          insert-string           (none)  Insert a string at the cursor
  647. X
  648. X          kill-paragraph           M-^W   Delete the current paragraph
  649. X
  650. X          kill-region              ^W     Delete the current marked region, moving
  651. X                                          it to the kill buffer
  652. X
  653. X          kill-to-end-of-line      ^K     Delete the rest of the current line
  654. X
  655. X          list-buffers             ^X-^B  List all existing buffers
  656. X
  657. X          meta-prefix              <ESC>  Key used to precede all META commands
  658. X
  659. X          move-window-down         ^X-^N  Move all the lines in the current window
  660. X                                          down
  661. X
  662. X          move-window-up           ^X-^P  Move all the lines in the current window up
  663. X
  664. X          name-buffer              M-^N   Change the name of the current buffer
  665. X
  666. X          newline                  ^M     Insert a <NL> at the cursor
  667. X
  668. X          newline-and-indent       ^J     Insert a <NL> at the cursor and indent
  669. X                                          the new line the same as the preceeding
  670. X          line
  671. X
  672. X          next-buffer              ^X-X   Bring the next buffer in the list into
  673. X                                          the current window
  674. X
  675. X          next-line                ^N     Move the cursor down one line
  676. X
  677. X          next-page                ^V     Move the cursor down one page
  678. X
  679. X          next-paragraph           M-N    Move cursor to the next paragraph
  680. X
  681. X          next-window              ^X-O   Move cursor to the next window
  682. X
  683. X          next-word                M-F    Move cursor to the beginning of the
  684. X                                          next word
  685. X
  686. X          nop                      M-FNC  Does nothing
  687. X
  688. X          open-line                ^O     Open a line at the cursor
  689. X
  690. X          overwrite-string        (none)  Overwrite a string at the cursor
  691. X
  692. X
  693. X                                                                         62
  694. X
  695. X
  696. X
  697. X
  698. X
  699. X
  700. X          MicroEMACS commands                   MicroEMACS Reference Manual
  701. X
  702. X
  703. X          pipe-command             ^X-@   Execute an external command and place
  704. X                                          its output in a buffer
  705. X
  706. X          previous-line            ^P     Move cursor up one line
  707. X
  708. X          previous-page            ^Z     Move cursor up one page
  709. X
  710. X          previous-paragraph       M-P    Move back one paragraph
  711. X
  712. X          previous-window          ^X-P   Move the cursor to the last window
  713. X
  714. X          previous-word            M-B    Move the cursor to the beginning of the
  715. X                                          word to the left of the cursor
  716. X
  717. X          query-replace-string     M-^R   Replace all of one string with another
  718. X                                          string, interactively querying the user
  719. X
  720. X          quick-exit               M-Z    Exit EMACS, writing out all changed buffers
  721. X
  722. X          quote-character          ^Q     Insert the next character literally
  723. X
  724. X          read-file                ^X-^R  Read a file into the current buffer
  725. X
  726. X          redraw-display           M-^L   Redraw the display, centering the
  727. X                                          current line
  728. X
  729. X          resize-window            ^X-W   Change the number of lines in the
  730. X                                          current window
  731. X
  732. X          restore-window          (none)  Move cursor to the last saved window
  733. X
  734. X          replace-string           M-R    Replace all occurences of one string
  735. X                                          with another string from the cursor
  736. X                                          to the end of the buffer
  737. X
  738. X          reverse-incremental-search^X-R  Search backwards, incrementally
  739. X
  740. X          run                      M-^E   Execute a named procedure
  741. X
  742. X          save-file                ^X-^S  Save the current buffer if it is changed
  743. X
  744. X          save-window             (none)  Remember current window (to restore later)
  745. X
  746. X          scroll-next-up           M-^Z   Scroll the next window up
  747. X
  748. X          scroll-next-down         M-^V   Scroll the next window down
  749. X
  750. X          search-forward           ^S     Search for a string
  751. X
  752. X          search-reverse           ^R     Search backwards for a string
  753. X
  754. X          select-buffer            ^X-B   Select a buffer to display in the
  755. X                                          current window
  756. X
  757. X
  758. X
  759. X          63
  760. X
  761. X
  762. X
  763. X
  764. X
  765. X
  766. X          MicroEMACS Reference Manual                   MicroEMACS commands
  767. X
  768. X
  769. X          set                      ^X-A   Set a variable to a value
  770. X
  771. X          set-encryption-key       M-E    Set the encryption key of the current
  772. X                                          buffer
  773. X
  774. X          set-fill-column          ^X-F   Set the current fill column
  775. X
  776. X          set-mark                        Set the mark
  777. X
  778. X          shell-command            ^X-!   Causes an external shell to execute
  779. X                                          a command
  780. X
  781. X          shrink-window            ^X-^Z  Make the current window smaller
  782. X
  783. X          split-current-window     ^X-2   Split the current window in two
  784. X
  785. X          store-macro             (none)  Store the following macro lines to a
  786. X                                          numbered macro
  787. X
  788. X          store-procedure         (none)  Store the following macro lines to a
  789. X                                          named procedure
  790. X
  791. X          transpose-characters     ^T     Transpose the character at the cursor
  792. X                                          with the character to the left
  793. X
  794. X          trim-line                ^X-^T  Trim any trailing whitespace from line
  795. X
  796. X          unbind-key               M-^K   Unbind a key from a function
  797. X
  798. X          universal-argument       ^U     Execute the following command 4 times
  799. X
  800. X          unmark-buffer            M-~    Unmark the current buffer (so it is
  801. X                                          no longer changed)
  802. X
  803. X          update-screen           (none)  Force a screen update during macro
  804. X                                          execution
  805. X
  806. X          view-file                ^X-^V  Find a file,and put it in view mode
  807. X
  808. X          wrap-word                M-FNW  Wrap the current word, this is an
  809. X                                          internal function
  810. X
  811. X          write-file               ^X-^W  Write the current buffer under a new
  812. X                                          file name
  813. X
  814. X          write-message           (none)  Display a string on the command line
  815. X
  816. X          yank                     ^Y     yank the kill buffer into the current
  817. X                                          buffer at the cursor
  818. X
  819. X
  820. X
  821. X
  822. X
  823. X
  824. X
  825. X                                                                         64
  826. X
  827. X
  828. X
  829. X
  830. X
  831. X
  832. X          MicroEMACS Bindings                   MicroEMACS Reference Manual
  833. X
  834. X
  835. X
  836. X
  837. X
  838. X
  839. X
  840. X
  841. X                                     Appendix C
  842. X
  843. X                                 MicroEMACS Bindings
  844. X
  845. X
  846. X                  Below  is a complete list of the  key  bindings  used  in
  847. X          MicroEMACS. This can  be  used  as  a  wall  chart  reference for
  848. X          MicroEMACS commands.
  849. X
  850. X                           Default Key Bindings for MicroEmacs 3.9e
  851. X
  852. X           ^A   Move to start of line           ESC A   Apropos (list some commands)
  853. X           ^B   Move backward by characters     ESC B   Backup by words
  854. X           ^C   Insert space                    ESC C   Initial capitalize word
  855. X           ^D   Forward delete                  ESC D   Delete forward word
  856. X           ^E   Goto end of line                ESC E   Reset Encryption Key
  857. X           ^F   Move forward by characters      ESC F   Advance by words
  858. X           ^G   Abort out of things             ESC G   Go to a line
  859. X           ^H   Backward delete
  860. X           ^I   Insert tab/Set tab stops
  861. X           ^J   Insert <NL>, then indent
  862. X           ^K   Kill forward                    ESC K   Bind Key to function
  863. X           ^L   Refresh the screen              ESC L   Lower case word
  864. X           ^M   Insert <NL>                     ESC M   Add global mode
  865. X           ^N   Move forward by lines           ESC N   Goto End paragraph
  866. X           ^O   Open up a blank line
  867. X           ^P   Move backward by lines          ESC P   Goto Begining of paragraph
  868. X           ^Q   Insert literal                  ESC Q   Fill current paragraph
  869. X           ^R   Search backwards                ESC R   Search and replace
  870. X           ^S   Search forward
  871. X           ^T   Transpose characters
  872. X           ^U   Repeat command four times       ESC U   Upper case word
  873. X           ^V   Move forward by pages           ESC V   Move backward by pages
  874. X           ^W   Kill region                     ESC W   Copy region to kill buffer
  875. X           ^Y   Yank back from killbuffer       ESC X   Execute named command
  876. X           ^Z   Move backward by pages          ESC Z   Save all buffers and exit
  877. X
  878. X           ESC ^C   Count words in region       ESC ~   Unmark current buffer
  879. X           ESC ^E   Execute named procedure
  880. X           ESC ^F   Goto matching fence         ESC !   Reposition window
  881. X           ESC ^H   Delete backward word        ESC <   Move to start of buffer
  882. X           ESC ^K   Unbind Key from function    ESC >   Move to end of buffer
  883. X           ESC ^L   Reposition window           ESC .   Set mark
  884. X           ESC ^M   Delete global mode          ESC space    Set mark
  885. X           ESC ^N   Rename current buffer       ESC rubout   Delete backward word
  886. X           ESC ^R   Search & replace w/query        rubout   Backward delete
  887. X           ESC ^S   Change screen rows
  888. X           ESC ^T   Change screen columns
  889. X
  890. X
  891. X          65
  892. X
  893. X
  894. X
  895. X
  896. X
  897. X
  898. X          MicroEMACS Reference Manual                   MicroEMACS Bindings
  899. X
  900. X
  901. X           ESC ^V   Scroll next window down
  902. X           ESC ^W   Delete Paragraph
  903. X           ESC ^Z   Scroll next window up
  904. X
  905. X           ^X ?   Describe a key             ^X !   Run 1 command in a shell
  906. X           ^X =   Show the cursor position   ^X @    Pipe shell command to buffer
  907. X           ^X ^   Enlarge display window     ^X #   Filter buffer thru shell filter
  908. X           ^X 0   Delete current window      ^X $   Execute an external program
  909. X           ^X 1   Delete other windows       ^X (   Begin macro
  910. X           ^X 2   Split current window       ^X )   End macro
  911. X                                             ^X A   Set variable value
  912. X           ^X ^B   Display buffer list       ^X B   Switch a window to a buffer
  913. X           ^X ^C   Exit MicroEMACS           ^X C   Start a new command processor
  914. X           ^X ^D   Detab line                ^X D   Suspend MicroEMACS (BSD4.2 only)
  915. X           ^X ^E   Entab line                ^X E   Execute macro
  916. X           ^X ^F   Find file                 ^X F   Set fill column
  917. X           ^X ^I   Insert file
  918. X                                             ^X K   Delete buffer
  919. X           ^X ^L   Lower case region
  920. X           ^X ^M   Delete Mode               ^X M   Add a mode
  921. X           ^X ^N   Move window down          ^X N   Rename current filename
  922. X           ^X ^O   Delete blank lines        ^X O   Move to the next window
  923. X           ^X ^P   Move window up            ^X P   Move to the previous window
  924. X           ^X ^R   Get a file from disk      ^X R   Incremental reverse search
  925. X           ^X ^S   Save current file         ^X S   Incremental forward search
  926. X           ^X ^T   Trim line                 (Incremental search
  927. X           ^X ^U   Upper case region                not always availible)
  928. X           ^X ^V   View file
  929. X           ^X ^W   Write a file to disk      ^X W   resize Window
  930. X           ^X ^X   Swap "." and mark         ^X X   Use next buffer
  931. X           ^X ^Z   Shrink window             ^X Z   Enlarge display window
  932. X
  933. X          Usable Modes
  934. X          WRAP     Lines going past right margin "wrap" to a new line
  935. X          VIEW     Read-Only mode where no modifications are allowed
  936. X          CMODE    Change behavior of some commands to work better with C
  937. X          EXACT    Exact case matching on search strings
  938. X          OVER     Overwrite typed characters instead of inserting them
  939. X          CRYPT    Current buffer will be encrypted on write, decrypted on read
  940. X          MAGIC    Use regular expression matching in searches
  941. X          ASAVE    Save the file every 256 inserted characters
  942. X
  943. X          WHITE/CYAN/MAGENTA/YELLOW/BLUE/RED/GREEN/BLACK  Sets foreground color
  944. X          white/cyan/magenta/yellow/blue/red/green/black  Sets background color
  945. X
  946. X
  947. X
  948. X
  949. X
  950. X
  951. X
  952. X
  953. X
  954. X
  955. X
  956. X
  957. X                                                                         66
  958. X
  959. X
  960. X
  961. X
  962. X
  963. X
  964. X          Supported machines                    MicroEMACS Reference Manual
  965. X
  966. X
  967. X
  968. X
  969. X
  970. X
  971. X
  972. X
  973. X                                     Appendix D
  974. X
  975. X                                 Supported machines
  976. X
  977. X
  978. X                  The following table  lists all the hardware/compilers for
  979. X          which I currently support MicroEMACS.  This is  not  exclusive of
  980. X          all machines which MicroEMACS will run on, but I have  either run
  981. X          it myself, or had a first hand report of it running.
  982. X
  983. X          Hardware        OS              Compiler        Comments
  984. X          VAX 780         UNIX V5         native
  985. X                          UNIX V7         native
  986. X                          BSD 4.2         native          job control supported
  987. X                          *VMS            native          only some terminals
  988. X                                                          supported
  989. X
  990. X          NCR Tower       UNIX V5         native
  991. X
  992. X          Fortune 32:16   UNIX V7         native
  993. X
  994. X          IBM-PC          MSDOS           LATTICE 2.15    Large CODE/Large DATA
  995. X                           2.0 & 3.2      AZTEC 3.4e      Small CODE/Large DATA
  996. X                                          TURBO C v1.00   LARGE memory model
  997. X                                          *MSC 4.0
  998. X                                          *MWC 86
  999. X                          SCO XENIX       native
  1000. X
  1001. X          HP150           MSDOS           Lattice 2.15    Function key labels
  1002. X                                                          for the touch screen
  1003. X
  1004. X          HP110           MSDOS           Lattice 2.15
  1005. X                                          Aztec 3.4e
  1006. X
  1007. X          *Data General 10
  1008. X                          MSDOS           Lattice 2.15
  1009. X
  1010. X          *Texas Instruments Professional
  1011. X                          MSDOS           Lattice 2.15
  1012. X
  1013. X          Amiga           Intuition       Lattice 3.03    no mouse or menus yet
  1014. X                                          *Aztec 3
  1015. X
  1016. X          ST520           TOS             Mark Williams C Spawns under MSH
  1017. X                                          Lattice 3.10    (no shell commands)
  1018. X
  1019. X          Systems to be supported (ie some code is already written:)
  1020. X          Macintosh       Finder 5.0      Aztec
  1021. X
  1022. X
  1023. X          67
  1024. X
  1025. X
  1026. X
  1027. X
  1028. X
  1029. X
  1030. X          MicroEMACS Reference Manual                    Supported machines
  1031. X
  1032. X
  1033. X          *means that I do not own or have access to the listed compiler and/or
  1034. X           machine and must rely upon others to help support it.
  1035. X
  1036. X
  1037. X
  1038. X
  1039. X
  1040. X
  1041. X
  1042. X
  1043. X
  1044. X
  1045. X
  1046. X
  1047. X
  1048. X
  1049. X
  1050. X
  1051. X
  1052. X
  1053. X
  1054. X
  1055. X
  1056. X
  1057. X
  1058. X
  1059. X
  1060. X
  1061. X
  1062. X
  1063. X
  1064. X
  1065. X
  1066. X
  1067. X
  1068. X
  1069. X
  1070. X
  1071. X
  1072. X
  1073. X
  1074. X
  1075. X
  1076. X
  1077. X
  1078. X
  1079. X
  1080. X
  1081. X
  1082. X
  1083. X
  1084. X
  1085. X
  1086. X
  1087. X
  1088. X
  1089. X                                                                         68
  1090. X
  1091. X
  1092. X
  1093. X
  1094. X
  1095. X
  1096. X          Machine Dependent Notes               MicroEMACS Reference Manual
  1097. X
  1098. X
  1099. X
  1100. X
  1101. X
  1102. X
  1103. X
  1104. X
  1105. X                                     Appendix E
  1106. X
  1107. X                               Machine Dependent Notes
  1108. X
  1109. X
  1110. X                  This  appendix  lists  some  notes specific to individual
  1111. X          implementations of MicroEMACS.   Every  attempt  has been made to
  1112. X          allow EMACS to  be  identical  on  all machines, but we have also
  1113. X          tried to take advantage of  function keys, cursor keys, mice, and
  1114. X          special screen modes where possible.
  1115. X
  1116. X
  1117. X          E.1  IBM-PC/XT/AT and its clones
  1118. X
  1119. X
  1120. X                  The  IBM-PC  family  of  computers  is  supported  with a
  1121. X          variety of different display adapters.    EMACS  will  attempt to
  1122. X          discover what adapter is connected  and use the proper driver for
  1123. X          it. Below is a list of the currently supported video adapters:
  1124. X
  1125. X          Adapter                         $sres           Original mode used
  1126. X          Monochrome Graphics Adapter     MONO            MONO
  1127. X          Color Graphics Adapter          CGA             CGA
  1128. X          Enhanced Graphics Adapter       EGA             CGA
  1129. X
  1130. X                  EMACS also takes advantege of various  function  keys and
  1131. X          the  keys  on  the keypad on an IBM-PC.  The  function  keys  are
  1132. X          initially not bound to  any  particular  functions (except by the
  1133. X          emacs.rc startup file), but  the  keypad  keys  do default to the
  1134. X          following:
  1135. X
  1136. X          Keypad key      Function
  1137. X          Home            beginning-of-file
  1138. X          CSRS UP         previous-line
  1139. X          Pg Up           previous-page
  1140. X          CSRS LEFT       backward-character
  1141. X          CSRS RIGHT      forward-character
  1142. X          End             end-of-file
  1143. X          CSRS DOWN       next-line
  1144. X          Pg Dn           Next-page
  1145. X
  1146. X                  All these  special keys are indicated in EMACS macroes by
  1147. X          use  of  the  FN prefix.  Below is a list of many of the keys and
  1148. X          the  codes used to specify them.  Also the codes may be gotten by
  1149. X          using the describe-key (^X ?) command on the suspect key.
  1150. X
  1151. X
  1152. X
  1153. X
  1154. X
  1155. X          69
  1156. X
  1157. X
  1158. X
  1159. X
  1160. X
  1161. X
  1162. X          MicroEMACS Reference Manual               Machine Dependent Notes
  1163. X
  1164. X
  1165. X                                  IBM PC function keys in MicroEmacs
  1166. X
  1167. X                  function        Function        ^function       Alt-function
  1168. X           f1)      FN;             FNT             FN^             FNh
  1169. X           f2)      FN<             FNU             FN_             FNi
  1170. X           f3)      FN=             FNV             FN`             FNj
  1171. X           f4)      FN>             FNW             FNa             FNk
  1172. X           f5)      FN?             FNX             FNb             FNl
  1173. X           f6)      FN@             FNY             FNc             FNm
  1174. X           f7)      FNA             FNZ             FNd             FNn
  1175. X           f8)      FNB             FN[             FNe             FNo
  1176. X           f9)      FNC             FN\             FNf             FNp
  1177. X          f10)      FND             FN]             FNg             FNq
  1178. X
  1179. X          home)     FNG                             FNw
  1180. X          CsUp)     FNH
  1181. X          PgUp)     FNI                             FNa(umlaut) {Alt 132}
  1182. X          CsLf)     FNK                             FNs
  1183. X           5  )
  1184. X          CsRt)     FNM                             FNt
  1185. X           End)     FNO                             FNu
  1186. X          CsDn)     FNP
  1187. X          PgDn)     FNQ                             FNv
  1188. X           Ins)     FNR
  1189. X           Del)     FNS
  1190. X
  1191. X
  1192. X
  1193. X
  1194. X
  1195. X
  1196. X
  1197. X
  1198. X
  1199. X
  1200. X
  1201. X
  1202. X
  1203. X
  1204. X
  1205. X
  1206. X
  1207. X
  1208. X
  1209. X
  1210. X
  1211. X
  1212. X
  1213. X
  1214. X
  1215. X
  1216. X
  1217. X
  1218. X
  1219. X
  1220. X
  1221. X                                                                         70
  1222. X
  1223. X
  1224. X
  1225. X
  1226. X
  1227. X
  1228. X          Machine Dependent Notes               MicroEMACS Reference Manual
  1229. X
  1230. X
  1231. X
  1232. X
  1233. X          E.2  HP 150
  1234. X
  1235. X
  1236. X                  This machine  from Hewlett Packard is very unusual for an
  1237. X          MSDOS  machine.    It has a touch screen and is very function key
  1238. X          oriented.   An additional command, label-function-key allows  you
  1239. X          to place labels on the on screen function key labels.   A numeric
  1240. X          argument indicates  which  function  key  to  label  (one through
  1241. X          eight) and then the  program  prompts  for  a 16 character label,
  1242. X          which  will  be  used as two lines of eight characters.  To label
  1243. X          function key three with "save file" from a macro, you would use:
  1244. X
  1245. X          3 label-function-key "save              file"
  1246. X
  1247. X                  Notice the 4 spaces after  "save".  This forces "file" to
  1248. X          begin on the second line of the label.
  1249. X
  1250. X
  1251. X
  1252. X
  1253. X
  1254. X
  1255. X
  1256. X
  1257. X
  1258. X
  1259. X
  1260. X
  1261. X
  1262. X
  1263. X
  1264. X
  1265. X
  1266. X
  1267. X
  1268. X
  1269. X
  1270. X
  1271. X
  1272. X
  1273. X
  1274. X
  1275. X
  1276. X
  1277. X
  1278. X
  1279. X
  1280. X
  1281. X
  1282. X
  1283. X
  1284. X
  1285. X
  1286. X
  1287. X          71
  1288. X
  1289. X
  1290. X
  1291. X
  1292. X
  1293. X
  1294. X          MicroEMACS Reference Manual               Machine Dependent Notes
  1295. X
  1296. X
  1297. X
  1298. X
  1299. X          E.3  Atari 520/1040ST
  1300. X
  1301. X
  1302. X                  The ATARI ST family of computers have a dual personality.
  1303. X          They  may  use  either a monochrome  or  a  color  screen.  EMACS
  1304. X          supports two screen resolutions on each monitor.
  1305. X
  1306. X          Monitor $sres size #color $palette format
  1307. X          Color   LOW     40x25   16      000111222333444555666777
  1308. X                  MEDIUM  80x25   4       000111222333
  1309. X          Mono    HIGH    80x25   2       000
  1310. X                  DENSE   80x50   2       000
  1311. X
  1312. X                  The $palette environment variable can be  used  to change
  1313. X          what  color is associated with each color name.    With  a  color
  1314. X          monitor, each group of three  digits  indicates  an  octal number
  1315. X          specifying the RED, GREEN and BLUE levels of that  color.    Each
  1316. X          color  digit  can  vary from 0 to 7.  For  example,  the  initial
  1317. X          setting of $palette in LOW resolution is:
  1318. X
  1319. X                  000700070770007707077777
  1320. X
  1321. X                  which broken up is:
  1322. X
  1323. X                  000 700 070 770 007 707 077 777
  1324. X
  1325. X                  which means:
  1326. X
  1327. X                  000     Black
  1328. X                  700     Red
  1329. X                  070     Green
  1330. X                  770     Yellow
  1331. X                  007     Blue
  1332. X                  707     Magenta
  1333. X                  077     Cyan
  1334. X                  777     White
  1335. X
  1336. X                  Also the mouse  generates  FN prefix codes when moved, or
  1337. X          when one of the two buttons is pressed. Initially the movement of
  1338. X          the mouse is bound to movement of the cursor, and the  left mouse
  1339. X          button generates a  set-mark  (M-space) command.  The cursor keys
  1340. X          and the function keys are bound similarly to to IBM-PC.
  1341. X
  1342. X                  Files  generated  by  EMACS on the ATARI ST have a single
  1343. X          return  character at the end of each  line,  unlike  the  desktop
  1344. X          files which want to have tow returns. This makes it display files
  1345. X          strangly  from  GEM's  [SHOW] option, but makes the files port to
  1346. X          other computers much nicer.
  1347. X
  1348. X                  Currently,  when  operating  under  the Mark Williams MSH
  1349. X          program, EMACS  can shell out and perform external commands. This
  1350. X
  1351. X
  1352. X
  1353. X                                                                         72
  1354. X
  1355. X
  1356. X
  1357. X
  1358. X
  1359. X
  1360. X          Machine Dependent Notes               MicroEMACS Reference Manual
  1361. X
  1362. X
  1363. X          capability will be added later  for the Beckmeyer shell and under
  1364. X          GEMDOS.
  1365. X
  1366. X
  1367. X
  1368. X
  1369. X
  1370. X
  1371. X
  1372. X
  1373. X
  1374. X
  1375. X
  1376. X
  1377. X
  1378. X
  1379. X
  1380. X
  1381. X
  1382. X
  1383. X
  1384. X
  1385. X
  1386. X
  1387. X
  1388. X
  1389. X
  1390. X
  1391. X
  1392. X
  1393. X
  1394. X
  1395. X
  1396. X
  1397. X
  1398. X
  1399. X
  1400. X
  1401. X
  1402. X
  1403. X
  1404. X
  1405. X
  1406. X
  1407. X
  1408. X
  1409. X
  1410. X
  1411. X
  1412. X
  1413. X
  1414. X
  1415. X
  1416. X
  1417. X
  1418. X
  1419. X          73
  1420. X
  1421. X
  1422. X
  1423. X
  1424. X
  1425. X
  1426. X          MicroEMACS Reference Manual               Machine Dependent Notes
  1427. X
  1428. X
  1429. X
  1430. X
  1431. X          E.4  Amiga 1000
  1432. X
  1433. X
  1434. X                  The Commodore AMIGA 1000 version of  MicroEMACS  does not
  1435. X          have extensive support of the mouse  or  of pull down menus as of
  1436. X          yet.  It  does however come up in a window, and it is possible to
  1437. X          re-size it to run  in  different sized windows.  The M-^S change-
  1438. X          screen-size takes its numeric argument as the new number of lines
  1439. X          for EMACS to use.    The  M-^T change-screen-width command allows
  1440. X          you to change the number of columns EMACS will use.  The defaults
  1441. X          for these are 23 lines and 77 characters across for a full screen
  1442. X          window.
  1443. X
  1444. X                           Note about Compiling MicroEMACS
  1445. X
  1446. X                       If you are compiling the sources  on  the AMIGA
  1447. X               to produce an  executable  image, and you are using the
  1448. X               Lattice compiler,  be  sure  to  give  the  CLI command
  1449. X               'STACK  40000'  before   compiling  to  make  sure  the
  1450. X               compiler has  sufficient  stack  space  to successfully
  1451. X               complete compiliation.
  1452. X
  1453. X
  1454. X
  1455. X
  1456. X
  1457. X
  1458. X
  1459. X
  1460. X
  1461. X
  1462. X
  1463. X
  1464. X
  1465. X
  1466. X
  1467. X
  1468. X
  1469. X
  1470. X
  1471. X
  1472. X
  1473. X
  1474. X
  1475. X
  1476. X
  1477. X
  1478. X
  1479. X
  1480. X
  1481. X
  1482. X
  1483. X
  1484. X
  1485. X                                                                         74
  1486. X
  1487. X
  1488. X
  1489. X
  1490. X
  1491. X
  1492. X          Machine Dependent Notes               MicroEMACS Reference Manual
  1493. X
  1494. X
  1495. X
  1496. X
  1497. X          E.5  UNIX V5, V7, and BSD4.[23]
  1498. X
  1499. X
  1500. X                  MicroEMACS  under  UNIX  utilizes  the TERMCAP library to
  1501. X          provide machine independent screen  functions.    Make  sure that
  1502. X          termcap  is availible and properly set  on  your  account  before
  1503. X          attempting to use MicroEMACS.
  1504. X
  1505. X                  Under systems  which support job control, you can use the
  1506. X          ^X-D suspend-emacs command to place  EMACS  into  the background.
  1507. X          This carries a much smaller overhead than bringing up a new shell
  1508. X          under  EMACS.  EMACS will properly redraw  the  screen  when  you
  1509. X          bring it back to the foreground.
  1510. X
  1511. X                  If the symbol VT100 has been set to 1  in  the  estruct.h
  1512. X          options file, EMACS will recognize the key sequence <ESC>[ as the
  1513. X          lead in sequence for the FN function key prefix.
  1514. X
  1515. X                  With  the addition of some very machine/operating  system
  1516. X          specific  code,  EMACS  can  prevent  two  or  more  people  from
  1517. X          modifying  the  same  file at the same time. The upper level of a
  1518. X          set of functions to provide file locking exist in the source file
  1519. X          LOCK.C.  It  requires  two machine specific functions written and
  1520. X          linked into EMACS for it to operate properly.
  1521. X
  1522. X                  char *dolock(fname)
  1523. X
  1524. X                  char *fname;
  1525. X
  1526. X                  dolock() locks a file, preventing others from modifying it. If
  1527. X                  it succeeds, it returns NULL, otherwise it returns a pointer to
  1528. X                  a string in the form "LOCK ERROR: explaination".
  1529. X
  1530. X                  char *undolock(fname)
  1531. X
  1532. X                  char *fname;
  1533. X
  1534. X                  undolock() unlocks a file, allowing others to modifying it. If
  1535. X                  it succeeds, it returns NULL, otherwise it returns a pointer to
  1536. X                  a string in the form "LOCK ERROR: explaination".
  1537. X
  1538. X
  1539. X
  1540. X
  1541. X
  1542. X
  1543. X
  1544. X
  1545. X
  1546. X
  1547. X
  1548. X
  1549. X
  1550. X
  1551. X          75
  1552. X
  1553. X
  1554. X
  1555. X
  1556. X
  1557. X
  1558. X          MicroEMACS Reference Manual                            Mode Flags
  1559. X
  1560. X
  1561. X
  1562. X
  1563. X
  1564. X
  1565. X
  1566. X
  1567. X                                     Appendix F
  1568. X
  1569. X                                     Mode Flags
  1570. X
  1571. X
  1572. X                  The two environment variables, $cmode and $gmode, contain
  1573. X          a number the corresponds to the modes set for the  current buffer
  1574. X          and  the editor as a whole.  These are encoded as the sum of  the
  1575. X          following numbers for each of the possible modes:
  1576. X
  1577. X          WRAP      1             Word wrap
  1578. X          CMODE     2             C indentation and fence match
  1579. X          SPELL     4             Interactive spell checking (Not Implemented Yet)
  1580. X          EXACT     8             Exact matching for searches
  1581. X          VIEW     16             Read-only buffer
  1582. X          OVER     32             Overwrite mode
  1583. X          MAGIC    64             Regular expressions in search
  1584. X          CRYPT   128             Encrytion mode active
  1585. X          ASAVE   256             Auto-save mode
  1586. X
  1587. X                  So,  if  you  wished  to  set the current buffer to  have
  1588. X          CMODE, EXACT, and MAGIC on, and all the others off, you would add
  1589. X          up the values for those three, CMODE 2  +  EXACT 8  +  MAGIC 64 =
  1590. X          74, and use a statement like:
  1591. X
  1592. X                  set $cmode 74
  1593. X
  1594. X                  or, use the  binary  or operator to combine the different
  1595. X          modes:
  1596. X
  1597. X                  set $cmode &bor &bor 2 8 64
  1598. X
  1599. X          Internal Flags
  1600. X
  1601. X                  Some of the ways EMACS  controls  its  internal functions
  1602. X          can be modified by the value in the $gflags environment variable.
  1603. X          Each bit in  this  variable  will  be used to control a different
  1604. X          function.
  1605. X
  1606. X          GFFLAG          1       If this bit is set to zero, EMACS will not
  1607. X                                  automatically switch to the buffer of the
  1608. X                                  first file after executing the startup macros.
  1609. X
  1610. X
  1611. X
  1612. X
  1613. X
  1614. X
  1615. X
  1616. X
  1617. X                                                                         76
  1618. X
  1619. X
  1620. X
  1621. X
  1622. X
  1623. X
  1624. X          Index                                 MicroEMACS Reference Manual
  1625. X
  1626. X
  1627. X
  1628. X
  1629. X
  1630. X
  1631. X
  1632. X
  1633. X                                          Index
  1634. X
  1635. X
  1636. X                  .emacsrc 57                 delete-mode 27
  1637. X                  <NL> 14                     delete-next-
  1638. X                                                   character 9
  1639. X                  A                           delete-next-word 9
  1640. X                  add-global-mode 27          delete-previous-
  1641. X                  add-mode 3, 27                   character 8
  1642. X                  ASAVE mode 27               delete-previous-word
  1643. X                                                   9
  1644. X                  B                           detab-line 38
  1645. X                  backward-character 4
  1646. X                  BBS 58                      E
  1647. X                  begin-macro 43              emacs.rc 57
  1648. X                  beginning-of-file 4,        encryption 28
  1649. X                       9                      end-macro 43
  1650. X                  beginning-of-line 4         end-of-file 4
  1651. X                  buffer 5, 7, 24             end-of-line 4
  1652. X                                              entab-lines 38
  1653. X                  C                           error parsing 57
  1654. X                  case-region-lower 37        EXACT mode 29
  1655. X                  case-word-capitalize        execute-buffer 45
  1656. X                       37                     execute-file 45
  1657. X                  case-word-lower 37          execute-macro 43
  1658. X                  case-word-upper 37          execute-macro-<n> 45
  1659. X                  change-screen-size          execute-procedure 45
  1660. X                       74                     execute-program 40
  1661. X                  change-screen-width         exit-emacs 9
  1662. X                       74
  1663. X                  CMODE mode 28               F
  1664. X                  color 27                    file locking 75
  1665. X                  command.com 40              fill-paragraph 8, 36
  1666. X                  command line 18             fill column 31
  1667. X                  command processor 40        filter 40
  1668. X                  control-x 1                 find-file 19, 24
  1669. X                  control key 1               forward-character 4
  1670. X                  copy-region 12
  1671. X                  CRYPT mode 28, 58           G
  1672. X                  cshell 40                   grow-window 20
  1673. X                  cursor keys 4
  1674. X                                              H
  1675. X                  D                           handle-tab 38
  1676. X                  default string 15           Help File 57
  1677. X                  delete-blank-lines 9        HOME environment
  1678. X                  delete-buffer 25                 variable 57
  1679. X                  delete-global-mode
  1680. X                       27
  1681. X
  1682. X
  1683. X          77
  1684. X
  1685. X
  1686. X
  1687. X
  1688. X
  1689. X
  1690. X          MicroEMACS Reference Manual                                 Index
  1691. X
  1692. X
  1693. X                                              refresh-screen 21
  1694. X                  I                           replace-string 16,
  1695. X                  i-shell 41                       30
  1696. X                                              resize-window 20
  1697. X                  K                           restricted mode 58
  1698. X                  kill-region 11              run 45
  1699. X                  kill-to-end-of-line
  1700. X                       9                      S
  1701. X                  kill buffer 12              save-file 5
  1702. X                                              screen 7
  1703. X                  L                           scroll-next-down 19
  1704. X                  label-function-key          scroll-next-up 19
  1705. X                       71                     search-forward 14
  1706. X                  list-buffers 25, 27         search-reverse 15
  1707. X                                              select-buffer 24
  1708. X                  M                           set-encryption-key
  1709. X                  MAGIC mode 29                    28
  1710. X                  mark 11                     set-fill-column 36
  1711. X                  meta key 1                  set-mark 11
  1712. X                  mode line 2, 7              shell 40
  1713. X                  modes 3, 27                 shell-command 40
  1714. X                  move-window-down 19         shrink-window 20
  1715. X                  move-window-up 19           special keys 1
  1716. X                                              split-window 18
  1717. X                  N                           startup files 57
  1718. X                  newline 1                   store-procedure 45
  1719. X                  next-buffer 24              suspend-emacs 41, 75
  1720. X                  next-line 4                 switches 57
  1721. X                  next-paragraph 4
  1722. X                                              T
  1723. X                  O                           tab handling 38
  1724. X                  open-line 8                 termcap 75
  1725. X                  open-window 18              text window 2
  1726. X                  OVER mode 30
  1727. X                                              V
  1728. X                  P                           VIEW mode 31
  1729. X                  PATH environment
  1730. X                       variable 57            W
  1731. X                  pipe-command 40             window 7
  1732. X                  point 11                    windows 2, 18
  1733. X                  previous-line 4                Creating 18
  1734. X                  previous-paragraph 4           Deleting 19
  1735. X                  previous-window 18             Resizing 20
  1736. X                  previous-word 4             wrap-word 31
  1737. X                  procedures 45               WRAP mode 31
  1738. X                                              wrapping text 36
  1739. X                  Q                           write-file 5
  1740. X                  query-replace 16
  1741. X                  query-replace-string        Y
  1742. X                       16, 30                 yank 12
  1743. X
  1744. X                  R
  1745. X                  redraw-display 20
  1746. X
  1747. X
  1748. X
  1749. X                                                                         78
  1750. X
  1751. X
  1752. X
  1753. X
  1754. X
  1755. X
  1756. X
  1757. X
  1758. X
  1759. X
  1760. X
  1761. X
  1762. X                                   Table of Contents
  1763. X
  1764. X
  1765. X
  1766. X
  1767. X
  1768. X               Chapter 1  Basic Concepts                             1
  1769. X                  1.1  Keys and the Keyboard . . . . . . . . . . . . 1
  1770. X                  1.2  Getting Started . . . . . . . . . . . . . . . 1
  1771. X                  1.3  Parts and Pieces  . . . . . . . . . . . . . . 2
  1772. X                  1.4  Entering Text . . . . . . . . . . . . . . . . 3
  1773. X                  1.5  Basic cursor movement . . . . . . . . . . . . 3
  1774. X                  1.6  Saving your text  . . . . . . . . . . . . . . 5
  1775. X
  1776. X               Chapter 2  Basic Editing--Simple Insertions and
  1777. X                  Deletions                                          7
  1778. X                  2.1  A Word About Windows, Buffers, Screens, and
  1779. X                  Modes  . . . . . . . . . . . . . . . . . . . . . . 7
  1780. X                  2.2  Insertions  . . . . . . . . . . . . . . . . . 8
  1781. X                  2.3  Deletions . . . . . . . . . . . . . . . . . . 8
  1782. X
  1783. X               Chapter 3  Using Regions                             11
  1784. X                  3.1  Defining and Deleting a Region  . . . . . .  11
  1785. X                  3.2  Yanking a Region  . . . . . . . . . . . . .  12
  1786. X
  1787. X               Chapter 4  Search and Replace                        14
  1788. X                  4.1  Forward Search  . . . . . . . . . . . . . .  14
  1789. X                  4.2  Exact Searches  . . . . . . . . . . . . . .  15
  1790. X                  4.3  Backward Search . . . . . . . . . . . . . .  15
  1791. X                  4.4  Searching and Replacing . . . . . . . . . .  15
  1792. X                  4.5  Query-Replace . . . . . . . . . . . . . . .  16
  1793. X
  1794. X               Chapter 5  Windows                                   18
  1795. X                  5.1  Creating Windows  . . . . . . . . . . . . .  18
  1796. X                  5.2  Deleting Windows  . . . . . . . . . . . . .  19
  1797. X                  5.3  Resizing Windows  . . . . . . . . . . . . .  20
  1798. X                  5.4  Repositioning within a Window . . . . . . .  20
  1799. X
  1800. X               Chapter 6  Buffers                                   24
  1801. X
  1802. X               Chapter 7  Modes                                     27
  1803. X                  7.1  ASAVE mode  . . . . . . . . . . . . . . . .  27
  1804. X                  7.2  CMODE mode  . . . . . . . . . . . . . . . .  28
  1805. X                  7.3  CRYPT mode  . . . . . . . . . . . . . . . .  28
  1806. X                  7.4  EXACT mode  . . . . . . . . . . . . . . . .  29
  1807. X                  7.5  MAGIC mode  . . . . . . . . . . . . . . . .  29
  1808. X                  7.6  OVER mode . . . . . . . . . . . . . . . . .  30
  1809. X                  7.7  WRAP mode . . . . . . . . . . . . . . . . .  31
  1810. X                  7.8  VIEW mode . . . . . . . . . . . . . . . . .  31
  1811. X
  1812. X
  1813. X
  1814. X
  1815. X                                          i
  1816. X
  1817. X
  1818. X
  1819. X
  1820. X
  1821. X
  1822. X
  1823. X
  1824. X
  1825. X               Chapter 8  Files                                     33
  1826. X
  1827. X               Chapter 9  Screen Formatting                         36
  1828. X                  9.1  Wrapping Text . . . . . . . . . . . . . . .  36
  1829. X                  9.2  Reformatting Paragraphs . . . . . . . . . .  36
  1830. X                  9.3  Changing Case . . . . . . . . . . . . . . .  37
  1831. X                  9.4  Tabs  . . . . . . . . . . . . . . . . . . .  37
  1832. X
  1833. X               Chapter 10  Access to the Outside World              40
  1834. X
  1835. X               Chapter 11  Keyboard Macros                          43
  1836. X
  1837. X               Chapter 12  MicroEMACS Macros                        45
  1838. X                  12.1  Constants  . . . . . . . . . . . . . . . .  45
  1839. X                  12.2  Variables  . . . . . . . . . . . . . . . .  46
  1840. X                     12.2.1  Environmental Variables . . . . . . .  47
  1841. X                     12.2.2  User variables  . . . . . . . . . . .  49
  1842. X                     12.2.3  Buffer Variables  . . . . . . . . . .  49
  1843. X                     12.2.4  Interactive variables . . . . . . . .  50
  1844. X                  12.3  Functions  . . . . . . . . . . . . . . . .  50
  1845. X                  12.4  Directives . . . . . . . . . . . . . . . .  53
  1846. X                     12.4.1  !ENDM Directive . . . . . . . . . . .  53
  1847. X                     12.4.2  !FORCE Directive  . . . . . . . . . .  53
  1848. X                     12.4.3  !IF, !ELSE, and !ENDIF Directives . .  54
  1849. X                     12.4.4  !GOTO Directive . . . . . . . . . . .  54
  1850. X                     12.4.5  !WHILE and !ENDWHILE Directives . . .  55
  1851. X                     12.4.6  !BREAK Directive  . . . . . . . . . .  55
  1852. X                     12.4.7  !RETURN Directive . . . . . . . . . .  56
  1853. X
  1854. X               Appendix A  MicroEMACS Command Line Switches and
  1855. X                  Startup Files                                     57
  1856. X
  1857. X               Appendix B  MicroEMACS commands                      59
  1858. X
  1859. X               Appendix C  MicroEMACS Bindings                      65
  1860. X
  1861. X               Appendix D  Supported machines                       67
  1862. X
  1863. X               Appendix E  Machine Dependent Notes                  69
  1864. X                  E.1  IBM-PC/XT/AT and its clones . . . . . . . .  69
  1865. X                  E.2  HP 150  . . . . . . . . . . . . . . . . . .  71
  1866. X                  E.3  Atari 520/1040ST  . . . . . . . . . . . . .  72
  1867. X                  E.4  Amiga 1000  . . . . . . . . . . . . . . . .  74
  1868. X                  E.5  UNIX V5, V7, and BSD4.[23]  . . . . . . . .  75
  1869. X
  1870. X               Appendix F  Mode Flags                               76
  1871. X
  1872. X
  1873. X
  1874. X
  1875. X
  1876. X
  1877. X
  1878. X
  1879. X
  1880. X
  1881. X                                          ii
  1882. X
  1883. X
  1884. X
  1885. FRIDAY_NIGHT
  1886.