home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume6
/
uemacs3.7
/
part03
< prev
next >
Wrap
Text File
|
1986-11-30
|
37KB
|
899 lines
Subject: MicroEmacs, Version 3.7 (uEmacs3.7), Part03/12
Newsgroups: mod.sources
Approved: rs@mirror.UUCP
Submitted by: ihnp4!pur-ee!pur-phy!duncan!lawrence
Mod.sources: Volume 6, Issue 73
Archive-name: uEmacs3.7/Part03
[ This is the latest revision of one of two programs named "MicroEmacs";
when discussing these on the net, or in contacting the authors, make
sure to mention the version number -- in this case 3.7 -- as that is
the easiest way to distinguish between them. Lawrence will be posting
uuencoded executables in net.micro.pc and net.micro.amiga; the file
'readme' contains information on how to also get these from him
directly. --r$ ]
echo extracting - edef.h
sed 's/^X//' > edef.h << 'FRIDAY_NIGHT'
X/* EDEF: Global variable definitions for
X MicroEMACS 3.2
X
X written by Dave G. Conroy
X modified by Steve Wilhite, George Jones
X greatly modified by Daniel Lawrence
X*/
X
X/* some global fuction declarations */
X
Xchar *malloc();
X
X#ifdef maindef
X
X/* for MAIN.C */
X
X/* initialized global definitions */
X
Xint fillcol = 72; /* Current fill column */
Xshort kbdm[NKBDM] = {CTLX|')'}; /* Macro */
Xchar pat[NPAT]; /* Search pattern */
Xchar rpat[NPAT]; /* replacement pattern */
Xchar sarg[NSTRING] = ""; /* string argument for line exec*/
Xint eolexist = TRUE; /* does clear to EOL exist */
Xint revexist = FALSE; /* does reverse video exist? */
Xchar *modename[] = { /* name of modes */
X "WRAP", "CMODE", "SPELL", "EXACT", "VIEW", "OVER", "MAGIC"};
Xchar modecode[] = "WCSEVOM"; /* letters to represent modes */
Xint gmode = 0; /* global editor mode */
Xint gfcolor = 7; /* global forgrnd color (white) */
Xint gbcolor = 0; /* global backgrnd color (black)*/
Xint sgarbf = TRUE; /* TRUE if screen is garbage */
Xint mpresf = FALSE; /* TRUE if message in last line */
Xint clexec = FALSE; /* command line execution flag */
Xint mstore = FALSE; /* storing text to macro flag */
Xstruct BUFFER *bstore = NULL; /* buffer to store macro text to*/
Xint vtrow = 0; /* Row location of SW cursor */
Xint vtcol = 0; /* Column location of SW cursor */
Xint ttrow = HUGE; /* Row location of HW cursor */
Xint ttcol = HUGE; /* Column location of HW cursor */
Xint lbound = 0; /* leftmost column of current line
X being displayed */
Xint metac = CTRL | '['; /* current meta character */
Xint ctlxc = CTRL | 'X'; /* current control X prefix char */
Xint quotec = 0x11; /* quote char during mlreply() */
Xchar *cname[] = { /* names of colors */
X "BLACK", "RED", "GREEN", "YELLOW", "BLUE",
X "MAGENTA", "CYAN", "WHITE"};
XKILL *kbufp = NULL; /* current kill buffer chunk pointer */
XKILL *kbufh = NULL; /* kill buffer header pointer */
Xint kused = KBLOCK; /* # of bytes used in kill buffer */
XWINDOW *swindow = NULL; /* saved window pointer */
X
X/* uninitialized global definitions */
X
Xint currow; /* Cursor row */
Xint curcol; /* Cursor column */
Xint thisflag; /* Flags, this command */
Xint lastflag; /* Flags, last command */
Xint curgoal; /* Goal for C-P, C-N */
XWINDOW *curwp; /* Current window */
XBUFFER *curbp; /* Current buffer */
XWINDOW *wheadp; /* Head of list of windows */
XBUFFER *bheadp; /* Head of list of buffers */
XBUFFER *blistp; /* Buffer for C-X C-B */
Xshort *kbdmip; /* Input pointer for above */
Xshort *kbdmop; /* Output pointer for above */
X
XBUFFER *bfind(); /* Lookup a buffer by name */
XWINDOW *wpopup(); /* Pop up window creation */
XLINE *lalloc(); /* Allocate a line */
X
X#else
X
X/* for all the other .C files */
X
X/* initialized global external declarations */
X
Xextern int fillcol; /* Fill column */
Xextern short kbdm[]; /* Holds kayboard macro data */
Xextern char pat[]; /* Search pattern */
Xextern char rpat[]; /* Replacement pattern */
Xextern char sarg[]; /* string argument for line exec*/
Xextern int eolexist; /* does clear to EOL exist? */
Xextern int revexist; /* does reverse video exist? */
Xextern char *modename[]; /* text names of modes */
Xextern char modecode[]; /* letters to represent modes */
Xextern KEYTAB keytab[]; /* key bind to functions table */
Xextern NBIND names[]; /* name to function table */
Xextern int gmode; /* global editor mode */
Xextern int gfcolor; /* global forgrnd color (white) */
Xextern int gbcolor; /* global backgrnd color (black)*/
Xextern int sgarbf; /* State of screen unknown */
Xextern int mpresf; /* Stuff in message line */
Xextern int clexec; /* command line execution flag */
Xextern int mstore; /* storing text to macro flag */
Xextern struct BUFFER *bstore; /* buffer to store macro text to*/
Xextern int vtrow; /* Row location of SW cursor */
Xextern int vtcol; /* Column location of SW cursor */
Xextern int ttrow; /* Row location of HW cursor */
Xextern int ttcol; /* Column location of HW cursor */
Xextern int lbound; /* leftmost column of current line
X being displayed */
Xextern int metac; /* current meta character */
Xextern int ctlxc; /* current control X prefix char */
Xextern int quotec; /* quote char during mlreply() */
Xextern char *cname[]; /* names of colors */
Xextern KILL *kbufp; /* current kill buffer chunk pointer */
Xextern KILL *kbufh; /* kill buffer header pointer */
Xextern int kused; /* # of bytes used in KB */
Xextern WINDOW *swindow; /* saved window pointer */
X
X/* initialized global external declarations */
X
Xextern int currow; /* Cursor row */
Xextern int curcol; /* Cursor column */
Xextern int thisflag; /* Flags, this command */
Xextern int lastflag; /* Flags, last command */
Xextern int curgoal; /* Goal for C-P, C-N */
Xextern WINDOW *curwp; /* Current window */
Xextern BUFFER *curbp; /* Current buffer */
Xextern WINDOW *wheadp; /* Head of list of windows */
Xextern BUFFER *bheadp; /* Head of list of buffers */
Xextern BUFFER *blistp; /* Buffer for C-X C-B */
Xextern short *kbdmip; /* Input pointer for above */
Xextern short *kbdmop; /* Output pointer for above */
X
Xextern BUFFER *bfind(); /* Lookup a buffer by name */
Xextern WINDOW *wpopup(); /* Pop up window creation */
Xextern LINE *lalloc(); /* Allocate a line */
X
X#endif
X
X/* terminal table defined only in TERM.C */
X
X#ifndef termdef
Xextern TERM term; /* Terminal information. */
X#endif
X
X
FRIDAY_NIGHT
echo extracting - efunc.h
sed 's/^X//' > efunc.h << 'FRIDAY_NIGHT'
X/* EFUNC.H: MicroEMACS function declarations and names
X
X This file list all the C code functions used by MicroEMACS
X and the names to use to bind keys to them. To add functions,
X declare it here in both the extern function list and the name
X binding table.
X
X*/
X
X/* External function declarations */
X
Xextern int ctrlg(); /* Abort out of things */
Xextern int quit(); /* Quit */
Xextern int ctlxlp(); /* Begin macro */
Xextern int ctlxrp(); /* End macro */
Xextern int ctlxe(); /* Execute macro */
Xextern int fileread(); /* Get a file, read only */
Xextern int filefind(); /* Get a file, read write */
Xextern int filewrite(); /* Write a file */
Xextern int filesave(); /* Save current file */
Xextern int filename(); /* Adjust file name */
Xextern int getccol(); /* Get current column */
Xextern int gotobol(); /* Move to start of line */
Xextern int forwchar(); /* Move forward by characters */
Xextern int gotoeol(); /* Move to end of line */
Xextern int backchar(); /* Move backward by characters */
Xextern int forwline(); /* Move forward by lines */
Xextern int backline(); /* Move backward by lines */
Xextern int forwpage(); /* Move forward by pages */
Xextern int backpage(); /* Move backward by pages */
Xextern int gotobob(); /* Move to start of buffer */
Xextern int gotoeob(); /* Move to end of buffer */
Xextern int setfillcol(); /* Set fill column. */
Xextern int setmark(); /* Set mark */
Xextern int swapmark(); /* Swap "." and mark */
Xextern int forwsearch(); /* Search forward */
Xextern int backsearch(); /* Search backwards */
Xextern int sreplace(); /* search and replace */
Xextern int qreplace(); /* search and replace w/query */
Xextern int showcpos(); /* Show the cursor position */
Xextern int nextwind(); /* Move to the next window */
Xextern int prevwind(); /* Move to the previous window */
Xextern int onlywind(); /* Make current window only one */
Xextern int splitwind(); /* Split current window */
Xextern int mvdnwind(); /* Move window down */
Xextern int mvupwind(); /* Move window up */
Xextern int enlargewind(); /* Enlarge display window. */
Xextern int shrinkwind(); /* Shrink window. */
Xextern int listbuffers(); /* Display list of buffers */
Xextern int usebuffer(); /* Switch a window to a buffer */
Xextern int killbuffer(); /* Make a buffer go away. */
Xextern int reposition(); /* Reposition window */
Xextern int refresh(); /* Refresh the screen */
Xextern int twiddle(); /* Twiddle characters */
Xextern int tab(); /* Insert tab */
Xextern int newline(); /* Insert CR-LF */
Xextern int indent(); /* Insert CR-LF, then indent */
Xextern int openline(); /* Open up a blank line */
Xextern int deblank(); /* Delete blank lines */
Xextern int quote(); /* Insert literal */
Xextern int backword(); /* Backup by words */
Xextern int forwword(); /* Advance by words */
Xextern int forwdel(); /* Forward delete */
Xextern int backdel(); /* Backward delete */
Xextern int killtext(); /* Kill forward */
Xextern int yank(); /* Yank back from killbuffer. */
Xextern int upperword(); /* Upper case word. */
Xextern int lowerword(); /* Lower case word. */
Xextern int upperregion(); /* Upper case region. */
Xextern int lowerregion(); /* Lower case region. */
Xextern int capword(); /* Initial capitalize word. */
Xextern int delfword(); /* Delete forward word. */
Xextern int delbword(); /* Delete backward word. */
Xextern int killregion(); /* Kill region. */
Xextern int copyregion(); /* Copy region to kill buffer. */
Xextern int spawncli(); /* Run CLI in a subjob. */
Xextern int spawn(); /* Run a command in a subjob. */
X#if BSD
Xextern int bktoshell(); /* suspend emacs to parent shell*/
Xextern int rtfrmshell(); /* return from a suspended state*/
X#endif
Xextern int quickexit(); /* low keystroke style exit. */
Xextern int setmode(); /* set an editor mode */
Xextern int delmode(); /* delete a mode */
Xextern int gotoline(); /* go to a numbered line */
Xextern int namebuffer(); /* rename the current buffer */
X#if WORDPRO
Xextern int gotobop(); /* go to begining/paragraph */
Xextern int gotoeop(); /* go to end/paragraph */
Xextern int fillpara(); /* fill current paragraph */
X#endif
Xextern int help(); /* get the help file here */
Xextern int deskey(); /* describe a key's binding */
Xextern int viewfile(); /* find a file in view mode */
Xextern int insfile(); /* insert a file */
Xextern int scrnextup(); /* scroll next window back */
Xextern int scrnextdw(); /* scroll next window down */
Xextern int bindtokey(); /* bind a function to a key */
Xextern int unbindkey(); /* unbind a key's function */
Xextern int namedcmd(); /* execute named command */
Xextern int desbind(); /* describe bindings */
Xextern int execcmd(); /* execute a command line */
Xextern int execbuf(); /* exec commands from a buffer */
Xextern int execfile(); /* exec commands from a file */
Xextern int nextbuffer(); /* switch to the next buffer */
X#if WORDPRO
Xextern int killpara(); /* kill the current paragraph */
X#endif
Xextern int setgmode(); /* set a global mode */
Xextern int delgmode(); /* delete a global mode */
Xextern int insspace(); /* insert a space forword */
Xextern int forwhunt(); /* hunt forward for next match */
Xextern int backhunt(); /* hunt backwards for next match*/
Xextern int pipe(); /* pipe command into buffer */
Xextern int filter(); /* filter buffer through dos */
Xextern int delwind(); /* delete the current window */
Xextern int cbuf1(); /* execute numbered comd buffer */
Xextern int cbuf2();
Xextern int cbuf3();
Xextern int cbuf4();
Xextern int cbuf5();
Xextern int cbuf6();
Xextern int cbuf7();
Xextern int cbuf8();
Xextern int cbuf9();
Xextern int cbuf10();
Xextern int cbuf11();
Xextern int cbuf12();
Xextern int cbuf13();
Xextern int cbuf14();
Xextern int cbuf15();
Xextern int cbuf16();
Xextern int cbuf17();
Xextern int cbuf18();
Xextern int cbuf19();
Xextern int cbuf20();
Xextern int cbuf21();
Xextern int cbuf22();
Xextern int cbuf23();
Xextern int cbuf24();
Xextern int cbuf25();
Xextern int cbuf26();
Xextern int cbuf27();
Xextern int cbuf28();
Xextern int cbuf29();
Xextern int cbuf30();
Xextern int cbuf31();
Xextern int cbuf32();
Xextern int cbuf33();
Xextern int cbuf34();
Xextern int cbuf35();
Xextern int cbuf36();
Xextern int cbuf37();
Xextern int cbuf38();
Xextern int cbuf39();
Xextern int cbuf40();
Xextern int storemac(); /* store text for macro */
Xextern int resize(); /* resize current window */
Xextern int clrmes(); /* clear the message line */
Xextern int meta(); /* meta prefix dummy function */
Xextern int cex(); /* ^X prefix dummy function */
Xextern int istring(); /* insert string in text */
Xextern int unmark(); /* unmark current buffer */
X#if ISRCH
Xextern int fisearch(); /* forward incremental search */
Xextern int risearch(); /* reverse incremental search */
X#endif
X#if WORDPRO
Xextern int wordcount(); /* count words in region */
X#endif
Xextern int savewnd(); /* save current window */
Xextern int restwnd(); /* restore current window */
Xextern int upscreen(); /* force screen update */
Xextern int writemsg(); /* write text on message line */
X
X/* Name to function binding table
X
X This table gives the names of all the bindable functions
X end their C function address. These are used for the bind-to-key
X function.
X*/
X
XNBIND names[] = {
X {"add-mode", setmode},
X {"add-global-mode", setgmode},
X {"backward-character", backchar},
X {"begin-macro", ctlxlp},
X {"begining-of-file", gotobob},
X {"begining-of-line", gotobol},
X {"bind-to-key", bindtokey},
X {"buffer-position", showcpos},
X {"case-region-lower", lowerregion},
X {"case-region-upper", upperregion},
X {"case-word-capitalize", capword},
X {"case-word-lower", lowerword},
X {"case-word-upper", upperword},
X {"change-file-name", filename},
X {"clear-and-redraw", refresh},
X {"clear-message-line", clrmes},
X {"copy-region", copyregion},
X#if WORDPRO
X {"count-words", wordcount},
X#endif
X {"ctlx-prefix", cex},
X {"delete-blank-lines", deblank},
X {"delete-buffer", killbuffer},
X {"delete-mode", delmode},
X {"delete-global-mode", delgmode},
X {"delete-next-character", forwdel},
X {"delete-next-word", delfword},
X {"delete-other-windows", onlywind},
X {"delete-previous-character", backdel},
X {"delete-previous-word", delbword},
X {"delete-window", delwind},
X {"describe-bindings", desbind},
X {"describe-key", deskey},
X {"end-macro", ctlxrp},
X {"end-of-file", gotoeob},
X {"end-of-line", gotoeol},
X {"exchange-point-and-mark", swapmark},
X {"execute-buffer", execbuf},
X {"execute-command-line", execcmd},
X {"execute-file", execfile},
X {"execute-macro", ctlxe},
X {"execute-macro-1", cbuf1},
X {"execute-macro-2", cbuf2},
X {"execute-macro-3", cbuf3},
X {"execute-macro-4", cbuf4},
X {"execute-macro-5", cbuf5},
X {"execute-macro-6", cbuf6},
X {"execute-macro-7", cbuf7},
X {"execute-macro-8", cbuf8},
X {"execute-macro-9", cbuf9},
X {"execute-macro-10", cbuf10},
X {"execute-macro-11", cbuf11},
X {"execute-macro-12", cbuf12},
X {"execute-macro-13", cbuf13},
X {"execute-macro-14", cbuf14},
X {"execute-macro-15", cbuf15},
X {"execute-macro-16", cbuf16},
X {"execute-macro-17", cbuf17},
X {"execute-macro-18", cbuf18},
X {"execute-macro-19", cbuf19},
X {"execute-macro-20", cbuf20},
X {"execute-macro-21", cbuf21},
X {"execute-macro-22", cbuf22},
X {"execute-macro-23", cbuf23},
X {"execute-macro-24", cbuf24},
X {"execute-macro-25", cbuf25},
X {"execute-macro-26", cbuf26},
X {"execute-macro-27", cbuf27},
X {"execute-macro-28", cbuf28},
X {"execute-macro-29", cbuf29},
X {"execute-macro-30", cbuf30},
X {"execute-macro-31", cbuf31},
X {"execute-macro-32", cbuf32},
X {"execute-macro-33", cbuf33},
X {"execute-macro-34", cbuf34},
X {"execute-macro-35", cbuf35},
X {"execute-macro-36", cbuf36},
X {"execute-macro-37", cbuf37},
X {"execute-macro-38", cbuf38},
X {"execute-macro-39", cbuf39},
X {"execute-macro-40", cbuf40},
X {"execute-named-command", namedcmd},
X {"exit-emacs", quit},
X#if WORDPRO
X {"fill-paragraph", fillpara},
X#endif
X {"filter-buffer", filter},
X {"find-file", filefind},
X {"forward-character", forwchar},
X {"goto-line", gotoline},
X {"grow-window", enlargewind},
X {"handle-tab", tab},
X {"hunt-forward", forwhunt},
X {"hunt-backward", backhunt},
X {"help", help},
X {"i-shell", spawncli},
X#if ISRCH
X {"incremental-search", fisearch},
X#endif
X {"insert-file", insfile},
X {"insert-space", insspace},
X {"insert-string", istring},
X#if WORDPRO
X {"kill-paragraph", killpara},
X#endif
X {"kill-region", killregion},
X {"kill-to-end-of-line", killtext},
X {"list-buffers", listbuffers},
X {"meta-prefix", meta},
X {"move-window-down", mvdnwind},
X {"move-window-up", mvupwind},
X {"name-buffer", namebuffer},
X {"newline", newline},
X {"newline-and-indent", indent},
X {"next-buffer", nextbuffer},
X {"next-line", forwline},
X {"next-page", forwpage},
X#if WORDPRO
X {"next-paragraph", gotoeop},
X#endif
X {"next-window", nextwind},
X {"next-word", forwword},
X {"open-line", openline},
X {"pipe-command", pipe},
X {"previous-line", backline},
X {"previous-page", backpage},
X#if WORDPRO
X {"previous-paragraph", gotobop},
X#endif
X {"previous-window", prevwind},
X {"previous-word", backword},
X {"query-replace-string", qreplace},
X {"quick-exit", quickexit},
X {"quote-character", quote},
X {"read-file", fileread},
X {"redraw-display", reposition},
X {"resize-window", resize},
X {"restore-window", restwnd},
X {"replace-string", sreplace},
X#if ISRCH
X {"reverse-incremental-search", risearch},
X#endif
X {"save-file", filesave},
X {"save-window", savewnd},
X {"scroll-next-up", scrnextup},
X {"scroll-next-down", scrnextdw},
X {"search-forward", forwsearch},
X {"search-reverse", backsearch},
X {"select-buffer", usebuffer},
X {"set-fill-column", setfillcol},
X {"set-mark", setmark},
X {"shell-command", spawn},
X {"shrink-window", shrinkwind},
X {"split-current-window", splitwind},
X {"store-macro", storemac},
X#if BSD
X {"suspend-emacs", bktoshell},
X#endif
X {"transpose-characters", twiddle},
X {"unbind-key", unbindkey},
X {"unmark-buffer", unmark},
X {"update-screen", upscreen},
X {"view-file", viewfile},
X {"write-file", filewrite},
X {"write-message", writemsg},
X {"yank", yank},
X
X {"", NULL}
X};
FRIDAY_NIGHT
echo extracting - emacs.hlp
sed 's/^X//' > emacs.hlp << 'FRIDAY_NIGHT'
X=> MicroEMACS 3.7 Help screens (07/02/86)
X
X M- means to use the <ESC> key prior to using another key
X ^A means to use the control key at the same time as the A key
X
X^V or [Pg Dn] Scroll down M-< or <HOME> Begining of file
X^Z or [Pg Up] Scroll up M-> or <END> End of file
X
X-----------------------------------------------------------------------
X=> (1) MOVING THE CURSOR
X
X^F Forward character M-F Forward word Keypad arrows
X^B Backward character M-B Backward word are active!
X^A Front of line M-G Goto a line
X^E End of line
X^N Next line M-N Front of paragraph
X^P Previous line M-P End of paragraph
X-----------------------------------------------------------------------
X=> (2) DELETING & INSERTING
X
X<-- Delete previous character
X^D or <DELETE> Delete next character
X^C or <INSERT> Insert a space
XM-<-- Delete previous word
XM-D Delete next word
X^K Close (delete) to end of line
X-----------------------------------------------------------------------
X=> (2a) MORE DELETING & INSERTING
X
X<RETURN> Insert a newline <TAB> Advance to next tab stop
X^J Insert a newline and indent M-^W Delete paragraph
X^O Open (insert) line
X^W Delete region between mark (set using M-<spacebar>) and cursor
XM-W Copy region to kill buffer
X^X ^O Delete blank lines around cursor
X-----------------------------------------------------------------------
X=> (3) SEARCHING
X
X^S Search forward from cursor position.
X^R Reverse search from cursor position.
X^X S Forward incremental search
X^X R Reverse incremental search
X<ALT> S Search for the next occurence of the last string (IBM-PC only)
X<ALT> R Search for the last occurence of the last string (IBM-PC only)
X-----------------------------------------------------------------------
X=> (4) REPLACING
X
XM-R Replace all instances of first typed-in string with second
X typed-in string. End each string with ESC.
XM-^R Replace with query. Answer with:
X ^G cancel . exit to entry point
X ! replace the rest Y replace & continue
X ? Get a list of options N no replacement & continue
X-----------------------------------------------------------------------
X=> (5) CAPITALIZING & TRANSPOSING
X
XM-U UPPERCASE word
XM-C Capitalize word ^T Transpose characters
XM-L lowercase word
X^X ^L lowercase region
X^X ^U uppercase region
X^Q Quote next entry, so that control codes may be entered into text
X-----------------------------------------------------------------------
X=> (6) REGIONS & THE KILL BUFFER
X
XM-<spacebar> set MARK at current position
X^X ^X eXchange mark and cursor
X
XA REGION will then be continuously-defined as the area between the mark and
Xthe current cursor position. The KILL BUFFER is the text which has been
Xmost recently saved or deleted.
X-----------------------------------------------------------------------
X=> (7) COPYING AND MOVING
X
X^W Delete (Wipe) region M-W copy region to KILL buffer
X^Y Yankback save buffer at cursor
XGenerally, the procedure for copying or moving text is:
X 1) Mark a REGION using M-<spacebar> at beginning and cursor at end.
X 2) Delete it (with ^W) or copy it (with M-W) into the KILL buffer.
X 3) Move the cursor to the desired location and yank it back (with ^Y).
X-----------------------------------------------------------------------
X=> (8) MODES OF OPERATION
X^X M Add mode in buffer M-M Add global mode
X^X ^M Delete mode in buffer M-^M Delete global mode
XOVER Replaces (overwrites) rather than inserts characters
XWRAP Turns on word wrap (automatic carraige return).
XVIEW Allows viewing file without insertion and deletion.
XCMODE Automatic indenting for C program entry
XEXACT/MAGIC Changes how search and replace commands work (see next page)
X-----------------------------------------------------------------------
X=> (9) SEARCH AND REPLACE MODES
X
XEXACT Uppper/lower case is not ignored in searches
XMAGIC Regular pattern matching characters are active
X ? Matches any one character
X * Matches any sequence of characters
X [EXACT MODE NOT READY YET ---- 6/5/86]
X
X-----------------------------------------------------------------------
X=> (10) ON-SCREEN FORMATTING
X
X^X F Set fill column
XMn-<tab> Set tab spacing to n charecters between tabs stops
XM-Q Format paragraph so that text lies between margins
X^X = Position report -- displays line number, char count,
X file size and character under cursor
XM-^C Count words/lines/chars in marked region
X-----------------------------------------------------------------------
X=> (11) MULTIPLE WINDOWS
X
XMany WINDOWS may be active at once on the screen. All windows may show
Xdifferent parts of the same buffer, or each may display a different one.
X^X 2 Split the current window in two ^X O Change to next window
X^X 0 delete current window ^X P Change to previous window
X^X 1 delete all other windows M-^V Page down next window
X M-^Z Page up other window
X-----------------------------------------------------------------------
X=> (12) CONTROLLING WINDOWS
X
X^X ^ Enlarge current window M-<n> ^X W Resize window to <n> lines
X^X ^Z Shrink current window
X^X ^N Move window down
X^X ^P Move window up
XM-^L Reposition window
X^L Refresh the screen
X-----------------------------------------------------------------------
X=> (13) MULTIPLE BUFFERS
XA BUFFER is a named area containing a document being edited. Many buffers
Xmay be activated at once.
X^X B Switch to another buffer. <CR> = use just-previous buffer
X^X X Switch to next buffer in buffer list
XM-^N Change name of current buffer
X^X K Delete a non-displayed buffer.
X^X ^B Display buffer directory in a window
X-----------------------------------------------------------------------
X=> (14) READING FROM DISK
X
X^X ^F Find file; read into a new buffer created from filename.
X (This is the usual way to begin editing a new file.)
X^X ^R Read file into current buffer, erasing its previous contents.
X No new buffer will be created.
X^X ^I Insert file into current buffer at cursor's location.
X^X ^V Find a file to make current in VIEW mode
X-----------------------------------------------------------------------
X=> (15) SAVING TO DISK
X
X^X ^S Save current buffer to disk
X^X ^W Write current buffer to disk
X^X N Change file name of current buffer
XM-Z Write out all changed buffers and exit MicroEMACS
X
X
X-----------------------------------------------------------------------
X=> (16) ACCESSING THE OPERATING SYSTEM
X
X^X ! Send one command to the operating system and return
X^X @ Pipe DOS command results to buffer
X^X # Filter buffer through DOS filter program
X^X C Start a new command processor under MicroEMACS
X^X D Suspend MicroEMACS into the background (UNIX BSD4.2 only)
X^X ^C Exit MicroEMACS
X-----------------------------------------------------------------------
X=> (17) KEY BINDINGS AND COMMANDS
X
XM-K Bind a key to a command
XM-^K Unbind a key from a command
X^X ? Describe command bound to a key
XM-X Execute a named (and possibly unbound) command
X{Describe-bindings}
X Display a list of all commands and key bindings to a buffer
X-----------------------------------------------------------------------
X=> (18) COMMAND EXECUTION
XCommands can be specified as command lines in the form:
X <optional repeat count> {command-name} <optional arguments>
X{Execute-command-line} execute a typed in command line
X{Execute-buffer} executes commands lines in a buffer
X{Execute-file} executes command lines from a file
X{clear-message-line} clears the message line during execution
X M-~ clears the change flag for a buffer
X-----------------------------------------------------------------------
X=> (19) MACRO EXECUTION
X
X^X ( Start recording keyboard macro
X^X ) Stop recording keyboard macro
X^X E Execute keyboard macro
XM-<n> {store-macro} Start recording named macro
X [end] Stop recording named macro
X{execute-macro-n} Execute macro n (where n is from 1 to 20)
X-----------------------------------------------------------------------
X=> (20) SPECIAL KEYS
X
X^G Cancel current command and return to top level of processing.
X^U or Universal repeat. May be followed by an integer (default = 4)
XM-<digit> and repeats the next command that many times.
XM-X Execute a named (and possibly unbound) command
X
X
FRIDAY_NIGHT
echo extracting - emacs.key
sed 's/^X//' > emacs.key << 'FRIDAY_NIGHT'
X Default Key Bindings for MicroEmacs 3.7 (06/05/86)
X ========================================
X
X ^A Move to start of line
X ^B Move backward by characters ESC B Backup by words
X ^C Insert space ESC C Initial capitalize word
X ^D Forward delete ESC D Delete forward word
X ^E Goto end of line
X ^F Move forward by characters ESC F Advance by words
X ^G Abort out of things ESC G Go to a line
X ^H Backward delete
X ^I Insert tab/Set tab stops
X ^J Insert CR-LF, then indent
X ^K Kill forward ESC K Bind Key to function
X ^L Refresh the screen ESC L Lower case word
X ^M Insert CR-LF ESC M Add global mode
X ^N Move forward by lines ESC N Goto End paragraph
X ^O Open up a blank line
X ^P Move backward by lines ESC P Goto Begining of paragraph
X ^Q Insert literal ESC Q Fill current paragraph
X ^R Search backwards ESC R Search and replace
X ^S Search forward
X ^T Transpose characters
X ^U Repeat command four times ESC U Upper case word
X ^V Move forward by pages ESC V Move backward by pages
X ^W Kill region ESC W Copy region to kill buffer
X ^Y Yank back from killbuffer ESC X Execute named command
X ^Z Move backward by pages ESC Z Save all buffers and exit
X
X ESC ^C Count words in region ESC ~ Unmark current buffer
X ESC ^H Delete backward word ESC ! Reposition window
X ESC ^K Unbind Key from function ESC < Move to start of buffer
X ESC ^L Reposition window ESC > Move to end of buffer
X ESC ^M Delete global mode ESC . Set mark
X ESC ^N Rename current buffer ESC space Set mark
X ESC ^R Search & replace w/query ESC rubout Delete backward word
X ESC ^V Scroll next window down rubout Backward delete
X ESC ^W Delete Paragraph
X ESC ^Z Scroll next window up
X
X ^X ? Describe a key ^X ! Run 1 command in a subjob
X ^X = Show the cursor position ^X @ Pipe DOS command to buffer
X ^X ^ Enlarge display window ^X # Filter buffer thru DOS filter
X ^X 0 Delete current window ^X ( Begin macro
X ^X 1 Delete other windows ^X ) End macro
X ^X 2 Split current window
X
X ^X ^B Display buffer list ^X B Switch a window to a buffer
X ^X ^C Exit MicroEMACS ^X C Start a new command processer
X ^X D Suspend MicroEMACS (BSD4.2 only)
X ^X E Execute macro
X ^X ^F Find file ^X F Set fill column
X ^X ^I Insert file
X ^X K Delete buffer
X ^X ^L Lower case region
X ^X ^M Delete Mode ^X M Add a mode
X ^X ^N Move window down ^X N Rename current filename
X ^X ^O Delete blank lines ^X O Move to the next window
X ^X ^P Move window up ^X P Move to the previous window
X ^X ^R Get a file from disk ^X R Incremental reverse search
X ^X ^S Save current file ^X S Incremental forward search
X ^X ^U Upper case region
X ^X ^V View file
X ^X ^W Write a file to disk ^X W resize Window
X ^X ^X Swap "." and mark ^X X Use next buffer
X ^X ^Z Shrink window ^X Z Enlarge display window
X
XOnly under PCDOS:
X <ALT>-S Hunt forward SHIFT <F1> - <F10>
X <ALT>-R Hunt backward Execute macroes 1 - 10
X
XUnbound commands:
X=================
Xdescribe-bindings pull the list of current bindings into a window
Xclear-message-line clears the message line (for in macroes)
Xexecute-buffer execute a buffer od command lines
Xexecute-command-line execute a command line (n <command> <args>)
Xexecute-file execute a file of command lines
Xexecute-named-command execute a command by name (w/command completion)
Xexecute-macro-[1-20] execute macroes 1 thru 20
Xhunt-forward find next occurance of search string
Xhunt-backward find last occurance of search string
X
XUsable Modes
X============
XWRAP Lines going past right margin "wrap" to a new line
XVIEW Read-Only mode where no modifications are allowed
XCMODE Change behavior of some commands to work with C better
XEXACT Exact case matching on search strings
XOVER Overwrite typed characters instead of inserting them
XMAGIC Use regular expresion matching in searches [NOT READY YET]
X
XWHITE/CYAN/MAGENTA/YELLOW/BLUE/RED/GREEN/BLACK Sets foreground color
Xwhite/cyan/magenta/yellow/blue/red/green/black Sets background color
FRIDAY_NIGHT
echo extracting - emacs.rc
sed 's/^X//' > emacs.rc << 'FRIDAY_NIGHT'
X; EMACS.RC: Startup file for MicroEMACS 3.4
X;
X; This file is executed everytime the
X; editor is entered
X
X; ***** Rebind the Function key group
X
Xbind-to-key execute-named-command FN;
Xbind-to-key execute-file FN<
Xbind-to-key hunt-forward FN=
Xbind-to-key hunt-backward FN>
Xbind-to-key next-window FN?
Xbind-to-key execute-macro FN@
Xbind-to-key find-file FNA
Xbind-to-key view-file FNB
Xbind-to-key save-file FNC
Xbind-to-key exit-emacs FND
X
X; set screen colors
Xadd-global-mode "blue"
X
X; Enter Help
X1 store-macro
X help
X 8 resize-window
X bind-to-key execute-macro-12 FNI
X bind-to-key execute-macro-13 FNQ
X bind-to-key execute-macro-11 FNT
X add-mode "red"
X begining-of-file
X 2 forward-character
X clear-message-line
X[end]
X
X; consult file
X2 store-macro
X 2 split-current-window
X previous-window
X view-file "@File to Consult: "
X 8 resize-window
X add-mode "green"
X add-mode "Black"
X next-window
X[end]
X
X; Exit Help
X11 store-macro
X bind-to-key previous-page FNI
X bind-to-key next-page FNQ
X bind-to-key execute-macro-1 FNT
X delete-window
X clear-message-line
X[end]
X
X; last help page
X12 store-macro
X begining-of-line
X search-reverse "=>"
X 1 redraw-display
X[end]
X
X; next help page
X13 store-macro
X begining-of-line
X 2 forward-character
X search-forward "=>"
X 1 redraw-display
X[end]
X
X; bring up the function key window
X
X 2 split-current-window
X select-buffer "Function Keys"
X add-mode "red"
X 2 resize-window
X insert-string "F1 exec cmd F2 exec file F3 hunt F4 back hunt F5 next window"
X newline
X insert-string "F6 exec macro F7 find file F8 view file F9 save file F10 exit emacs"
X begining-of-file
X unmark-buffer
X next-window
FRIDAY_NIGHT
echo es.3 completed!
: That's all folks!