123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- ; EMACS.RC: Startup file for MicroEMACS 3.8
- ;
- ; This file is executed everytime the
- ; editor is entered
- set $discmd "FALSE"
- write-message "[Setting up....]"
- ; If you screen "SNOWS", uncomment this line
- ; set $flicker "TRUE"
- ; If you are on an IBM-PC EGA card and want to force the
- ; screen to EGA mode, uncomment the following line
- ; set $sres "EGA"
- ; ***** Rebind the Function key group
- bind-to-key search-forward FN;
- bind-to-key search-reverse FN<
- bind-to-key hunt-forward FN=
- bind-to-key hunt-backward FN>
- bind-to-key next-window FN?
- bind-to-key execute-macro FN@
- bind-to-key find-file FNA
- bind-to-key execute-file FNB
- bind-to-key save-file FNC
- bind-to-key exit-emacs FND
- bind-to-key apropos FNV
- bind-to-key describe-key FNW
- bind-to-key fill-paragraph FNX
- bind-to-key shell-command FN\
- bind-to-key i-shell FN]
- ; set screen colors
- add-global-mode "blue"
- ; toggle function key window off
- 1 store-macro
- save-window
- 1 next-window
- !if &sequal "Function Keys" $cbufname
- delete-window
- !endif
- bind-to-key execute-macro-14 FNT
- !force restore-window
- write-message "[Function key window OFF]"
- !endm
- ; toggle function key window back on
- 14 store-macro
- 1 next-window
- !if &sequal $cbufname "emacs.hlp"
- execute-macro-11
- !endif
- !if ¬ &sequal $cbufname "Function Keys"
- 1 split-current-window
- select-buffer "Function Keys"
- add-mode "red"
- !force 5 resize-window
- beginning-of-file
- !endif
- bind-to-key execute-macro-1 FNT
- 2 next-window
- write-message "[Function key window ON]"
- !endm
- ; Enter Help
- 2 store-macro
- 1 next-window ;Make sure the function key window isn't up!
- !if &sequal $cbufname "Function Keys"
- delete-window
- bind-to-key execute-macro-14 FNT
- !endif
- help
- 8 resize-window
- bind-to-key execute-macro-12 FNI
- bind-to-key execute-macro-13 FNQ
- bind-to-key execute-macro-11 FNU
- bind-to-key execute-macro-15 ^XO
- bind-to-key execute-macro-15 ^XP
- bind-to-key execute-macro-15 FN?
- add-mode "red"
- beginning-of-file
- 2 forward-character
- clear-message-line
- !endm
- ; Exit Help
- 11 store-macro
- bind-to-key previous-page FNI
- bind-to-key next-page FNQ
- bind-to-key execute-macro-2 FNU
- bind-to-key next-window ^XO
- bind-to-key previous-window ^XP
- bind-to-key next-window FN?
- delete-window
- clear-message-line
- !endm
- ; don't allow these commands from within the HELP screen
- 15 store-macro
- write-message "[Use F2 to exit HELP]"
- !endm
- ; last help page
- 12 store-macro
- beginning-of-line
- search-reverse "=>"
- 1 redraw-display
- !endm
- ; next help page
- 13 store-macro
- beginning-of-line
- 2 forward-character
- search-forward "=>"
- 1 redraw-display
- !endm
- ; reformat indented paragraph
- 6 store-macro
- write-message " [Fixing paragraph]"
- set $discmd "FALSE"
- kill-region
- 2 split-current-window
- select-buffer "[temp]"
- yank
- beginning-of-file
- replace-string "~n " "~n"
- 66 set-fill-column
- fill-paragraph
- 77 set-fill-column
- beginning-of-file
- handle-tab
- replace-string ~n "~n "
- end-of-file
- 2 delete-previous-character
- beginning-of-file
- set-mark
- end-of-file
- kill-region
- unmark-buffer
- delete-window
- yank
- delete-buffer "[temp]"
- set $discmd "TRUE"
- write-message " [Fixed paragraph]"
- !endm
- ; indent region
- 7 store-macro
- write-message " [Indenting region]"
- kill-region
- 2 split-current-window
- select-buffer "[temp]"
- yank
- beginning-of-file
- handle-tab
- replace-string "~n" "~n "
- end-of-file
- 4 delete-previous-character
- beginning-of-file
- set-mark
- write-message " [Indenting region]"
- end-of-file
- kill-region
- unmark-buffer
- delete-window
- yank
- delete-buffer "[temp]"
- write-message " [Region Indented]"
- !endm
- ; undent region
- 8 store-macro
- write-message " [Undenting region]"
- kill-region
- 2 split-current-window
- select-buffer "[temp]"
- yank
- beginning-of-file
- delete-next-character
- replace-string "~n " "~n"
- end-of-file
- 2 delete-previous-character
- beginning-of-file
- set-mark
- write-message " [Undenting region]"
- end-of-file
- kill-region
- unmark-buffer
- delete-window
- yank
- delete-buffer "[temp]"
- write-message " [Region undented]"
- !endm
- ; bring up the function key window
- 1 split-current-window
- select-buffer "Function Keys"
- add-mode "red"
- 5 resize-window
- insert-string "f1 search f2 search back | F1 toggle function list F2 toggle help file~n"
- insert-string "f3 hunt f4 hunt back | F3 find command/apropos F4 describe key~n"
- insert-string "f5 next window f6 exec macro | F5 reformat paragraph F6 ref undented region~n"
- insert-string "f7 find file f8 exec file | F7 indent region F8 undent region~n"
- insert-string "f9 save file f10 exit emacs | F9 execute DOS command F10 shell up~n"
- beginning-of-file
- unmark-buffer
- next-window
- set $discmd "TRUE"
- write-message "[Emacs is READY]"
|