home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
texted
/
b084_1
/
emacs_rc2
< prev
next >
Wrap
Text File
|
1991-06-02
|
9KB
|
418 lines
set $discmd FALSE
write-message "[Setting up....]"
; If you screen "SNOWS", comment this line
set $flicker "FALSE"
; To use an IBM-PC EGA card, uncomment the following line
; set $sres "EGA"
;macro 1 to toggle function key help display
add-global-mode magic
add-global-mode exact
add-global-mode asave
add-global-mode "blue"
add-global-mode "YELLOW"
;set $sres 12
execute-file "ue_mac_rc"
;{{{ bind procedures to macros
;{{{ 1=help
1 store-macro
execute-procedure help
!endm
;}}}
;{{{ 2=clear-pick
2 store-macro
execute-procedure clear-pick
!endm
;}}}
;{{{ 3=pick-line
3 store-macro
execute-procedure pick-line
!endm
;}}}
;{{{ 4=move-line
4 store-macro
execute-procedure move-line
!endm
;}}}
;{{{ 5=copy-pick
5 store-macro
execute-procedure copy-pick
!endm
;}}}
;{{{ 6=put-buffer
6 store-macro
execute-procedure put-buffer
!endm
;}}}
;{{{ 7=copy-to-fold
7 store-macro
execute-procedure copy-to-fold
!endm
;}}}
;{{{ 8=copy-line
8 store-macro
execute-procedure copy-line
!endm
;}}}
;{{{ 9=delete-line
9 store-macro
execute-procedure delete-line
!endm
;}}}
;{{{ 10=pick-region
10 store-macro
execute-procedure pick-region
!endm
;}}}
;{{{ ; 13 - unfile fold
; 13 - unfile fold
13 store-macro
!if &seq $ltype LSOFOLD
execute-procedure t-filed
!else
execute-procedure t-unfiled
!endif
!endm
;}}}
;{{{ ; 14 - comment fold
; 14 - comment fold
14 store-macro
execute-procedure comment-fold
!endm
;}}}
;{{{ ; 15 - uncomment fold
; 15 - uncomment fold
15 store-macro
execute-procedure uncomment-fold
!endm
;}}}
;{{{ ; 16 - auto fold
; 16 - auto fold
16 store-macro
execute-procedure auto-fold
!endm
;}}}
;{{{ ; 17 - execute t-listbuf
; 17 - execute t-listbuf
17 store-macro
!if %t-lstflg
execute-procedure t-listbufoff
!else
execute-procedure t-listbuf
!endif
!endm
;}}}
;{{{ ; 21 - create-fold macro
; 21 - create-fold macro
21 store-macro
execute-procedure create-fold
!endm
;}}}
;{{{ ; 22 - enter fold/file
;22 - enter fold/file
22 store-macro
!if &seq $ltype LSOFOLD
!force enter-fold
!else
execute-procedure t-enter-filed
!endif
!endm
;}}}
;{{{ ; 23 - exit fold/file
; 23 - exit fold/file
23 store-macro
!force exit-fold
!if ¬ $status
execute-procedure t-exit-filed
!endif
!endm
;}}}
;{{{ ; 24 - exit file
; 24 - exit fold/file
24 store-macro
execute-procedure t-exit-filed
!endm
;}}}
;{{{ ; 25 - execute t-sa
; 25 - execute t-sa
25 store-macro
execute-procedure t-sa
!endm
;}}}
;{{{ ; 26 - execute t-listbuf
; 26 - execute t-listbuf
26 store-macro
execute-procedure t-listbuf
!endm
;}}}
;{{{ ; 27 - execute t-gotobuf
; 27 - execute t-gotobuf
27 store-macro
execute-procedure t-gotobuf
!endm
;}}}
;{{{ ; 28 - execute t-ctags
; 28 - execute t-ctags
28 store-macro
execute-procedure t-ctags
!endm
;}}}
;{{{ ; 29 - execute t-cleartags
; 29 - execute t-cleartags
29 store-macro
execute-procedure t-cleartags
!endm
;}}}
;{{{ ; 30 - execute t-delbuf
; 30 - execute t-delbuf
30 store-macro
execute-procedure t-delbuf
!endm
;}}}
;{{{ ; 31 - toggle num pad action
31 store-macro
set $discmd FALSE
!if &seq %escnum "num"
;{{{ execute macros
bind-to-key execute-macro-21 M-1
bind-to-key execute-macro-13 M-2
bind-to-key execute-macro-3 M-3
bind-to-key execute-macro-5 M-4
bind-to-key execute-macro-6 M-5
bind-to-key execute-macro-2 M-6
bind-to-key execute-macro-7 M-7
bind-to-key execute-macro-17 M-8
bind-to-key execute-macro-32 M-9
;}}}
set %escnum "fold"
write-message "[Folding keys set M-1 -> M-9: (toggle M-0)]"
!else
;{{{ unbind keys
unbind-key M-1
unbind-key M-2
unbind-key M-3
unbind-key M-4
unbind-key M-5
unbind-key M-6
unbind-key M-7
unbind-key M-8
unbind-key M-9
;}}}
set %escnum "num"
write-message "[Numeric keys set: (toggle M-0)]"
!endif
set $discmd TRUE
!endm
;}}}
;{{{ ; 32 - display current line
; display the current line number in message window
32 store-macro
write-message $curline
!endm
;}}}
;}}}
write-message "[Binding function keys]"
;{{{ ; ***** Rebind the Function key group
; ***** Rebind the Function key group
bind-to-key execute-macro-1 FN1
bind-to-key execute-macro-4 FN3
bind-to-key execute-macro-8 FN4
;}}}
;{{{ ; arc cursor keys
; arc cursor keys!
bind-to-key previous-line FNF
bind-to-key next-line FNE
bind-to-key forward-character FND
bind-to-key backward-character FNC
bind-to-key previous-page S-FNF
bind-to-key next-page S-FNE
bind-to-key next-word S-FND
bind-to-key previous-word S-FNC
bind-to-key beginning-of-file FN^F
bind-to-key end-of-file FN^E
bind-to-key beginning-of-line FN^C
bind-to-key end-of-line FN^D
bind-to-key delete-next-character S-FN^E
;}}}
write-message "[folding keys]"
!if &seq $progname "uEmacs"
;{{{ fold key bindings
bind-to-key execute-macro-22 FNN
bind-to-key execute-macro-23 FNP
bind-to-key open-fold FNH
bind-to-key close-fold FNJ
bind-to-key execute-macro-21 FNG
bind-to-key remove-fold FN^P
bind-to-key quick-exit FN^H
; FNB is copy key - copy top line of fold to comment line
macro-to-key copy-to-fold FNB
macro-to-key auto-fold ^A
bind-to-key searchfold-forward ^S
bind-to-key searchfold-reverse ^R
;}}}
;{{{ set fold marks
write-message "[fold marks.................................]"
; set fold marks
; file extensions
set-fold-marks "c" "/*{{{ " "/*}}}*/" "*/"
set-fold-marks "h" "/*{{{ " "/*}}}*/" "*/"
set-fold-marks "occ" "--{{{ " "--}}}" ""
set-fold-marks "inc" "--{{{ " "--}}}" ""
set-fold-marks "pgm" "--{{{ " "--}}}" ""
set-fold-marks "cfs" "/*{{{ " "/*}}}*/" "*/"
set-fold-marks "mak" "#{{{ " "#}}}" ""
set-fold-marks "tt" "/*{{{ " "/*}}}*/" "*/"
set-fold-marks "rc" ";{{{ " ";}}}" ""
; arc file types...
set-fold-marks "Text" "{{{ " "}}}" ""
set-fold-marks "Obey" "| {{{ " "| }}}" ""
set-fold-marks "Command" "| {{{ " "| }}}" ""
;}}}
!else
;{{{ normal bindings
bind-to-key beginning-of-line FN<
bind-to-key end-of-line FN>
;}}}
!endif
;{{{ set readhook
20 store-macro
; arc version - looks AFTER _ or BEFORE .
set %rctmp &sin $cfname "."
!if &eq %rctmp 0
;{{{ look for _
set %rctmp &sin $cfname "_"
!if &eq %rctemp 0
!return
!else
set %rctmp &mid $cfname &add %rctmp 1 5
!endif
;}}}
!else
;{{{ get text before .
set %rctmp &left $cfname &sub %rctmp 1
;}}}
!endif
write-message %rctmp
;{{{ c or h ?
!if &or &seq %rctmp "c" &seq %rctmp "h"
2 handle-tab
add-mode cmode
!endif
;}}}
;{{{ mss ?
!if &seq %rctmp "mss"
add-mode "wrap"
!endif
;}}}
;{{{ occ or inc ?
!if &or &seq %rctmp "occ" &seq %rctmp "inc"
add-mode "cmode"
2 handle-tab
!endif
;}}}
!force add-mode magic
; !if %t-lstflg
; !force execute-procedure t-listbuf
; !endif
!endm
set $readhook execute-macro-20
;}}}
;bind-to-key next-buffer M-FNN
;{{{ set up help buffer
; function key help window display
split-current-window
1 select-buffer "Function Keys"
insert-string "F1=help F2=comment F3=un/c F4=move | ENTER | UP | EXIT |~n"
insert-string "M-1=create-fold M-2=file M-3=pick | copy _ top _ move | 0 . ~n"
insert-string "M-5=put M-6=clear M-7=fold-details | LEFT |-----| RIGHT| MAKE-FOLD REM-FOLD~n"
insert-string "M-8=list-buff M-9=line-no M-0=toggle |start-l|_____| end-l| auto-fold del-line~n"
insert-string " | OPEN | DOWN| CLOSE|~n"
insert-string " Folding Microemacs | pick - end - put |~n"
insert-string " PCSP - Southampton University ----------------------~n"
!force add-mode "view"
!force $curline resize-window
unmark-buffer
delete-window
set %rcfkeys FALSE
set %moving FALSE
set $sscroll TRUE
;execute-macro-1
;}}}
!force add-mode exact
!force add-mode magic
!force add-global-mode exact
!force add-global-mode magic
2 handle-tab
set $discmd TRUE
write-message "[Setup done]"