home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume1
/
8711
/
uemacs-3.9-doc
/
1
next >
Wrap
Internet Message Format
|
1990-07-13
|
31KB
Path: uunet!husc6!necntc!ncoast!allbery
From: nwd@j.cc.purdue.edu (Daniel Lawrence)
Newsgroups: comp.sources.misc
Subject: MicroEmacs 3.9 Documentation (1 of 4)
Message-ID: <5703@ncoast.UUCP>
Date: 19 Nov 87 00:16:54 GMT
Sender: allbery@ncoast.UUCP
Lines: 1240
Approved: allbery@ncoast.UUCP
X-Archive: comp.sources.misc/uemacs-3.9-doc/1
# This is a shar archive.
# Remove everything above this line.
# Run the file through sh, not csh.
# (type `sh med.1')
# If you do not see the message
# `med.1 completed!'
# then the file was incomplete.
echo extracting - amiga.rc
sed 's/^X//' > amiga.rc << 'FRIDAY_NIGHT'
X; EMACS.RC: Startup file for MicroEMACS 3.8
X;
X; This file is executed everytime the
X; editor is entered
X
Xset $discmd "FALSE"
Xwrite-message "[Setting up....]"
X
X; If you screen "SNOWS", uncomment this line
X; set $flicker "TRUE"
X
X; If you are on an IBM-PC EGA card and want to force the
X; screen to EGA mode, uncomment the following line
X; set $sres "EGA"
X
X; ***** Rebind the Function key group
X
Xbind-to-key search-forward FN0
Xbind-to-key search-reverse FN1
Xbind-to-key hunt-forward FN2
Xbind-to-key hunt-backward FN3
Xbind-to-key next-window FN4
Xbind-to-key execute-macro FN5
Xbind-to-key find-file FN6
Xbind-to-key execute-file FN7
Xbind-to-key save-file FN8
Xbind-to-key exit-emacs FN9
X
Xbind-to-key apropos FNR
Xbind-to-key describe-key FNS
Xbind-to-key fill-paragraph FNT
Xbind-to-key shell-command FNX
Xbind-to-key i-shell FNY
X
X; set screen colors
Xadd-global-mode "black"
X
X; toggle function key window off
X1 store-macro
X save-window
X 1 next-window
X !if &sequal "Function Keys" $cbufname
X delete-window
X !endif
X bind-to-key execute-macro-14 FNP
X!force restore-window
X write-message "[Function key window OFF]"
X!endm
X
X; toggle function key window back on
X14 store-macro
X 1 next-window
X !if &sequal $cbufname "emacs.hlp"
X execute-macro-11
X !endif
X !if ¬ &sequal $cbufname "Function Keys"
X 1 split-current-window
X select-buffer "Function Keys"
X add-mode "red"
X!force 5 resize-window
X beginning-of-file
X !endif
X bind-to-key execute-macro-1 FNP
X 2 next-window
X write-message "[Function key window ON]"
X!endm
X
X; Enter Help
X2 store-macro
X 1 next-window ;Make sure the function key window isn't up!
X !if &sequal $cbufname "Function Keys"
X delete-window
X bind-to-key execute-macro-14 FNP
X !endif
X help
X 8 resize-window
X bind-to-key execute-macro-12 FNT
X bind-to-key execute-macro-13 FNS
X bind-to-key execute-macro-11 FNQ
X bind-to-key execute-macro-15 ^XO
X bind-to-key execute-macro-15 ^XP
X bind-to-key execute-macro-15 FN4
X add-mode "red"
X beginning-of-file
X 2 forward-character
X clear-message-line
X!endm
X
X; Exit Help
X11 store-macro
X bind-to-key previous-page FNT
X bind-to-key next-page FNS
X bind-to-key execute-macro-2 FNQ
X bind-to-key next-window ^XO
X bind-to-key previous-window ^XP
X bind-to-key next-window FN4
X delete-window
X clear-message-line
X!endm
X
X; don't allow these commands from within the HELP screen
X15 store-macro
X write-message "[Use F2 to exit HELP]"
X!endm
X
X; last help page
X12 store-macro
X beginning-of-line
X search-reverse "=>"
X 1 redraw-display
X!endm
X
X; next help page
X13 store-macro
X beginning-of-line
X 2 forward-character
X search-forward "=>"
X 1 redraw-display
X!endm
X
X; reformat indented paragraph
X
X6 store-macro
X write-message " [Fixing paragraph]"
X set $discmd "FALSE"
X kill-region
X 2 split-current-window
X select-buffer "[temp]"
X yank
X beginning-of-file
X replace-string "~n " "~n"
X 66 set-fill-column
X fill-paragraph
X 77 set-fill-column
X beginning-of-file
X handle-tab
X replace-string ~n "~n "
X end-of-file
X 2 delete-previous-character
X beginning-of-file
X set-mark
X end-of-file
X kill-region
X unmark-buffer
X delete-window
X yank
X delete-buffer "[temp]"
X set $discmd "TRUE"
X write-message " [Fixed paragraph]"
X!endm
X
X; indent region
X
X7 store-macro
X write-message " [Indenting region]"
X kill-region
X 2 split-current-window
X select-buffer "[temp]"
X yank
X beginning-of-file
X handle-tab
X replace-string "~n" "~n "
X end-of-file
X 4 delete-previous-character
X beginning-of-file
X set-mark
X write-message " [Indenting region]"
X end-of-file
X kill-region
X unmark-buffer
X delete-window
X yank
X delete-buffer "[temp]"
X write-message " [Region Indented]"
X!endm
X
X; undent region
X
X8 store-macro
X write-message " [Undenting region]"
X kill-region
X 2 split-current-window
X select-buffer "[temp]"
X yank
X beginning-of-file
X delete-next-character
X replace-string "~n " "~n"
X end-of-file
X 2 delete-previous-character
X beginning-of-file
X set-mark
X write-message " [Undenting region]"
X end-of-file
X kill-region
X unmark-buffer
X delete-window
X yank
X delete-buffer "[temp]"
X write-message " [Region undented]"
X!endm
X
X; bring up the function key window
X
X 1 split-current-window
X select-buffer "Function Keys"
X add-mode "red"
X 5 resize-window
X insert-string "f1 search f2 search back | F1 toggle function list F2 toggle help file~n"
X insert-string "f3 hunt f4 hunt back | F3 find command/apropos F4 describe key~n"
X insert-string "f5 next window f6 exec macro | F5 reformat paragraph F6 ref undented region~n"
X insert-string "f7 find file f8 exec file | F7 indent region F8 undent region~n"
X insert-string "f9 save file f10 exit emacs | F9 execute DOS command F10 shell up~n"
X beginning-of-file
X unmark-buffer
X next-window
X set $discmd "TRUE"
X write-message "[Emacs is READY]"
FRIDAY_NIGHT
echo extracting - azmap.cmd
sed 's/^X//' > azmap.cmd << 'FRIDAY_NIGHT'
X; AZMAP.CMD: MicroEMACS Macro file
X; to translate an AZTEC C .SYM map file into
X; the form needed to read it into ADDSYMS
X; to be used with Pheonix's PFIX plus (C) debugger
X;
X; written 6/5/86 by Daniel Lawrence
X
Xbeginning-of-file
Xnewline
Xprevious-line
Xreplace-string "~n" "~n 0000:"
Xbeginning-of-line
Xkill-to-end-of-line
Xnewline
Xnewline
Xnewline
Xbeginning-of-file
Xnewline
Xinsert-string " Address Publics by Name"
Xnewline
Xset-mark
Xend-of-file
Xcase-region-upper
Xbeginning-of-file
Xreplace-string "_~n" "~n"
X
FRIDAY_NIGHT
echo extracting - bdata.cmd
sed 's/^X//' > bdata.cmd << 'FRIDAY_NIGHT'
X;Create a block of DATA statements for a BASIC program
X; within MicroEMACS 3.8
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[0 to end]: "
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
X
X
FRIDAY_NIGHT
echo extracting - bpage.cmd
sed 's/^X//' > bpage.cmd << 'FRIDAY_NIGHT'
X; BPAGE.CMD: Box Macro and rectangualr region page
X; for MicroEMACS 3.9d and above
X; (C)opyright 1987 by Suresh Konda and Daniel M Lawrence
X; Last Update: 11/02/87
X
X; make sure the function key window is up
X set %rcfkeys FALSE
X execute-macro-1
X write-message "Loading..."
X
X; set the clean procedure up
Xstore-procedure clean
X delete-buffer "[Macro 10]"
X delete-buffer "[Macro 11]"
X delete-buffer "[Macro 12]"
X delete-buffer "[getblock]"
X delete-buffer "[putblock]"
X delete-buffer "[Macro 13]"
X delete-buffer "[Macro 14]"
X delete-buffer "[Macro 15]"
X delete-buffer "[Macro 16]"
X delete-buffer "[Macro 17]"
X delete-buffer "[Macro 18]"
X delete-buffer "[Macro 19]"
X delete-buffer "[drawbox]"
X delete-buffer "[setpoints]"
X delete-buffer "[horizontal]"
X delete-buffer "[vertical]"
X delete-buffer "[horline]"
X delete-buffer "[vertline]"
X delete-buffer "[delcol]"
X delete-buffer "[iline]"
X!endm
X
X; Write out the page instructions
X save-window
X 1 next-window
X beginning-of-file
X set $curcol 25
X overwrite-string " F1 Line type [DOUBLE] F2 kill block "
X next-line
X set $curcol 25
X overwrite-string " F3 draw box F4 copy block "
X next-line
X set $curcol 25
X overwrite-string " F5 insert line F6 yank block "
X next-line
X set $curcol 18
X overwrite-string "BOX "
X set $curcol 25
X overwrite-string " F7 insert space F8 insert block "
X next-line
X set $curcol 25
X overwrite-string " "
X unmark-buffer
X beginning-of-file
X !force restore-window
X update-screen
X
X; this sets overwrite mode to off. to change it, set rcinsert to 1
Xset %rcinsert 0
X
X; change line type
X
X10 store-macro
X !if &equ %rcltype 1
X set %rcltype 2
X set %rctmp "DOUBLE"
X !else
X set %rcltype 1
X set %rctmp "SINGLE"
X !endif
X set %cbuf $cbufname
X set %cline $cwline
X select-buffer "Function Keys"
X beginning-of-file
X 1 goto-line
X 40 forward-character
X 6 delete-next-character
X insert-string %rctmp
X unmark-buffer
X select-buffer %cbuf
X %cline redraw-display
X !return
X!endm
X
X; Draw a box
X
X12 store-macro
X !if &equal %rcltype 1
X set %c1 "Z"
X set %c2 "D"
X set %c3 "?"
X set %c4 "@"
X set %c5 "Y"
X set %c6 "3"
X !else
X set %c1 "I"
X set %c2 "M"
X set %c3 ";"
X set %c4 "H"
X set %c5 "<"
X set %c6 ":"
X !endif
X run drawbox
X!endm
X
X; insert a line in a box
X
X14 store-macro
X run iline
X!endm
X
X; insert a blank line in a box
X
X16 store-macro
X set %rctmp %rcltype
X set %rcltype 0
X run iline
X set %rcltype %rctmp
X!endm
X
Xstore-procedure iline
X run setpoints
X !if &equal %pcol %mcol
X run vertical
X !else
X !if &equal %pline %mline
X run horizontal
X !else
X write-message "Illegal point and mark for lines"
X !endif
X !endif
X!endm
X
Xstore-procedure setpoints
X; procedure will set pcol, pline, mcol and mline. currently at point
X set %pcol $curcol
X set %pline $curline
X exchange-point-and-mark
X set %mcol $curcol
X set %mline $curline
X exchange-point-and-mark
X!endm
X
Xstore-procedure drawbox
X run setpoints
X set $curline %mline
X set $curcol %mcol
X;draw top horizontal line
X insert-string %c1
X; set %width &sub &sub %pcol %mcol 1
X set %width &sub %pcol %mcol
X %width insert-string %c2
X insert-string %c3
X newline-and-indent
X;draw bottom horizontal line
X %pline goto-line
X next-line
X end-of-line
X newline
X set $curcol %mcol
X insert-string %c4
X %width insert-string %c2
X insert-string %c5
X; bump pline
X set %pline &add %pline 1
X;draw verticals -- go to top and work our way down
X %mline goto-line
X !while &less $curline %pline
X next-line
X detab-line
X previous-line
X end-of-line
X !if &less $curcol %pcol
X &sub %pcol $curcol insert-string " "
X !endif
X set $curcol %pcol
X insert-string %c6
X set $curcol %mcol
X insert-string %c6
X !endwhile
X;return to point
X %pline goto-line
X next-line
X beginning-of-line
X %width forward-character
X 2 forward-character
X!endm
X
X; user procedure to draw a horizontal from mark to point making spaces for
X; the characters.
Xstore-procedure horizontal
X set %s1 ":"
X set %s2 "3"
X !if &equal %rcltype 0
X; then insert blanks
X set %c1 ":"
X set %c2 "3"
X set %c3 " "
X set %c4 ":"
X set %c5 "3"
X set %c6 ":"
X set %c7 "3"
X !else
X !if &equal %rcltype 1
X; then insert a single line
X set %c1 "G"
X set %c2 "C"
X set %c3 "D"
X set %c4 "W"
X set %c5 "E"
X set %c6 "6"
X set %c7 "4"
X !else
X; then insert a double line
X set %c1 "L"
X set %c2 "F"
X set %c3 "M"
X set %c4 "N"
X set %c5 "X"
X set %c6 "9"
X set %c7 "5"
X !endif
X !endif
X run horline
X!endm
X
Xstore-procedure vertical
X set %s1 "M"
X set %s2 "D"
X !if &equal %rcltype 0
X set %c1 "M"
X set %c2 "D"
X set %c3 " "
X set %c4 "M"
X set %c5 "D"
X set %c6 "M"
X set %c7 "D"
X !else
X !if &equal %rcltype 1
X set %c1 "Q"
X set %c2 "B"
X set %c3 "3"
X set %c4 "X"
X set %c5 "E"
X set %c6 "O"
X set %c7 "A"
X !else
X set %c1 "K"
X set %c2 "R"
X set %c3 ":"
X set %c4 "N"
X set %c5 "W"
X set %c6 "J"
X set %c7 "P"
X !endif
X !endif
X run verline
X!endm
X
Xstore-procedure horline
X; procedure to draw a line from beginning of line to point
X !if &equal %mcol %pcol
X !return
X !endif
X !if &less %pcol %mcol
X; then point was to left of mark. exchange and reset variables
X exchange-point-and-mark
X run setpoints
X !endif
X !if %rcinsert
X set $curcol %mcol
X !else
X end-of-line
X newline
X ; move to under mark
X %mcol insert-string " "
X !endif
X; see if first char is a vertical line
X previous-line
X set %char &chr $curchar
X next-line
X %rcinsert delete-next-character
X !if &sequal %char %s1
X insert-string %c1
X !else
X !if &sequal %char %s2
X insert-string %c2
X !else
X insert-string %c3
X !endif
X !endif
X; now for all chars but the last character i.e., char at point
X !while &less $curcol %pcol
X previous-line
X set %char &chr $curchar
X next-line
X %rcinsert delete-next-character
X !if &sequal %char %s1
X insert-string %c4
X !else
X !if &sequal %char %s2
X insert-string %c5
X !else
X insert-string %c3
X !endif
X !endif
X !endwhile
X; see if last char is a vertical line
X previous-line
X set %char &chr $curchar
X next-line
X %rcinsert delete-next-character
X !if &sequal %char %s1
X insert-string %c6
X !else
X !if &sequal %char %s2
X insert-string %c7
X !else
X insert-string %c3
X !endif
X !endif
X!endm
X
Xstore-procedure verline
X; proc to draw vertical line from mark to point. mark should be above point.
X !if &equal %mline %pline
X !return
X !endif
X; if point was above mark exchange and reset variables
X !if &less %pline %mline
X exchange-point-and-mark
X run setpoints
X !endif
X;top line
X %mline goto-line
X set $curcol %pcol
X backward-character
X set %char &chr $curchar
X forward-character
X %rcinsert delete-next-character
X !if &sequal %char %s1
X insert-string %c1
X !else
X !if &sequal %char %s2
X insert-string %c2
X !else
X insert-string %c3
X !endif
X !endif
X;all but pline
X !while &less $curline &sub %pline 1
X next-line
X beginning-of-line
X set $curcol %pcol
X backward-character
X set %char &chr $curchar
X forward-character
X %rcinsert delete-next-character
X !if &sequal %char %s1
X insert-string %c4
X !else
X !if &sequal %char %s2
X insert-string %c5
X !else
X insert-string %c3
X !endif
X !endif
X !endwhile
X; bottom line
X next-line
X beginning-of-line
X set $curcol %pcol
X backward-character
X set %char &chr $curchar
X forward-character
X %rcinsert delete-next-character
X !if &sequal %char %s1
X insert-string %c6
X !else
X !if &sequal %char %s2
X insert-string %c7
X !else
X insert-string %c3
X !endif
X !endif
X!endm
X
Xstore-procedure delcol
X; proc to delete column. we will use the getblock procedure with the column of
X; the point set to one beyond the column point
X set-points
X !if &equal %mcol %pcol
X ; same columns
X forward-character
X run getblock
X !return
X !else
X !if &equal %mline %pline
X run getblock
X !return
X !endif
X!endm
X
X; delete a rectangular block of text
X
X11 store-macro
X set %bkcopy FALSE
X run getblock
X write-message "[Block deleted]"
X!endm
X
X; copy a rectangular region
X
X13 store-macro
X set %bkcopy TRUE
X run getblock
X write-message "[Block copied]"
X!endm
X
X; yank a rectangular region
X
X15 store-macro
X set %bkcopy TRUE
X run putblock
X!endm
X
X; insert a rectangular region
X
X17 store-macro
X set %bkcopy FALSE
X run putblock
X!endm
X
Xstore-procedure getblock
X ;set up needed variables
X set $discmd FALSE
X delete-buffer "[block]"
X set %rcbuf $cbufname
X set %cline $cwline
X
X ;save block boundries
X set %endpos $curcol
X set %endline $curline
X exchange-point-and-mark
X set %begpos $curcol
X set %begline $curline
X set %blwidth &sub %endpos %begpos
X
X ;detab the region
X &add &sub %endline %begline 1 detab-line
X
X ;scan through the block
X set $curline %begline
X !while &less $curline &add %endline 1
X ;grab the part of this line needed
X !force set $curcol %begpos
X set-mark
X !force set $curcol %endpos
X kill-region
X
X ;bring it back if this is just a copy
X !if %bkcopy
X yank
X !endif
X
X ;put the line in the block buffer
X select-buffer "[block]"
X yank
X
X ;and pad it if needed
X !if &less $curcol %blwidth
X &sub %blwidth $curcol insert-space
X end-of-line
X !endif
X forward-character
X
X ;onward...
X select-buffer %rcbuf
X next-line
X !endwhile
X
X ;unmark the block
X select-buffer "[block]"
X unmark-buffer
X select-buffer %rcbuf
X previous-line
X %cline redraw-display
X set $discmd TRUE
X!endm
X
X; insert/overlay a rectangular block of text
X
Xstore-procedure putblock
X ;set up needed variables
X set $discmd FALSE
X set %rcbuf $cbufname
X set %cline $cwline
X
X ;save block boundries
X set %begpos $curcol
X set %begline $curline
X
X ;scan through the block
X select-buffer "[block]"
X beginning-of-file
X set %endpos &add %begpos $lwidth
X !while ¬ &equ $lwidth 0
X
X ;pad the destination if it is needed
X select-buffer %rcbuf
X beginning-of-line
X !if ¬ &equ $lwidth 0
X detab-line
X previous-line
X !endif
X !force set $curcol %begpos
X !if &less $curcol %begpos
X &sub %begpos $curcol insert-space
X end-of-line
X !endif
X
X ;delete some stuff if this should overlay
X !if %bkcopy
X set-mark
X !force set $curcol %endpos
X kill-region
X !endif
X
X ;grab the line from the block buffer
X select-buffer "[block]"
X beginning-of-line
X set-mark
X end-of-line
X copy-region
X forward-character
X
X ;put the line in the destination position
X select-buffer %rcbuf
X yank
X next-line
X
X ;onward...
X select-buffer "[block]"
X !endwhile
X
X select-buffer %rcbuf
X set $curline %begline
X set $curcol %begpos
X %cline redraw-display
X set $discmd TRUE
X!endm
X
X ; and init some variables
X set %rcltype 2
X write-message "[Block mode loaded]"
X
FRIDAY_NIGHT
echo extracting - emacs.hlp
sed 's/^X//' > emacs.hlp << 'FRIDAY_NIGHT'
X=> MicroEMACS 3.8 Help screens (01/18/87)
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 any number of the preceding character
X ^ Beginning of line [ ] Character class enclosure
X $ End of line \ Quote next character
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 AND THE SCREEN
X
X^X ^ Enlarge current window M-<n> ^X W Resize window to <n> lines
X^X ^Z Shrink current window M-<n> M-S Change screen to <n> lines
X^X ^N Move window down M-<n> M-T Change screen to <n> columns
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 M-A Describe a class of commands
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 !endm 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.rc
sed 's/^X//' > emacs.rc << 'FRIDAY_NIGHT'
X; EMACS.RC: Standard micro Startup program
X; for MicroEMACS 3.9d and above
X; (C)opyright 1987 by Daniel M Lawrence
X; Last Update: 10/20/87
X
Xset $discmd FALSE
Xwrite-message "[Setting up....]"
X
X; If you screen "SNOWS", uncomment this line
X; set $flicker "TRUE"
X
X; To use an IBM-PC EGA card, uncomment the following line
X; set $sres "EGA"
X
X; ***** Rebind the Function key group
X
Xbind-to-key search-forward FN;
Xbind-to-key search-reverse FN<
Xbind-to-key hunt-forward FN=
Xbind-to-key hunt-backward FN>
Xbind-to-key execute-macro-1 FN?
Xbind-to-key execute-macro-2 FN@
Xbind-to-key next-window FNA
Xbind-to-key execute-macro-3 FNB
Xbind-to-key save-file FNC
Xbind-to-key exit-emacs FND
X
Xbind-to-key execute-macro-10 FNT
Xbind-to-key execute-macro-11 FNU
Xbind-to-key execute-macro-12 FNV
Xbind-to-key execute-macro-13 FNW
Xbind-to-key execute-macro-14 FNX
Xbind-to-key execute-macro-15 FNY
Xbind-to-key execute-macro-16 FNZ
Xbind-to-key execute-macro-17 FN[
Xbind-to-key execute-macro-18 FN\
Xbind-to-key execute-macro-19 FN]
X
X; Set Default Global modes
X
Xadd-global-mode "blue"
X;bind-to-key meta-prefix `
X
X; Toggle function key window display
X
X1 store-macro
X !if %rcfkeys
X !goto rcfoff
X !endif
X
X; toggle function key window on
X save-window
X 1 next-window
X !if &sequal $cbufname "emacs.hlp"
X delete-window
X !endif
X !if ¬ &sequal $cbufname "Function Keys"
X 1 split-current-window
X select-buffer "Function Keys"
X add-mode "red"
X !force 5 resize-window
X 1 goto-line
X !endif
X set %rcfkeys TRUE
X !force restore-window
X !if &sequal $cbufname "Function Keys"
X next-window
X !endif
X write-message "[Function key window ON]"
X !return
X
X ;Toggle the function key window off
X*rcfoff
X save-window
X 1 next-window
X !if &sequal "Function Keys" $cbufname
X delete-window
X !endif
X !force restore-window
X write-message "[Function key window OFF]"
X set %rcfkeys FALSE
X!endm
X
X; Toggle HELP file onscreen
X
X2 store-macro
X 1 next-window
X
X ;Make sure the function key window isn't up!
X !if &sequal $cbufname "Function Keys"
X delete-window
X !endif
X set %rcfkeys FALSE
X
X ;Bring up page 1
X !if ¬ &seq $cbufname "emacs.hlp"
X help
X 8 resize-window
X add-mode "red"
X beginning-of-file
X 2 forward-character
X !endif
X
X*rchelp
X
X write-message "[PgUp/PgDn] Page [FN6] EXIT ^G Exit leaving page on screen"
X update-screen
X set %rctmp >key
X !if &equ &asc %rctmp 0
X set %rctmp >key
X !if &seq %rctmp I
X beginning-of-line
X !force search-reverse "=>"
X 1 redraw-display
X !goto rchelp
X !endif
X !if &seq %rctmp Q
X beginning-of-line
X 2 forward-character
X !force search-forward "=>"
X 1 redraw-display
X !goto rchelp
X !endif
X !if &seq %rctmp "~@"
X delete-window
X !if &seq %rcfkeys TRUE
X set %rcfkeys FALSE
X execute-macro-1
X !endif
X write-message "[Help Exited]"
X !return
X !endif
X !endif
X !if &equ &asc %rctmp 7
X next-window
X set %rcfkeys FALSE
X write-message "[Help Aborted]"
X !return
X !endif
X !goto rchelp
X!endm
X
X; Load a new page
X
X3 store-macro
X !if &seq &find newpage.cmd ""
X write-message "[Can not find NEWPAGE.CMD]"
X !return
X !endif
X execute-file newpage.cmd
X!endm
X
X;procedure to clean out the current page (which is nothing right now)
X
Xstore-procedure clean
X ; nothing by default
X!endm
X
X; Set up auto CMODE
X
X20 store-macro
X set %rctmp &sin $cfname "."
X !if &equ %rctmp 0
X !return
X !endif
X set %rctmp &mid $cfname &add %rctmp 1 5
X !if &or &seq %rctmp "c" &seq %rctmp "h"
X add-mode "cmode"
X !endif
X!endm
Xbind-to-key execute-macro-20 M-FNR
X
X; bring up the function key window
X
X 1 split-current-window
X select-buffer "Function Keys"
X insert-string "f1 search-> f2 <-search [ MicroEMACS: Text Editor~n"
X insert-string "f3 hunt-> f4 <-hunt [ ~n"
X insert-string "f5 fkeys f6 help [ Available function key Pages include:~n"
X insert-string "f7 nxt wind f8 pg[ ] [ WORD PROG BOX~n"
X insert-string "f9 save f10 exit [ [use the f8 key to load Pages]~n"
X unmark-buffer
X delete-window
X set %rcfkeys FALSE
X execute-macro-1
X set $discmd TRUE
FRIDAY_NIGHT
echo med.1 completed!
# That's all folks!