home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume4 / uemacs3.6 / part1 < prev    next >
Text File  |  1986-11-30  |  28KB  |  743 lines

  1. Newsgroups: mod.sources
  2. Subject: MicroEMACS 3.6 (Part 1 of 8)
  3. Approved: jpn@panda.UUCP
  4.  
  5. Mod.sources:  Volume 4, Issue 98
  6. Submitted by: genrad!decvax!ihnp4!itivax!duncan!lawrence
  7.  
  8. echo x - readme
  9. sed 's/^X//' >readme <<'*-*-END-of-readme-*-*'
  10. X    MicroEMACS 3.6    new goodies
  11. X
  12. X- CMODE additions
  13. X
  14. X    in CMODE, pressing a '#' when there is only preceding whitespace
  15. Xon a line causes the whitespace to be deleted.  (for preprocesser
  16. Xcommands to be brought up against the left margin. 
  17. X
  18. X- Next Buffer command
  19. X
  20. X    The Next Buffer command (^X-X) switches the current window to
  21. Xthe next buffer in the buffer list (reading it in if needed).  This is
  22. Xgood for editing lists of files (mainly on UNIX when the shell expands
  23. Xwild cards). 
  24. X
  25. X- Fill paragraph modified
  26. X
  27. X    The fill paragraph command (<ESC> Q) now puts two spaces after
  28. Xevery period at the end of a word.  This is useful most of the time but
  29. Xoccasionally will put in spurious spaces (like after a middle initial). 
  30. XAny suggestions on an algorithm for dealing with english would be
  31. Xappreciated. 
  32. X
  33. X- Kill paragraph command added
  34. X
  35. X    <ESC> ^W is now bound to kill-paragraph.  This kills the current
  36. Xparagraph which the cursor is in.  A numeric argument will allow it to
  37. Xkill a number of paragraphs. 
  38. X
  39. X- Global mode commands
  40. X
  41. X    Set/delete global mode commands now allow the user to specify a
  42. Xdefault mode for newly created buffers.  Thus, for example, if you
  43. Xalways wished to use EXACT case matching on a string, you could place a
  44. X"Set global mode exact" in your startup file and all buffers would start
  45. Xwith EXACT initially on. 
  46. X
  47. X- Overwrite mode
  48. X
  49. X    OVER mode allows you to type text over the top of other text
  50. Xwithout inserting it.  This mode is very good for editing tables of
  51. Xinformation. 
  52. X
  53. X- Insert Space command added
  54. X
  55. X    The Insert Space command (^C or INSERT) inserts a space in front
  56. Xof the cursor push any text to the right one character farther to the
  57. Xright.  This is a very usefull command while in OVERwrite mode. (I moved
  58. Xthe bind-to-key function to now initially be bound to <ESC>-K)
  59. X
  60. X- Hunt Forward/Backward
  61. X
  62. X    The hunt commands allow you to search for the last string
  63. Xsearched for without re-entering the string. Under PCDOS they are bound
  64. Xto <ALT>-S and <ALT-R> (the new function prefix proved even more
  65. Xverstile than I had thought when I wrote it. Do note the unusual
  66. Xdeclarations for them in EBIND.H) Under other environments they are not
  67. Xyet bound, and are probably best bound to a function key.
  68. X
  69. X- Amiga Function/Cursor keys:
  70. X
  71. X    are now supported. Function keys 1-10 are FN 0 - FN 9, shifted
  72. Xfunction keys are FN P - FN Y, cursor keys are FN A - FN D, shifted
  73. Xcursor keys are FN S, FN T, FN a, and FN @. (Use the describe-key
  74. Xfunction to find specific keys).
  75. X
  76. X- Reverse video Status lines
  77. X
  78. X    The status line for each buffer can now (due to popular demand)
  79. Xbe in reverse video. This is configuable in ESTRUCT.H for people who
  80. Xmight not want it.
  81. X
  82. X- Several Bug fixes:
  83. X
  84. X    A bug in DOBUF would cause non-terminated strings under some
  85. Xcompilers has been fixed.
  86. X
  87. X    Tabs when expanded on the AMIGA at display time sometimes caused
  88. XMicroEMACS to hang, this is fixed. (Reported by Dawn Banks)
  89. X
  90. X    The current column position was not always maintained properly
  91. Xwhen executing a keyboard macro, this is fixed. (Reported by Ernst Christen).
  92. X
  93. X    Re-wrote word wrapping algorithm to be have better when
  94. Xinserting text into the middle of a paragraph.
  95. X
  96. X    <NL>'s at the end of a search to replace string cause the
  97. Xreplacement to terminate after they have done the first replacement on
  98. Xthe last line of the file, preventing MicroEMACS to hang while infinitly
  99. Xreplacing <NL>s.
  100. X
  101. X
  102. X- Future enhancments may include:
  103. X
  104. X    -s on command line for alternative startup file
  105. X    numbered kill buffers
  106. X    fence matching for CMODE
  107. X    sort region command
  108. X    sentence movement and deletion commands
  109. X
  110. X    If you make modifications to let MicroEMACS 3.6 run under any
  111. Xnew envirnments, please send me the changes. I am also looking for the
  112. Xinclude file "rainbow.h".
  113. X
  114. X    Could some please test this out under the Mark Williams C
  115. Xcompiler (which I do not have) and send me any needed changes to have it
  116. Xrun properly [most probably in termio.c].
  117. X
  118. X    Send any ideas, suggestions or futher goodies to
  119. X            Daniel Lawrence
  120. X            ihnp4!pur-ee!pur-phy!duncan!lawrence
  121. X
  122. X=============================================================================
  123. X    MicroEMACS 3.5
  124. X
  125. X    This version of MicroEMACS is based on the version written by
  126. XDave G. Conroy, and latter modified by Steve Wilhite and George Jones.
  127. XMy thanks goes to them for writting such nice, well structured and
  128. Xdocumented code. It is nice to see that there are some people out there
  129. Xwho know how to program well.
  130. X
  131. X    I intend to continue to maintain this version and will consider
  132. Xadding features and supported machines on request. Current hardware
  133. Xsupported includes:
  134. X
  135. X    IBM-PC under PCDOS/MSDOS and many compatibles
  136. X    Dec Rainbow
  137. X    Commodore Amiga
  138. X    Unix V7
  139. X    Unix and Multix BSD 4.2
  140. X    Hewlett Packard 150 and various upgrades
  141. X
  142. XFeatures added to MicroEMACS since version 2.0 include:
  143. X
  144. X- Meta repeat codes
  145. X
  146. X    Striking the <ESC> key followed by a numeric argument (possibly
  147. Xwith a leading minus sign) passes an argument down to a command which is
  148. Xusually used as a repeat count. This is similar to the ^U command, but
  149. Xthere is no default value.
  150. X
  151. X- Change in repositioning command
  152. X
  153. X    The command to reposition the cursor now repositions it, by
  154. Xdefault, to the center of the current window, rather than the first line
  155. Xof the window. This I think is much more usefull and also consistant
  156. Xwith many other emacs'.
  157. X
  158. X- File writting message....
  159. X
  160. X    For those of us with big files, when you start a write of a file
  161. Xto disk, the message [Writing..] now appears. This is so we know the
  162. Xmachine is really still there. (Paranoids Ahead!)
  163. X
  164. X- Search strings now can have <NL>s in them
  165. X
  166. X    It is very usefull to be able to have newlines in search and
  167. Xreplace strings. To do this, all text input to searching commands is now
  168. Xterminated by an <ESC>.
  169. X
  170. X- Replace!!!!!
  171. X
  172. X    Yes, now we can replace as well as search. There are two flavors
  173. Xof this command. <ESC> R allows us to replace each occurence of a string
  174. Xwith another string from the current point to the end of the file. 
  175. X<ESC> ^R also queries us at each string to see if we want to replace it.
  176. XTyping a question mark here will display the options.
  177. X
  178. X- Yes/no responces
  179. X
  180. X    no longer require (or want) a return typed after them.
  181. X
  182. X- Spawning
  183. X
  184. X    Fixed up some MSDOS spawning messages. WARNING: If you have your
  185. Xswitchchar set to a '-' instead of a '/' Lattice C may have problems
  186. Xwhen yanking up a new command processer. It will use a line like 
  187. XCOMMAND /C <command line>. You may have to rewrite this library function
  188. Xto get it to work on your system properly.
  189. X
  190. X- Suspend MicroEMACS
  191. X
  192. X    Under Unix BSD 4.2 we now have code to put the editor into the
  193. Xbackground and return to the parent shell. This is initially bound to
  194. Xthe ^X D keys.
  195. X
  196. X- Function keys
  197. X
  198. X    Under MSDOS on IBM-PCs and compatibles, the function keys and
  199. Xcursor arrows now do what one would expect them to. There is a new
  200. Xprefix in the editor to accodate this. (Look in MAIN.C for this) This
  201. Xcan be used to add function key support to most any machine by adding a
  202. Xsmall piece of code to reconize the keys in the getkey() routine in
  203. Xmain.c, and adding the new definitions to the ebind.h header file.
  204. X
  205. X- Abort (^G)
  206. X
  207. X    now prints out [Aborted] on the command line so you know what
  208. Xhappened.
  209. X
  210. X- Editor Modes
  211. X
  212. X    Buffers now have modes associated with them. These modes can be
  213. Xset with the set-mode (^X M) and the delete-mode (^X ^M) commands.
  214. X
  215. X- CMODE mode
  216. X
  217. X    When a file is read in with a .c or .h extention, CMODE is set
  218. Xfor that buffer. (This can also be manually set/deleted[see above]) In
  219. XCMODE, MicroEMACS attemts to be intelligent about doing automatic
  220. Xindentation for you. It will indent any line the same as the privious
  221. Xline unless the last line ended with a brace ({). Then it will indent an
  222. Xextra tab stop (which varies depending on how tabs are set). Any lines
  223. Xbegining with a close brace (}) will by undented one tab stop if possible.
  224. X
  225. X- WRAP mode
  226. X
  227. X    This mode automatically wraps words onto the next line when the
  228. Xword extends beyond the current fill column.
  229. X
  230. X- VIEW mode
  231. X
  232. X    This mode disables all commands that can change the current buffer.
  233. X
  234. X- EXACT mode
  235. X
  236. X    Normally all searches are done ignoring case. With this mode
  237. Xset, only strings which exactly match the search string, including case,
  238. Xare matched.
  239. X
  240. X- GOTO line command
  241. X
  242. X    The goto-line (<ESC> G) command will go to a specific line
  243. Xnumber of the file. For example to go to the 76th line of a file, type:
  244. X
  245. X    <ESC> 76 <ESC> G
  246. X
  247. X- Rename buffer
  248. X
  249. X    The command rename-buffer (<ESC> ^N) allows you to change the
  250. Xname of the current buffer.
  251. X
  252. X- Paragraph movement
  253. X
  254. X    The forward-paragraph (<ESC> N) and previous-paragraph (<ESC> P)
  255. Xcommands allow movement from one paragraph to another.
  256. X
  257. X- nasty algorith fixed....
  258. X
  259. X    A rather nasty algorithm in the kill buffer processing got
  260. Xrewritten which ends up reducing the speed neeeded to wipe large areas
  261. Ximmensly. This may have appeared to lock up the machine on the older
  262. Xversions when a large wipe was attempted.
  263. X
  264. X- Header files rearranged
  265. X
  266. X    ESTRUCT.H    Structure and option declarations
  267. X    EDEF.H        Global and external variable declarations
  268. X    EPATH.H        Help and startup file paths
  269. X    EFUNC.H        Name binding table
  270. X    EBIND.H        Initial key binding tables
  271. X
  272. X- Paragraph filling!!
  273. X
  274. X    The fill-paragraph (<ESC> Q) command reformats the current
  275. Xparagraph filling to the fill column as possible. Very handy....
  276. X
  277. X- Long lines
  278. X
  279. X    Lines longer than the screen now scroll right-left as you move
  280. Xthrough them. Seeing what your editing is a big improvement.
  281. X
  282. X- word move and deletes
  283. X
  284. X    Due to massive demand by my users here, I have changed the way
  285. Xword move and delete work so that they are more consistant and usefull.
  286. XBut this change is configurable by changing the value of the NFWORD
  287. Xconstant in ESTRUCT.H
  288. X
  289. X- View flag on command line
  290. X
  291. X    -v on the command line causes the editor to read a file in with
  292. XVIEW mode set on. -e (edit) is the opposite causing it to read in for
  293. Xediting (which is also the default).
  294. X
  295. X- Quick EXIT has done a quick change....
  296. X
  297. X    (sorry....) Quick-exit now writes out all changed buffers before
  298. Xexiting.
  299. X
  300. X- Very long file lines
  301. X
  302. X    Very long lines (>255 chars) being read from a file now get
  303. Xwrapped on multiple lines (instead of simple refusing to read any more
  304. Xof the file as before) The user is warned about them with a message at
  305. Xthe end of the read.
  306. X
  307. X- Space not clearing messages
  308. X
  309. X    Many of my users complained about the space not inserting itself
  310. Xafter a message (it just cleared the message line). This is now
  311. Xconfiguable in ESTRUCT.H
  312. X
  313. X- HELP commands!
  314. X
  315. X    the describe-key (^X ?) command allows the user to type in one
  316. Xcommand and the editor echos back the command name bound to that key.
  317. XThe help (<ESC> ?) command grabs the top window (or splits if if not
  318. Xthere) and reads in the EMACS.HLP file. The list of places to look for
  319. Xthe help file are in EPATH.H
  320. X
  321. X- View file command
  322. X
  323. X    View-file (^X ^V) is the same as find-file (old visit-file)
  324. Xexcept it leaves the found file in VIEW mode.
  325. X
  326. X- Improved updating
  327. X
  328. X    On the systems that code has been written for, the screen update
  329. Xroutines will defer updating if there is type ahead present. This makes
  330. Xall movement commands much more pleasant. The code for this is in the
  331. Xfunction typahead() in TERMIO.C. This is currently implimented for
  332. XMSDOS, BSD4.2 and possible the AMIGA (Some one please check this out. I
  333. Xonly have limited access to an AMIGA)
  334. X
  335. X- Buffer lists
  336. X
  337. X    are now alphabetically maintained.
  338. X
  339. X- Insert file
  340. X
  341. X    Insert-file (^X ^I) allows you to insert the contents of a file
  342. Xat the current position of the current buffer. very useful
  343. X
  344. X- Scroll next window
  345. X
  346. X    Scroll-next-down (<ESC> ^V) and scroll-next-up (<ESC> ^Z) allow
  347. Xyou to scroll the next window up and down by pages.
  348. X
  349. X- Arguments to searches
  350. X
  351. X    All searches and replaces now take a preceding numeric argument
  352. Xto say how many times, rather than all the way to the bottom of the
  353. Xfile.
  354. X
  355. X- Binding keys
  356. X
  357. X    The bind-to-key (^C) function allows you to change what
  358. Xcommand a key invokes. It will promt you for a command name, and then a
  359. Xkeystroke sequence. This is happy. Unbind-key (<ESC> ^C) allows you to
  360. Xmake a key now longer have a function. (This is good when you accidently
  361. Xbind <RET> or a letter to something)
  362. X
  363. X- Execute named command
  364. X
  365. X    Will prompt you for a command name, and then execute it. This
  366. Xallows you to execute commands that are not currently bound to any keys.
  367. X
  368. X- Command name completion
  369. X
  370. X    Any time you are prompted for a command, if you type in part of
  371. Xit and hit the space bar, the editor will try to finish it. If the bell
  372. Xrighs, it means there is now command like what you are typing.
  373. X
  374. X- Describe bindings
  375. X
  376. X    Describe-bindings (not bound) will display a list of all the
  377. Xcommands in a window (splitting if neccesary) and the keys bound with
  378. Xthem. These will reflect the current bindings and not the default ones.
  379. XThis is a good way to find out the name of a command you can't remember,
  380. Xor which I picked a bad name for. (The names have been changed to
  381. Xprotect the guilty (thats me) and are in EFUNC.H You too can change them
  382. Xif you are into it).
  383. X
  384. X- Executing stuff
  385. X
  386. X    The execute-command-line command prompts you for a command line
  387. Xon the bottom of the screen in the form:
  388. X
  389. X    {Numeric argument} <command-name> {<string arg> {<string arg>}}
  390. X
  391. X    (where {} are for optional stuff) and then executes it.
  392. X
  393. X    Execute-buffer executes a number of these commands in a buffer.
  394. XIf any errors are found, the buffers current location will be set to the
  395. Xbegining of the line with the error in it.
  396. X
  397. X    Execute-file will read a file into a buffer, execute it, and
  398. Xthen kill the buffer if it executed to completion with no errors.
  399. X
  400. X- Startup file
  401. X
  402. X    MicroEMACS will attempt to execute a startup file (whose name is
  403. Xin EPATH.H) on startup. The MSDOS name is EMACS.RC and under unix it is
  404. Xusually .emacsrc
  405. X
  406. X- Multiple files on the command line
  407. X
  408. X    MicroEMACS will now except a list of files on the command line.
  409. XThese files will all be assigned buffers, but will not be read in until
  410. Xthe buffer is brought up in a window. -v and -e switches affect all the
  411. Xfiles following them.
  412. X
  413. X- FILE LOCKING
  414. X
  415. X    This is for people on multi-user UNIX systems. What this feature
  416. Xcan do is prevent two people from editing the same file and stomping on
  417. Xeach others edits. Unfortunatly, the actually locking mechanism used
  418. Xwhere I work is propritory so I could not send it out, but I have left
  419. Xall the code (conditionally defined by the FILOCK symbol in ESTRUCT.H)
  420. Xleading up to the actually locking routines so some one else can add it
  421. Xwith little effort. Here are the comments for the actual routines that
  422. Xneed to be added:
  423. X
  424. X/**********************
  425. X *
  426. X * dolock -- lock the file fname
  427. X *
  428. X * if successful, returns NULL 
  429. X * if file locked, returns username of person locking the file
  430. X * if other error, returns "LOCK ERROR: explanation"
  431. X *
  432. X *********************/
  433. X
  434. Xchar *dolock(fname)
  435. X
  436. Xchar *fname;    /* file name to be locked */
  437. X
  438. X
  439. Xand
  440. X
  441. X
  442. X/**********************
  443. X *
  444. X * undolock -- unlock the file fname
  445. X *
  446. X * if successful, returns NULL 
  447. X * if other error, returns "LOCK ERROR: explanation"
  448. X *
  449. X *********************/
  450. X
  451. Xchar *undolock(fname)
  452. X
  453. Xchar *fname;        /* file name to unlock */
  454. X
  455. X
  456. X    If some one wants to write these functions so they can be
  457. Xdistributed publicly, please mail a separate file with them to me
  458. Xand I will include them with these sources for others to use.
  459. X
  460. X- HP150 function/cursor key support
  461. X
  462. X    is now finished and working.
  463. X
  464. *-*-END-of-readme-*-*
  465. echo x - Makefile
  466. sed 's/^X//' >Makefile <<'*-*-END-of-Makefile-*-*'
  467. XCFLAGS=        -O -I/usr/tools/include/bland
  468. X
  469. XOFILES=        ansi.o basic.o bind.o buffer.o display.o file.o \
  470. X        fileio.o hp150.o line.o lock.c main.o random.o region.o \
  471. X        search.o spawn.o tcap.o termio.o vt52.o window.o word.o
  472. X
  473. XCFILES=        ansi.c basic.c bind.c buffer.c display.c  file.c \
  474. X        fileio.c hp150.c line.c lock.c main.c random.c region.c \
  475. X        search.c spawn.c tcap.c termio.c vt52.c window.c word.c
  476. X
  477. XHFILES=        estruct.h edef.h efunc.h epath.h
  478. X
  479. Xemacs:        $(OFILES)
  480. X        $(CC) $(CFLAGS) $(OFILES) -ltermcap -lc -o emacs
  481. X
  482. X$(OFILES):    $(HFILES)
  483. *-*-END-of-Makefile-*-*
  484. echo x - emacs.hlp
  485. sed 's/^X//' >emacs.hlp <<'*-*-END-of-emacs.hlp-*-*'
  486. X        MicroEMACS 3.6 Help screens        (04/18/86)
  487. X
  488. X    M-  means to use the <ESC> key prior to using another key
  489. X    ^A  means to use the control key at the same time as the A key
  490. X
  491. X^V or [Pg Dn]     Scroll down        M-< or [HOME]    Begining of file
  492. X^Z or [Pg Up]     Scroll up        M-> or [END]    End of file
  493. X
  494. X-----------------------------------------------------------------------
  495. X        (1) MOVING THE CURSOR
  496. X
  497. X^F  Forward character   M-F    Forward word        Keypad arrows
  498. X^B  Backward character  M-B    Backward word        are active!
  499. X^A  Front of line    
  500. X^E  End of line        
  501. X^N  Next line        M-N    Front of paragraph
  502. X^P  Previous line    M-P    End of paragraph
  503. X-----------------------------------------------------------------------
  504. X        (2) SEARCHING
  505. X
  506. X^S    Search forward from cursor position.  Type in a string to be searched
  507. X    for at the prompt and end it with ESC.  Either case matches either
  508. X    unless EXECT mode is set for the current buffer
  509. X^R    As above, but Reverse search from cursor position.
  510. X<ALT> S    Search for the next occurence of the last string (IBM-PC only)
  511. X<ALT> R    Search for the last occurence of the last string (IBM-PC only)
  512. X-----------------------------------------------------------------------
  513. X        (3) REPLACING
  514. X
  515. XM-R   Replace all instances of first typed-in string with second
  516. X          typed-in string.  End each string with ESC.
  517. XM-^R  Replace with query.  Answer with:
  518. X    ^G  cancel            .   exit to entry point
  519. X    !   replace the rest        Y    replace & continue
  520. X    ?   Get a list of options    N   no replacement & continue
  521. X-----------------------------------------------------------------------
  522. X        (4) CAPITALIZING & TRANSPOSING
  523. X
  524. XM-U    UPPERCASE word
  525. XM-C    Capitalize word        ^T    Transpose characters
  526. XM-L    lowercase word
  527. X^X^L    lowercase region
  528. X^X^U    uppercase region
  529. X^Q    Quote next entry, so that control codes may be entered into text
  530. X-----------------------------------------------------------------------
  531. X        (5) REGIONS & THE KILL BUFFER
  532. X
  533. XM-<spacebar>    set MARK at current position
  534. X^X^X        eXchange mark and cursor
  535. X
  536. XA REGION will then be continuously-defined as the area between the mark and
  537. Xthe current cursor position.  The KILL BUFFER is the text which has been
  538. Xmost recently saved or deleted.
  539. X-----------------------------------------------------------------------
  540. X        (6) DELETING & INSERTING
  541. X
  542. X<--    Delete previous character    M-<--    Delete previous word
  543. X^D    Delete next character        M-D    Delete next word
  544. X^K    Close (delete) to end of line    <INSERT>  Insert a space (IBM-PC only)
  545. X^O    Open (insert) line        <DELETE>  Delete next char (  "  )
  546. X^W    Delete region between mark (set using M-<spacebar>) and cursor
  547. XM-W    Copy region to kill buffer
  548. X-----------------------------------------------------------------------
  549. X        (7) COPYING AND MOVING
  550. X
  551. X^W  Delete (Wipe) region        M-W    copy region to KILL buffer
  552. X^Y  Yankback save buffer at cursor
  553. XGenerally, the procedure for copying or moving text is:
  554. X    1)  Mark a REGION using M-<spacebar> at beginning and cursor at end.
  555. X    2)  Delete it (with ^W) or copy it (with M-W) into the KILL buffer.
  556. X    3)  Move the cursor to the desired location and yank it back (with ^Y).
  557. X-----------------------------------------------------------------------
  558. X        (8) MODES OF OPERATION
  559. X^X M    Add Mode        ^X ^M    Delete Mode
  560. X    OVER    Replaces (overwrites) rather than inserts characters
  561. X    WRAP    Turns on word wrap (automatic carraige return).
  562. X    VIEW    Allows viewing file without insertion and deletion.
  563. X    EXACT    All searches done with exact case matching
  564. X    CMODE    Automatic indenting for C program entry
  565. X        (automatically set on any files ending with .C or .H)
  566. X-----------------------------------------------------------------------
  567. X        (9) ON-SCREEN FORMATTING
  568. X
  569. X^X F        Set fill column
  570. XMn-<tab>    Set tab spacing to n charecters between tabs stops
  571. XM-Q        Format paragraph so that text lies between margins
  572. X^X =        Position report -- displays line number, char count, size
  573. X
  574. X
  575. X-----------------------------------------------------------------------
  576. X        (10) MULTIPLE WINDOWS
  577. X
  578. XMany WINDOWS may be active at once on the screen.  All windows may show
  579. Xdifferent parts of the same buffer, or each may display a different one.
  580. X
  581. X^X 2    Split the current window in two    ^X 1    remove all but current window
  582. X^X O    cursor to next window        ^X ^    Enlarge current window
  583. XM-^V    scroll down, other window    M-^Z    scroll up, other window
  584. X-----------------------------------------------------------------------
  585. X        (11) MULTIPLE BUFFERS
  586. XA BUFFER is a named area containing a document being edited.  Many buffers
  587. Xmay be activated at once.
  588. X^X B    Switch to another buffer.  <CR> = use just-previous buffer
  589. X^X ^B    Type buffer directory in a window
  590. X^X ^F    Find file; read into a new buffer created from filename.
  591. X^X K    Delete a non-displayed buffer.
  592. X^X X    Switch to next buffer in buffer list
  593. X-----------------------------------------------------------------------
  594. X        (12) READING FROM DISK
  595. X
  596. X^X^F    Find file; read into a new buffer created from filename.
  597. X    (This is the usual way to begin editing a new file.)
  598. X^X^R    Read file into current buffer, erasing its previous contents.
  599. X    No new buffer will be created.
  600. X^X^I    Insert file into current buffer at cursor's location.
  601. X^X^V    Find a file to make current in VIEW mode
  602. X-----------------------------------------------------------------------
  603. X        (13) SAVING TO DISK
  604. X
  605. X^X^S    Save current buffer to disk, using the buffer's filename
  606. X    as the name of the disk file.  Any disk file of that name
  607. X    will be overwritten.
  608. X^X^W    Write current buffer to disk.  Type in a new filename at the
  609. X    prompt to write to; it will become the current buffer's filename.
  610. XM-Z    Write out all changed buffers and exit MicroEMACS
  611. X-----------------------------------------------------------------------
  612. X        (14) ACCESSING THE OPERATING SYSTEM
  613. X
  614. X^X!    Send one command to the operating system and return
  615. X^XC    Start a new command processer under MicroEMACS
  616. X^XD    Suspend MicroEMACS into the background (UNIX BSD4.2 only)
  617. X^X^C    Exit MicroEMACS
  618. XM-Z    Write out all changed buffers and then Exit MicroEMACS
  619. X
  620. X-----------------------------------------------------------------------
  621. X        (15) SPECIAL KEYS AND KEY BINDINGS
  622. X
  623. X^G        Cancel current command and return to top level of processing.
  624. X^U or        Universal repeat.  May be followed by an integer (default = 4)
  625. XM-<digit>    and repeats the next command that many times.
  626. XM-X        Execute a named (and possibly unbound) command
  627. XM-K        Bind a key to a named command
  628. XDescribe-Bindings
  629. X        List the current key bindings in a buffer
  630. *-*-END-of-emacs.hlp-*-*
  631. echo x - emacs.key
  632. sed 's/^X//' >emacs.key <<'*-*-END-of-emacs.key-*-*'
  633. X        Default Key Bindings for MicroEmacs 3.6
  634. X        =======================================
  635. X
  636. X ^A   Move to start of line           
  637. X ^B   Move backward by characters     ESC B   Backup by words
  638. X ^C   Insert space                    ESC C   Initial capitalize word
  639. X ^D   Forward delete                  ESC D   Delete forward word
  640. X ^E   Goto end of line                     
  641. X ^F   Move forward by characters      ESC F   Advance by words
  642. X ^G   Abort out of things             ESC G   Go to a line
  643. X ^H   Backward delete                 
  644. X ^I   Insert tab                     
  645. X ^J   Insert CR-LF, then indent                     
  646. X ^K   Kill forward                    ESC K   Bind Key to function
  647. X ^L   Refresh the screen              ESC L   Lower case word
  648. X ^M   Insert CR-LF                    ESC M   Set global mode
  649. X ^N   Move forward by lines           ESC N   Goto End paragraph
  650. X ^O   Open up a blank line            
  651. X ^P   Move backward by lines          ESC P   Goto Begining of paragraph
  652. X ^Q   Insert literal                  ESC Q   Fill current paragraph
  653. X ^R   Search backwards                ESC R   Search and replace
  654. X ^S   Search forward                  ESC S   Suspend editor (BSD4.2 only)
  655. X ^T   Transpose characters                     
  656. X                                      ESC U   Upper case word
  657. X ^V   Move forward by pages           ESC V   Move backward by pages
  658. X ^W   Kill region                     ESC W   Copy region to kill buffer
  659. X ^Y   Yank back from killbuffer       ESC X   Execute named command
  660. X ^Z   Move backward by pages          ESC Z   Save file and exit
  661. X
  662. X ESC ^H   Delete backward word        ESC !   Reposition window
  663. X ESC ^K   Unbind Key from function    ESC <   Move to start of buffer
  664. X ESC ^L   Reposition window           ESC >   Move to end of buffer
  665. X ESC ^M   Delete global mode          ESC .   Set mark
  666. X ESC ^N   Rename current buffer       ESC space    Set mark
  667. X ESC ^R   Search & replace w/query    ESC rubout   Delete backward word
  668. X ESC ^V   Scroll next window down         rubout   Backward delete       
  669. X ESC ^W   Delete Paragraph
  670. X ESC ^Z   Scroll next window up
  671. X
  672. X ^X ?   Describe a key             ^X !   Run 1 command in a subjob
  673. X ^X =   Show the cursor position   ^X (   Begin macro
  674. X ^X ^   Enlarge display window     ^X )   End macro
  675. X ^X 1   Make current window only one
  676. X ^X 2   Split current window
  677. X
  678. X ^X ^B   Display buffer list       ^X B   Switch a window to a buffer
  679. X ^X ^C   Exit MicroEMACS           ^X C   Start a new command processer
  680. X                                   ^X D   Suspend MicroEMACS (BSD4.2 only)
  681. X                                   ^X E   Execute macro
  682. X ^X ^F   Find file names           ^X F   Set fill column
  683. X ^X ^I   Insert file
  684. X                                   ^X K   Make a buffer go away
  685. X ^X ^L   Lower case region
  686. X ^X ^M   Delete Mode               ^X M   Set a mode
  687. X ^X ^N   Move window down          ^X N   Rename current filename
  688. X ^X ^O   Delete blank lines        ^X O   Move to the next window
  689. X ^X ^P   Move window up            ^X P   Move to the previous window
  690. X ^X ^R   Get a file from disk
  691. X ^X ^S   Save current file         ^X S   Save current file
  692. X ^X ^U   Upper case region
  693. X ^X ^V   View file
  694. X ^X ^W   Write a file to disk      ^X X   Use next buffer
  695. X ^X ^X   Swap "." and mark
  696. X ^X ^Z   Shrink window             ^X Z   Enlarge display window
  697. X
  698. XOnly under PCDOS:
  699. X <ALT>-S Hunt forward
  700. X <ALT>-R Hunt backward
  701. X
  702. XUnbound commands:
  703. X=================
  704. Xdescribe-bindings    pull the list of current bindings into a window
  705. Xexecute-buffer        execute a buffer od command lines
  706. Xexecute-command-line    execute a command line (n <command> <args>)
  707. Xexecute-file        execute a file of command lines
  708. Xexecute-named-command    execute a command by name (w/command completion)
  709. Xhunt-forward        find next occurance of search string
  710. Xhunt-backward        find last occurance of search string
  711. X
  712. XUsable Modes
  713. X============
  714. XWRAP     Lines going past right margin "wrap" to a new line
  715. XVIEW     Read-Only mode where no modifications are allowed
  716. XCMODE    Change behavior of some commands to work with C better
  717. XEXACT    Exact case matching on search strings
  718. XOVER     Overwrite typed characters instead of inserting them
  719. *-*-END-of-emacs.key-*-*
  720. echo x - emacs.rc
  721. sed 's/^X//' >emacs.rc <<'*-*-END-of-emacs.rc-*-*'
  722. X;    EMACS.RC:    Startup file for MicroEMACS 3.4
  723. X;
  724. X;            This file is executed everytime the
  725. X;            editor is entered
  726. X
  727. X;    ***** Rebind the Function key group
  728. X
  729. Xbind-to-key execute-named-command    FN;
  730. Xbind-to-key execute-file        FN<
  731. Xbind-to-key hunt-forward        FN=
  732. Xbind-to-key hunt-backward        FN>
  733. Xbind-to-key next-window            FN?
  734. Xbind-to-key execute-macro        FN@
  735. Xbind-to-key find-file            FNA
  736. Xbind-to-key view-file            FNB
  737. Xbind-to-key save-file            FNC
  738. Xbind-to-key exit-emacs            FND
  739. *-*-END-of-emacs.rc-*-*
  740. exit
  741.  
  742.  
  743.