home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
forum3.lzh
/
BRIEFE
/
emacsrc
< prev
next >
Wrap
Text File
|
1987-12-27
|
8KB
|
242 lines
; EMACSRC: Startup file for MicroEMACS 3.8
;
; This file is executed everytime the
; editor is entered
bind-to-key delete-next-word M-^F
bind-to-key delete-previous-word M-^B
; ***** Rebind the Function key group
bind-to-key hunt-forward FN01
bind-to-key hunt-backward FN02
bind-to-key set-mark FN03
bind-to-key goto-line FN04
bind-to-key execute-macro-35 FN05
bind-to-key search-forward SFN01
bind-to-key search-reverse SFN02
bind-to-key copy-region SFN03
bind-to-key goto-matching-fence SFN04
bind-to-key transpose-characters SFN05
bind-to-key query-replace-string CFN01
bind-to-key replace-string CFN02
bind-to-key kill-region CFN03
bind-to-key exchange-point-and-mark CFN04
bind-to-key execute-macro-37 CFN05
bind-to-key execute-macro-32 FN06
bind-to-key execute-macro-31 FN07
bind-to-key split-current-window FN08
bind-to-key delete-other-windows FN09
bind-to-key execute-macro-26 FN10
bind-to-key execute-macro-33 SFN06
bind-to-key execute-macro-30 SFN07
bind-to-key move-window-up SFN08
bind-to-key move-window-down SFN09
bind-to-key unmark-buffer SFN10
bind-to-key delete-buffer CFN06
bind-to-key execute-macro-29 CFN07
bind-to-key execute-macro-27 CFN08
bind-to-key execute-macro-28 CFN09
bind-to-key execute-macro-38 CFN10
bind-to-key execute-named-command FN11
bind-to-key execute-macro FN12
bind-to-key i-shell FN13
bind-to-key apropos FN14
bind-to-key buffer-position FN15
bind-to-key exit-emacs SFN11
bind-to-key begin-macro SFN12
bind-to-key pipe-command SFN13
bind-to-key describe-key SFN14
bind-to-key list-buffers SFN15
bind-to-key quick-exit CFN11
bind-to-key end-macro CFN12
bind-to-key filter-buffer CFN13
bind-to-key describe-bindings CFN14
bind-to-key execute-macro-39 CFN15
; macro: delete function key window if present
26 store-macro
save-window
1 next-window
!if &sequal $cbufname "Function Keys"
delete-window
!endif
restore-window
!endm
; macro: grow window (resizing function keys window if present)
27 store-macro
shrink-window
save-window
1 next-window
!if &sequal $cbufname "Function Keys"
!force 5 resize-window
!endif
restore-window
!endm
; macro: grow window (resizing function keys window if present)
28 store-macro
grow-window
save-window
1 next-window
!if &sequal $cbufname "Function Keys"
!force 5 resize-window
!endif
restore-window
!endm
; macro: delete window (skipping function keys)
29 store-macro
delete-window
!if &sequal $cbufname "Function Keys"
next-window
!endif
!endm
; macro: previous window (skipping function keys)
30 store-macro
previous-window
!if &sequal $cbufname "Function Keys"
previous-window
!endif
!endm
; macro: next window (skipping function keys)
31 store-macro
next-window
!if &sequal $cbufname "Function Keys"
next-window
!endif
!endm
; macro: next buffer (skipping function keys)
32 store-macro
next-buffer
!if &sequal $cbufname "Function Keys"
next-buffer
!endif
!endm
; macro: previous buffer
33 store-macro
set %oldbuf $cbufname
*L1
set %prebuf $cbufname
execute-macro-32
!if &sequal %oldbuf $cbufname
!goto L2
!endif
!goto L1
*L2
execute-macro-32
!if &sequal %prebuf $cbufname
!goto found
!endif
!goto L2
*found
!endm
; macro: enter insert mode
34 store-macro
delete-mode "OVER"
bind-to-key execute-macro-35 FN05
write-message "[Insert Mode]"
!endm
; macro: enter overwrite mode
35 store-macro
add-mode "OVER"
bind-to-key execute-macro-34 FN05
write-message "[Overwrite Mode]"
!endm
; macro: start window display with current line
36 store-macro
1 redraw-display
!endm
; macro: looking for function keys buffer
40 store-macro
1 next-window
!if &sequal "Function Keys" $cbufname
!goto found
!endif
1 split-current-window
select-buffer "Function Keys"
*found
beginning-of-file
!force 5 resize-window
!endm
; macro: bring up function keys buffer, search for normal function keys
37 store-macro
save-window
execute-macro-40
search-forward "FN01"
1 redraw-display
restore-window
!if &sequal $cbufname "Function Keys"
next-window
!endif
!endm
; macro: bring up function keys buffer, search for shift function keys
38 store-macro
save-window
execute-macro-40
search-forward "FN06"
1 redraw-display
restore-window
!if &sequal $cbufname "Function Keys"
next-window
!endif
!endm
; macro: bring up function keys buffer, search for control function keys
39 store-macro
save-window
execute-macro-40
search-forward "FN11"
1 redraw-display
restore-window
!if &sequal $cbufname "Function Keys"
next-window
!endif
!endm
; this code is executed on startup
split-current-window
select-buffer "Function Keys"
add-mode "RED"
insert-string "FN01 hunt-forward SFN01 search-forward CFN01 query-replace~n"
insert-string "FN02 hunt-backward SFN02 search-reverse CFN02 replace~n"
insert-string "FN03 set-mark SFN03 copy-region CFN03 kill-region~n"
insert-string "FN04 goto-line SFN04 goto-matching-fence CFN04 exchange-point-mark~n"
insert-string "FN05 toggle overwrite SFN05 transpose-characters CFN05 help~n"
insert-string "FN06 next-buffer SFN06 previous-buffer CFN06 delete-buffer~n"
insert-string "FN07 next-window SFN07 previous-window CFN07 delete-window~n"
insert-string "FN08 split-current-window SFN08 move-window-up CFN08 grow-window~n"
insert-string "FN09 delete-other-windows SFN09 move-window-down CFN09 shrink-window~n"
insert-string "FN10 delete-fkey-window SFN10 unmark-buffer CFN10 help~n"
insert-string "FN11 execute-named-command SFN11 exit-emacs CFN11 quick-exit~n"
insert-string "FN12 execute-macro SFN12 begin-macro CFN12 end-macro~n"
insert-string "FN13 i-shell SFN13 pipe-command CFN13 filter-buffer~n"
insert-string "FN14 apropos SFN14 describe-key CFN14 describe-bindings~n"
insert-string "FN15 buffer-position SFN15 list-buffers CFN15 help~n"
unmark-buffer
add-mode "VIEW"
next-window
delete-other-windows
4 handle-tab
add-global-mode CMODE
add-global-mode MAGIC
unbind-key ^T
unbind-key ^L
bind-to-key previous-word ^L
bind-to-key next-word ^T