[comp.emacs] troff version of microemacs doc part 5 of 6

klotz@ihlpm.ATT.COM (Dave Klotzbach) (05/24/89)

# This is a shell archive.  Remove anything before this line, then feed it
# into a shell via "sh file" or similar.  To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix@uunet.uu.net if you want that tool.
# If this archive is complete, you will see the following message at the end:
#		"End of archive 5 (of 6)."
# Contents:  medoc.p04
# Wrapped by klotz@ihlpm on Wed May 24 11:03:46 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'medoc.p04' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'medoc.p04'\"
else
echo shar: Extracting \"'medoc.p04'\" \(30343 characters\)
sed "s/^X//" >'medoc.p04' <<'END_OF_FILE'
X
X.ne 1.0i
X.sp 2
X.SS "\fB!IF, !ELSE, and !ENDIF Directives\fB"
X
X
X This directive allows statements only to be executed if a
Xcondition specified in the directive is met. Every line following the
X!IF directive, until the first !ELSE or !ENDIF directive, is only
Xexecuted if the expression following the !IF directive evaluates to a
XTRUE value. For example, the following macro segment creates the
Xportion of a text file automatically. (yes believe me, this will be
Xeasier to understand then that last explanation....)
X
X.nf
X.ft CW
X
X	!if &sequal %curplace "timespace vortex"
X		insert-string "First, rematerialize~n"
X	!endif
X	!if &sequal %planet "earth"	;If we have landed on earth...
X		!if &sequal %time "late 20th century"  ;and we are then
X			write-message "Contact U.N.I.T."
X		!else
X			insert-string "Investigate the situation....~n"
X			insert-string "(SAY 'stay here Sara')~n"
X		!endif
X	!else
X		set %conditions @"Atmosphere conditions outside? "
X		!if &sequal %conditions "safe"
X			insert-string &cat "Go outside......" "~n"
X			insert-string "lock the door~n"
X		!else
X			insert-string "Dematerialize..try somewhen else"
X			newline
X		!endif
X	!endif\fR
X.fi
X
X\fB
X
X.ne 1.0i
X.sp 2
X.SS "\fB!GOTO Directive\fB"
X
X
X Flow can be controlled within a MicroEMACS macro using the !GOTO
Xdirective. It takes as an argument a label. A label consists of a line
Xstarting with an asterisk (*) and then an alphanumeric label. Only
Xlabels in the currently executing macro can be jumped to, and trying to
Xjump to a non-existing label terminates execution of a macro. For
Xexample..
X
X.nf
X.ft CW
X
X	;Create a block of DATA statements for a BASIC program
X
X		insert-string "1000 DATA "
X		set %linenum 1000
X
X	*nxtin
X		update-screen		;make sure we see the changes
X		set %data @"Next number: "
X		!if &equal %data 0
X			!goto finish
X		!endif
X
X		!if &greater $curcol 60
X			2 delete-previous-character
X			newline
X			set %linenum &add %linenum 10
X			insert-string &cat %linenum " DATA "
X		!endif
X
X		insert-string &cat %data ", "
X		!goto nxtin
X
X	*finish
X
X		2 delete-previous-character
X		newline\fR
X.fi
X
X\fB
X
X.ne 1.0i
X.sp 2
X.SS "\fB!WHILE and !ENDWHILE Directives\fB"
X
X
X This directive allows you to set up repetitive tasks easily and
Xefficiently. If a group of statements need to be executed while a
Xcertain condition is true, enclose them with a while loop. For example,
X
X.nf
X.ft CW
X
X	!while &less $curcol 70
X		insert-string &cat &cat "[" #stuff "]"
X	!endwhile\fR
X.fi
X
X\fB
X
X places items from buffer ``item'' in the current line until the
Xcursor is at or past column 70. While loops may be nested and can
Xcontain and be the targets of !GOTOs with no ill effects. Using a while
Xloop to enclose a repeated task will run much faster than the
Xcorresponding construct using !IFs.
X
X.ne 1.0i
X.sp 2
X.SS "\fB!BREAK Directive\fB"
X
X
X This directive allows the user to abort out of the currently
Xmost inner while loop, regardless of the condition. It is often used
Xto abort processing for error conditions. For example:
X
X.nf
X.ft CW
X
X;	Read in files and substitute "begining" with "beginning"
X
X	set %filename #list
X	!while &not &seq %filename "<end>"
X!force		find-file %filename
X		!if &seq $status FALSE
X			write-message "[File read error]"
X			!break
X		!endif
X		beginning-of-file
X		replace-string "begining" "beginning"
X		save-file
X		set %filename #list
X	!endwhile\fR
X.fi
X
X\fB
X
X This while loop will process files until the list is exhausted
Xor there is an error while reading a file.
X
X.ne 1.0i
X.sp 2
X.SS "\fB!RETURN Directive\fB"
X
X
X The !RETURN Directive causes the current macro to exit, either
Xreturning to the caller (if any) or to interactive mode. For example:
X
X.nf
X.ft CW
X
X	;	Check the monitor type and set %mtyp
X
X	!if &sres "CGA"
X		set %mtyp 1
X		!return
X	!else
X		set %mtyp 2
X	!endif
X
X	insert-string "You are on a MONOCHROME machine!~n"\fR
X.fi
X
X\fB
X.CH "Debugging MicroEMACS macroes"
X
X
X   When developing new macroes, it
Xis very convenient to be able to trace their execution to find errors. 
XThe $debug environment variable enables macro debugging. While this
Xvariable is TRUE, emacs will stop at each macro line it intends to
Xexecute and allow you to view it, and issue a number of different
Xcommands to help determine how the macro is executing.
X
X For example, we will step through the macro which toggles the
Xfunction key window off. The first thing to do, is to set $debug, using
Xthe \fB^XA\fB \fIset command. Type ^XA and emacs will prompt you on the
Xcommand line with ``Variable to set: ''. Type in ``$debug'' and press the
Xenter key. Emacs will then ask ``Value: ''. Type in ``TRUE'' (in capital
Xletters) and press the enter key.
X
X While macro debugging is enabled (as it is now) emacs will
Xreport each time a variable is assigned a value, by displaying the
Xvariable and its value on the command line. Right now,
X
X.ad l
X((($debug <- TRUE)))
X.na
X
X
X appears on the command line to tell you that $debug now has been
Xassigned the value of TRUE. Press the space bar to continue.
X
X Now, lets try to debug a macro. Press function key 5 which
Xnormally toggles the function key window. The first thing that appears
Xis:
X
X.ad l
X<<<[Macro 01]:!if %rcfkeys>>>
X.na
X
X
X At this point, emacs is waiting for a command. It is prepared
Xto see if the user variable %rcfkeys is TRUE, and execute some lines if
Xthey are. Suppose we want to see the value of this variable, type the
Xletter ``e'' to evaluate an expression. Emacs will prompt with ``EXP: ''. 
XType ``%rcfkeys'' followed by the enter key. Emacs should then respond
Xwith ``TRUE'' to indicate that the function key window is currently on
Xscreen.
X
X Press the space bar to allow the !if directive to execute. 
XEmacs will decide that it is TRUE, and then display the next macro
Xcommand to execute.
X
X.ad l
X<<<[Macro 01]:!goto rcfoff>>>
X.na
X
X
X Notice emacs tells us what macro we are currently executing (in
Xthis case, the macro bound to execute-macro-1). Press the space bar
Xagain to execute the !goto directive.
X
X.ad l
X<<<[Macro 01]:save-window>>>
X.na
X
X
X Emacs is saving the position of the current window so that it
Xcan attempt to return to it after it has brought up the function key window.
X
X[...THIS CHAPTER IS NOT FINISHED...]
X.CH "Key Bindings, What they are and why"
X
X
X One of the features which makes MicroEMACS very adaptable is its
Xability to use different keystrokes to execute different commands. The
Xprocess of changing the particular command a key invokes is called\fIrebinding . This allows us to make the editor
Xlook like other popular editors and programs.
X
X Each command in MicroEMACS has a name which is used for binding
Xpurposes. For example, the command to move the cursor down one page is
Xcalled \fInext-line and is normally bound to the ^N key. If you
Xdecided that you also wanted to use the ^D key to move the cursor down
Xone line, you would use the M-K \fIbind-to-key command. EMACS would respond with ``: bind-to-key ''on the command line
Xand allow you to type in a command name. Then type in the name of the
Xcommand you want to change, in this case \fInext-line,
Xfollowed by the <NL> key. EMACS will then wait for you to type in the
Xkeys you want to activate the named function. Type a single ^D. From
Xnow on, typing ^D will cause EMACS to move down one line, rather than
Xits original function of deleting characters.
X
X To find out the name of a command, consult the list of
Xvalid EMACS commands in Appendix B. Also, you can use the ^X?\fIdescribe-key command to look up the name of a
Xcommand. Type ^X? and then the key to use that command, and EMACS will
Xshow you the name of the command.
X
X After you have experimented with changing your key bindings, you
Xmay decide that you want to change some bindings permanently. To have
XEMACS rebind keys to your pleasure each time you start EMACS, you can
Xadd statements to the end of your startup file (\fBemacs.rc\fB or\fB.emacsrc\fB depending on the system). For example,
X
Xbind-to-key next-line ^D
X
X Notice, that control D character in the startup file is
Xrepresented visibly as an uparrow key followed by a capital D. To know
Xhow to represent any keys you want to bind, use the \fIdescribe-key
Xcommand on the key, and use the sequence that is displayed.
X
Xbind-to-key split-current-window FN1
X
X This example would make function key 1 activate the command
Xthat splits the current window in two. 
X
X EMACS will let you define a large number of keys, but will report 
X``Binding table FULL!'' when it runs out of space to bind keys. Normally 
XEMACS will allow up to 512 key bindings (including approx. 300 originally 
Xbound keys).
X
X If you want to get a current listing of all the commands and
Xthe keys bound to them, use the \fIdescribe-bindings command. Notice, that this command is not
Xbound to any keys!
X
X.if '\*(ct'Chapter' \{\
X.af ch A 
X.nr ch 0 1
X.ds ct Appendix
X.fi\}
X.CH "MicroEMACS Command Line Switches and Startup Files"
X
XWhen EMACS first executes, it always searches for a file,
Xcalled \fB.emacsrc\fB \fIunder most UNIX systems or \fBemacs.rc\fB \fIon
Xmost other systems   which it will
Xexecute as EMACS macros before it reads in the named source files. This
Xfile normally contains EMACS macroes to bind the function keys to
Xuseful functions and load various useful macros. The contents of this
Xfile will probably vary from system to system and can be modified by the
Xuser as desired.
X
X When searching for this file, EMACS looks for it in this order. 
XFirst, it attempts to find a definition for ``\fBHOME\fB'' in the
Xenvironment. It will look in that directory first. Then it searches
Xall the directories listed in the ``\fBPATH\fB'' environment variable. Then
Xit looks through a list of predefined standard directories which vary
Xfrom system to system. Finally, failing all of these, it looks in the
Xcurrent directory. This is also the same method EMACS uses to look up
Xany files to execute, and to find it's help file \fBEMACS.HLP\fB.     On computers that call up EMACS via a command line process, such
Xas MSDOS and UNIX, there are different things that can be added to the
Xcommand line to control the way EMACS operates. These can be switches,
Xwhich are a dash ('-') followed by a letter, and possible other
Xparameters, or a startup file specifier, which is an at sign '@'
Xfollowed by a file name.
X
X
X.ev 1
X@
X.ti -1.0i
X\fB<file>\fB	This causes the named file to be executed instead of the
Xstandard emacs.rc file before emacs reads in any other files. More than
Xone of these can be placed on the command line, and they will be
Xexecuted in the order that they appear. 
X
X
X.ti -1.0i
X\fB-C\fB	The following source files on the command line can be changed (as
Xopposed to being in VIEW mode). This is mainly used to cancel the
Xeffects of the -v switch used previously in the same command line.
X
X
X.ti -1.0i
X\fB-E\fB	This flag causes emacs to automatically run the startup file
X``error.cmd'' instead of emacs.rc. This is used by various C compilers for
Xerror processing (for example, Mark Williams C).  
X.ti -1.0i
X\fB-G<num>\fB	Upon entering EMACS, position the cursor at the <num> line of
Xthe first file.
X
X
X.ti -1.0i
X\fB-I<var> <value>\fB	Initialize an EMACS variable with <value>. This can be
Xuseful to force EMACS to start in a particular mode. (For example,
Xinvoke EMACS with ``emacs -i$sres VGA foo.bar'' to edit file foo.bar
Xin VGA 50 line mode on an IBM-PC).
X
X
X.ti -1.0i
X\fB-K<key>\fB	This key tells emacs to place the source files in CRYPT mode and read it in using <key> as the encryption
Xkey. If no key is listed immediately after the -K switch, EMACS will
Xprompt for a key, and not echo it as it is typed. 
X
X
X.ti -1.0i
X\fB-R\fB	This places EMACS in ``restricted mode''  where any commands allowing the user to read or write any
Xfiles other than the ones listed on the command line are disabled. Also
Xall commands allowing the user access to the operating system are
Xdisabled. This makes EMACS very useful as a ``safe'' environment for use
Xwithin other applications and especially used as a remote editor for a
XBBS or electronic bulletin board system.
X
X
X.ti -1.0i
X\fB-S<string>\fB	After EMACS is started, it automatically searches for
X<string> in the first source file.
X
X
X.ti -1.0i
X\fB-V\fB	This tells EMACS that all the following sources files on the command
Xline should be in VIEW mode to prevent any changes being made to them.
X
X.ev 0
X
X.CH "Command Completion"
X
X
X Some versions of MicroEMACS will allow you to abbrieviate buffer
Xnames, command names and file names as you enter them. To use this,
Xtype in the first few characters of the name you wish, and then hit
Xeither the space bar, the META key or the TAB key. MicroEMACS will then
Xattempt to look at the list of all the availible names and if there is
Xonly one which will fit, it will choose that name. If there are several
Xnames that quailify, as many characters as are common to ALL of them
Xwill be entered. If there are no possible matches, the bell will ring
Xto indicate MicroEMACS can not complete the command.
X
X For example, if you have several files in your current directory
Xwith the following names:
X
X.nf
X.ft CW
X
X	prog1.c
X	prog1.obj
X	prog1.exe
X	prog1.doc
X	program.one
X	project.one
X	test.c
X	tes\fR
X.fi
X
X\fB
X
X and you enter the \fB^X^F\fB \fIfind-file command, if you type
X'p' and then hit the space bar, EMACS will respond by typing the 'r'
Xthat is common to all the above file names begining with 'p'. If you
Xthen type 'ogr' and hit the tab key, EMACS will respond with 'am.one'
Xand automatically hit the enter key for you.
X
X If you were to instead type an 'a' and hit the space bar, EMACS
Xwill beep, informing you that there is no possible match.
X
X If you type a 'te' and hit the space bar, EMACS will then type
Xthe following 's', but it will not automatically enter it because it is
Xpossible you mean to get to the test.c file.
X
X Buffer name, and command name completion is available in all
Xversions of MicroEMACS. File name completion is available on UNIX
XBSD4.3, the Atari ST, the AMIGA and under MSDOS.
X.if '\*(ct'Chapter' \{\
X.af ch A 
X.nr ch 0 1
X.ds ct Appendix
X.fi\}
X.CH "MicroEMACS commands"
X
X
X Below is a complete list of the commands in EMACS, the keys
Xnormally used to do the command, and what the command does. Remember,
Xon some computers there may also be additional ways of using a command
X(cursor keys and special function keys for example). 
X
X.nf
X.ft CW
X
X.us  "Command			Binding 	Meaning"
X
Xabort-command		 ^G	This allows the user to abort out of any
X				command that is waiting for input
X
Xadd-mode		 ^XM	Add a mode to the current buffer
X
Xadd-global-mode 	 M-M	Add a global mode for all new buffers
X
Xapropos 		 M-A	List out commands whose name contains
X				the string specified
X
Xbackward-character	 ^B	Move one character to the left
X
Xbegin-macro		 ^X(	Begin recording a keyboard macro
X
Xbeginning-of-file	 M-<	Move to the beginning of the file in
X				the current buffer
X
Xbeginning-of-line	 ^A	Move to the beginning of the current line
X
Xbind-to-key		 M-K	Bind a key to a function
X
Xbuffer-position 	 ^X=	List the position of the cursor in the
X				current window on the command line
X
Xcase-region-lower	 ^X^L	Make a marked region all lower case
X
Xcase-region-upper	 ^X^U	Make a marked region all upper case
X
Xcase-word-capitalize	 M-C	Capitalize the following word
X
Xcase-word-lower 	 M-L	Lower case the following word
X
Xcase-word-upper 	 M-U	Upper case the following word
X
Xchange-file-name	 ^XN	Change the name of the file in the
X				current buffer
X
Xchange-screen-size	(none)	Change the number of lines of the screen
X				currently being used
X
Xchange-screen-width	(none)	Change the number of columns of the
X				screen currently being used
X
Xclear-and-redraw	 ^L	Clear the physical screen and redraw it
X
Xclear-message-line	(none)	Clear the command line
X
Xcopy-region		 M-W	Copy the currently marked region into
X				the kill buffer
X
Xcount-words		 M-^C	Count how many words, lines and
X				characters are in the current marked region
X
Xctlx-prefix		 ^X	Change the key used as the ^X prefix
X
Xdelete-blank-lines	 ^X^O	Delete all blank lines around the cursor
X
Xdelete-buffer		 ^XK	Delete a buffer which is not being
X				currently displayed in a window
X
Xdelete-mode		 ^X^M	Turn off a mode in the current buffer
X
Xdelete-global-mode	 M-^M	Turn off a global mode
X
Xdelete-next-character	 ^D	Delete the character following the cursor
X
Xdelete-next-word	 M-D	Delete the word following the cursor
X
Xdelete-other-windows	 ^X1	Make the current window cover the entire
X				screen
X
Xdelete-previous-character^H	Delete the character to the left of the
X				cursor
X
Xdelete-previous-word	 M-^H	Delete the word to the left of the cursor
X
Xdelete-window		 ^X0	Remove the current window from the screen
X
Xdescribe-bindings	(none)	Make a list of all legal commands
X
Xdescribe-key		 ^X?	Describe what command is bound to a
X				keystroke sequence
X
Xdetab-region		 ^X^D	Change all tabs in a region to the
X				equivalent spaces
X
Xdisplay 		^XG	Prompts the user for a variable and
X				displays its current value
X
Xdump-variables		 none	Places into a buffer the current values
X				of all environment and user variables
X
Xend-macro		 ^X)	stop recording a keyboard macro
X
Xend-of-file		 M->	Move cursor to the end of the current buffer
X
Xend-of-line		 ^E	Move to the end of the current line
X
Xentab-region		 ^X^E	Change multiple spaces to tabs where
X				possible
X
Xexchange-point-and-mark  ^X^X	Move cursor to the last marked spot,
X				make the original position be marked
X
Xexecute-buffer		(none)	Execute a buffer as a macro
X
Xexecute-command-line	(none)	Execute a line typed on the command
X				line as a macro command
X
Xexecute-file		(none)	Execute a file as a macro
X
Xexecute-macro		 ^XE	Execute the keyboard macro (play back
X				the recorded keystrokes)
Xexecute-macro-<n>	(none)	Execute numbered macro <N> where <N> is
X				an integer from 1 to 40
X
Xexecute-named-command	 M-X	Execute a command by name
X
Xexecute-procedure	 M-^E	Execute a procedure by name
X
Xexecute-program 	^X$	Execute a program directly (not through
X				an intervening shell)
X
Xexit-emacs		 ^X^C	Exit EMACS. If there are unwritten,
X				changed buffers EMACS will ask to confirm
X
Xfill-paragraph		 M-Q	Fill the current paragraph
X
Xfilter-buffer		 ^X#	Filter the current buffer through an
X				external filter
X
Xfind-file		 ^X^F	Find a file to edit in the current window
X
Xforward-character	 ^F	Move cursor one character to the right
X
Xgoto-line		 M-G	Goto a numbered line
X
Xgoto-matching-fence	 M-^F	Goto the matching fence
X
Xgrow-window		 ^X^	Make the current window larger
X
Xhandle-tab		 ^I	Insert a tab or set tab stops
X
Xhunt-forward		 A-S	Hunt for the next match of the last
X				search string
X
Xhunt-backward		 A-R	Hunt for the last match of the last
X				search string
X
Xhelp			 M-?	Read EMACS.HLP into a buffer and display it
X
Xi-shell 		 ^XC	Shell up to a new command processor
X
Xincremental-search	 ^XS	Search for a string, incrementally
X
Xinsert-file		 ^X^I	insert a file at the cursor in the
X				current file
X
Xinsert-space		 ^C	Insert a space to the right of the cursor
X
Xinsert-string		(none)	Insert a string at the cursor
X
Xkill-paragraph		 M-^W	Delete the current paragraph
X
Xkill-region		 ^W	Delete the current marked region, moving
X				it to the kill buffer
X
Xkill-to-end-of-line	 ^K	Delete the rest of the current line
X
Xlist-buffers		 ^X^B	List all existing buffers
X
Xmeta-prefix		 <ESC>	Key used to precede all META commands
X
Xmouse-move-down 	 MSa
X
Xmouse-move-up		 MSb
X
Xmouse-resize-screen	 MS1
X
Xmouse-region-down	 MSe
X
Xmouse-region-up 	 MSf
X
Xmove-window-down	 ^X^N	Move all the lines in the current window down
X
Xmove-window-up		 ^X^P	Move all the lines in the current window up
X
Xname-buffer		 M-^N	Change the name of the current buffer
X
Xnarrow-to-region	 ^X<	hides all text not in the current region
X
Xnewline 		 ^M	Insert a <NL> at the cursor
X
Xnewline-and-indent	 ^J	Insert a <NL> at the cursor and indent
X				the new line the same as the preceding line
X
Xnext-buffer		 ^XX	Bring the next buffer in the list into
X				the current window
X
Xnext-line		 ^N	Move the cursor down one line
X
Xnext-page		 ^V	Move the cursor down one page
X
Xnext-paragraph		 M-N	Move cursor to the next paragraph
X
Xnext-window		 ^XO	Move cursor to the next window
X
Xnext-word		 M-F	Move cursor to the beginning of the
X				next word
X
Xnop			(none)	Does nothing
X
Xopen-line		 ^O	Open a line at the cursor
X
Xoverwrite-string	(none)	Overwrite a string at the cursor
X
Xpipe-command		 ^X@	Execute an external command and place
X				its output in a buffer
X
Xprevious-line		 ^P	Move cursor up one line
X
Xprevious-page		 ^Z	Move cursor up one page
X
Xprevious-paragraph	 M-P	Move back one paragraph
X
Xprevious-window 	 ^XP	Move the cursor to the last window
X
Xprevious-word		 M-B	Move the cursor to the beginning of the
X				word to the left of the cursor
X
Xprint			(none)	Display a string on the command line
X				(a synonim to write-message)
X
Xquery-replace-string	 M-^R	Replace all of one string with another
X				string, interactively querying the user
X
Xquick-exit		 M-Z	Exit EMACS, writing out all changed buffers
X
Xquote-character 	 ^Q	Insert the next character literally
X
Xread-file		 ^X^R	Read a file into the current buffer
X
Xredraw-display		 M-^L	Redraw the display, centering the
X				current line
X
Xresize-window		 ^XW	Change the number of lines in the
X				current window
X
Xrestore-window		(none)	Move cursor to the last saved window
X
Xreplace-string		 M-R	Replace all occurrences of one string
X				with another string from the cursor
X				to the end of the buffer
X
Xreverse-incremental-search^XR	Search backwards, incrementally
X
Xrun			 M-^E	Execute a named procedure
X
Xsave-file		 ^X^S	Save the current buffer if it is changed
X
Xsave-window		(none)	Remember current window (to restore later)
X
Xscroll-next-up		 M-^Z	Scroll the next window up
X
Xscroll-next-down	 M-^V	Scroll the next window down
X
Xsearch-forward		 ^S	Search for a string
X
Xsearch-reverse		 ^R	Search backwards for a string
X
Xselect-buffer		 ^XB	Select a buffer to display in the
X				current window
X
Xset			 ^XA	Set a variable to a value
X
Xset-encryption-key	 M-E	Set the encryption key of the current buffer
X
Xset-fill-column 	 ^XF	Set the current fill column
X
Xset-mark			Set the mark
X
Xshell-command		 ^X!	Causes an external shell to execute
X				a command
X
Xshrink-window		 ^X^Z	Make the current window smaller
X
Xsource			(none)	Execute a file as a macro
X
Xsplit-current-window	 ^X2	Split the current window in two
X
Xstore-macro		(none)	Store the following macro lines to a
X				numbered macro
X
Xstore-procedure 	(none)	Store the following macro lines to a
X				named procedure
X
Xtranspose-characters	 ^T	Transpose the character at the cursor
X				with the character to the left
X
Xtrim-region		 ^X^T	Trim any trailing white space from a region
X
Xunbind-key		 M-^K	Unbind a key from a function
X
Xuniversal-argument	 ^U	Execute the following command 4 times
X
Xunmark-buffer		 M-~	Unmark the current buffer (so it is
X				no longer changed)
X
Xupdate-screen		(none)	Force a screen update during macro execution
X 
Xview-file		 ^X^V	Find a file,and put it in view mode
X 
Xwiden-from-region	 ^X>	restores hidden text (see narrow-to-region)
X
Xwrap-word		(none)	Wrap the current word, this is an
X				internal function
X        
Xwrite-file		 ^X^W	Write the current buffer under a new
X				file name
X
Xwrite-message		(none)	Display a string on the command line
X
Xyank			 ^Y	yank the kill buffer into the current
X				buffer at the cursor\fR
X.fi
X
X\fB
X.if '\*(ct'Chapter' \{\
X.af ch A 
X.nr ch 0 1
X.ds ct Appendix
X.fi\}
X.CH "MicroEMACS Bindings"
X
X
X Below is a complete list of the key bindings used in MicroEMACS.
XThis can be used as a wall chart reference for MicroEMACS commands.
X
X.nf
X.ft CW
X
X.ce 1
X\fBDefault Key Bindings for MicroEmacs 3.10\f(CW    
X
X ^A   Move to start of line	      ESC A   Apropos (list some commands)
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		      ESC E   Reset Encryption Key
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 <NL>, 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 <NL>		      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		      ESC S   Suspend (BSD only)
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 ^E   Execute named procedure
X ESC ^F   Goto matching fence	      ESC !   Reposition window
X ESC ^H   Delete backward word	      ESC <   Move to start of buffer
X ESC ^K   Unbind Key from function    ESC >   Move to end of buffer
X ESC ^L   Reposition window	      ESC .   Set mark
X ESC ^M   Delete global mode	      ESC space    Set mark
X ESC ^N   Rename current buffer       ESC rubout   Delete backward word
X ESC ^R   Search & replace w/query	  rubout   Backward delete
X ESC ^S   Source command file
X ESC ^V   Scroll next window down
X ESC ^W   Delete Paragraph
X ESC ^X   Execute command line
X ESC ^Z   Scroll next window up
X
X ^X <	Narrow-to-region	   ^X ?   Describe a key
X ^X >	Widen-from-region	   ^X !   Run 1 command in a shell
X ^X =	Show the cursor position   ^X @   Pipe shell command to buffer
X ^X ^	Enlarge display window	   ^X #   Filter buffer thru shell filter
X ^X 0	Delete current window	   ^X $   Execute an external program
X ^X 1	Delete other windows	   ^X (   Begin macro
X ^X 2	Split current window	   ^X )   End macro
X				   ^X A   Set variable value
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 processor
X ^X ^D	 Detab line		   ^X D   Suspend MicroEMACS (BSD4.2 only)
X ^X ^E	 Entab line		   ^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 ^T	 Trim line		   (Incremental search
X ^X ^U	 Upper case region		  not always available)
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
X.us  "Usable 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 better with C
XEXACT	 Exact case matching on search strings
XOVER	 Overwrite typed characters instead of inserting them
XCRYPT	 Current buffer will be encrypted on write, decrypted on read
XMAGIC	 Use regular expression matching in searches
XASAVE	 Save the file every 256 inserted characters
X
XWHITE/CYAN/MAGENTA/YELLOW/BLUE/RED/GREEN/BLACK	Sets foreground color
Xwhite/cyan/magenta/yellow/blue/red/green/black	Sets background color\fR
X.fi
X
X\fB
X.bp
X.fi
X
X.if '\*(ct'Chapter' \{\
X.af ch A 
X.nr ch 0 1
X.ds ct Appendix
X.fi\}
X.CH "Supported machines"
X
X
X The following table lists all the hardware/compilers for which I
Xcurrently support MicroEMACS. This is not exclusive of all machines
Xwhich MicroEMACS will run on, but I have either run it myself, or had a
Xfirst hand report of it running.
X
X.nf
X.ft CW
X
X.us  "Hardware	OS		Compiler	Comments"
X
XVAX 780 	UNIX V5 	native
X		UNIX V7 	native
X		BSD 4.2 	native		job control supported
X		*VMS		native
X
XNCR Tower	UNIX V5 	native
X
XIBM-RT PC	BSD 4.3 	native
X
XHP9000		UNIX V5 	native
X
XFortune 32:16	UNIX V7 	native
X
XIBM-PC		MSDOS		LATTICE 2.15	Large CODE/Large DATA
X		 2.0 & 3.2	AZTEC 3.4e	Large CODE/Large DATA
X				TURBO C v1.5	LARGE memory model
X				MSC 4.0
X				*MWC 86
X		SCO XENIX	native
X
XHP150		MSDOS		Lattice 2.15	Function key labels
X						for the touch screen
X
XHP110		MSDOS		Lattice 2.15
X				Aztec 3.4e
X
X*Data General 10
X		MSDOS		Lattice 2.1  Texas Instruments Professional
X		MSDOS		Lattice 2.15
X
XAmiga		Intuition	Lattice 3.03
X				Aztec 3.6
X
XST520		TOS		Mark Williams C Spawns under MSH
X				Lattice 3.10	(no shell commands)
X
X.us  "Systems to be supported (IE some code is already written:)"
X
XMacintosh	Finder 5.0	Aztec
X
X*means that I do not own or have access to the listed compiler and/or
X machine and must rely upon others to help support it. \fR
X.fi
X
X\fB
X.bp
X.fi
X
X.if '\*(ct'Chapter' \{\
X.af ch A 
X.nr ch 0 1
X.ds ct Appendix
X.fi\}
X.CH "Function Keys"
X
X
X On the IBMPC, the ATARI ST, the Commodore AMIGA and UNIX now
Xsupport a set of machine independant bindings for function keys. Below
Xis a list of these bindings (not all of these are supported on all
Xsystems).
X
X.nf
X.ft CW
X
X			Function keys in MicroEmacs
X
X	function	Function	^function	Alt-function
X f1)	  FN1		 S-FN1		  FN^1		  A-FN1
X f2)	  FN2		 S-FN2		  FN^2		  A-FN2
X f3)	  FN3		 S-FN3		  FN^3		  A-FN3
X f4)	  FN4		 S-FN4		  FN^4		  A-FN4
X f5)	  FN5		 S-FN5		  FN^5		  A-FN5
X f6)	  FN6		 S-FN6		  FN^6		  A-FN6
X f7)	  FN7		 S-FN7		  FN^7		  A-FN7
X f8)	  FN8		 S-FN8		  FN^8		  A-FN8
X f9)	  FN9		 S-FN9		  FN^9		  A-FN9
Xf10)	  FN0		 S-FN0		  FN^0		  A-FN0
X
Xhome)	  FN<				  FN^<
XCsUp)	  FNP				  FN^P
XPgUp)	  FNZ				  FN^Z
XCsLf)	  FNB				  FN^B
X 5  )
XCsRt)	  FNF				  FN^F
X End)	  FN>				  FN^>
XCsDn)	  FNN				  FN^N
XPgDn)	  FNV				  FN^V
X Ins)	  FNC				  FN^C
X Del)	  FND				  FN^D\fR
X.fi
X
X\fB
X.bp
X.fi
X
X.if '\*(ct'Chapter' \{\
X.af ch A 
X.nr ch 0 1
X.ds ct Appendix
X.fi\}
X.CH "Machine Dependent Notes"
X
X
X This appendix lists some notes specific to individual
Ximplementations of MicroEMACS. Every attempt has been made to allow
XEMACS to be identical on all machines, but we have also tried to take
Xadvantage of function keys, cursor keys, mice, and special screen modes
Xwhere possible.
X

END_OF_FILE
echo shar: NEWLINE appended to \"'medoc.p04'\"
if test 30344 -ne `wc -c <'medoc.p04'`; then
    echo shar: \"'medoc.p04'\" unpacked with wrong size!
fi
# end of 'medoc.p04'
fi
echo shar: End of archive 5 \(of 6\).
cp /dev/null ark5isdone
MISSING=""
for I in 1 2 3 4 5 6 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 6 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
-- 

					Dave Klotzbach
					att!ihlpm!klotz
					IE 2F-518  (312) 416-7437