mirror of
https://github.com/rfivet/uemacs.git
synced 2024-11-18 02:26:06 -05:00
164 lines
3.2 KiB
Plaintext
164 lines
3.2 KiB
Plaintext
# UE.RC
|
|
#
|
|
# Startup file for µEMACS 4.2
|
|
# This file is executed every time the editor is entered.
|
|
# If you want to keep compatibility with em (uEmacs/PK) or me (MicroEMACS)
|
|
# cp emacs.rc ~/.emacsrc
|
|
# cp ue.rc ~/.uerc
|
|
# otherwise
|
|
# cp ue.rc ~/.emacsrc
|
|
|
|
set $discmd "FALSE"
|
|
set $tab 4
|
|
|
|
; Help facility
|
|
|
|
40 store-macro
|
|
set $discmd "FALSE"
|
|
!if ¬ &seq $cbufname "emacs.hlp"
|
|
write-message "(Loading Help)"
|
|
!force help
|
|
!if ¬ &seq $cbufname "emacs.hlp"
|
|
write-message "(Failed to load Help)"
|
|
!else
|
|
!force 8 resize-window
|
|
bind-to-key execute-macro-39 FN5
|
|
bind-to-key execute-macro-38 FN6
|
|
bind-to-key execute-macro-37 FNH
|
|
bind-to-key execute-macro-36 FNF
|
|
beginning-of-line
|
|
2 forward-character
|
|
1 redraw-display
|
|
set %hlpupdn "[PgUp] / [PgDn]"
|
|
set %hlphelp "[F1]"
|
|
run helponhelp
|
|
!endif
|
|
!else
|
|
set %hlpcode &lef $line 2
|
|
!if &seq %hlpcode ".."
|
|
set %hlptopic &mid $line 4 99
|
|
end-of-line
|
|
!force search-forward %hlptopic
|
|
beginning-of-line
|
|
2 forward-character
|
|
1 redraw-display
|
|
run helponhelp
|
|
!else
|
|
!force search-reverse "=>"
|
|
bind-to-key previous-page FN5
|
|
bind-to-key next-page FN6
|
|
bind-to-key beginning-of-file FNH
|
|
bind-to-key end-of-file FNF
|
|
!force delete-window
|
|
clear-message-line
|
|
!endif
|
|
!endif
|
|
set $discmd "TRUE"
|
|
!endm
|
|
|
|
bind-to-key execute-macro-40 M-?
|
|
bind-to-key execute-macro-40 FNP
|
|
bind-to-key beginning-of-file FNH
|
|
bind-to-key end-of-file FNF
|
|
|
|
; Help on Help
|
|
|
|
store-procedure helponhelp
|
|
!if &seq &rig $line 5 "INDEX"
|
|
write-message &cat "Select topic from list and press " %hlphelp
|
|
!else
|
|
write-message &cat "Use " &cat %hlpupdn &cat " to scan help file -- " &cat %hlphelp " to toggle help window"
|
|
!endif
|
|
!endm
|
|
|
|
; Previous help page
|
|
|
|
39 store-macro
|
|
!if &seq $cbufname "emacs.hlp"
|
|
beginning-of-line
|
|
!force search-reverse "=>"
|
|
2 forward-character
|
|
1 redraw-display
|
|
run helponhelp
|
|
!else
|
|
previous-page
|
|
!endif
|
|
!endm
|
|
|
|
; Next help page
|
|
|
|
38 store-macro
|
|
!if &seq $cbufname "emacs.hlp"
|
|
beginning-of-line
|
|
2 forward-character
|
|
!force search-forward "=>"
|
|
1 redraw-display
|
|
run helponhelp
|
|
!else
|
|
next-page
|
|
!endif
|
|
!endm
|
|
|
|
37 store-macro
|
|
beginning-of-file
|
|
!if &seq $cbufname "emacs.hlp"
|
|
execute-macro-39
|
|
!endif
|
|
!endm
|
|
|
|
36 store-macro
|
|
end-of-file
|
|
!if &seq $cbufname "emacs.hlp"
|
|
execute-macro-39
|
|
!endif
|
|
!endm
|
|
|
|
; Set up auto CMODE
|
|
|
|
35 store-macro
|
|
!if &seq &mid $cfname 1 7 "/tmp/Re"
|
|
add-mode "wrap"
|
|
!return
|
|
!endif
|
|
!if &gre &sin $cfname "/.ed" 0
|
|
add-mode "wrap"
|
|
!return
|
|
!endif
|
|
!if &gre &sin $cfname "/.let" 0
|
|
add-mode "wrap"
|
|
!return
|
|
!endif
|
|
!if &gre &sin $cfname "/.art" 0
|
|
add-mode "wrap"
|
|
!return
|
|
!endif
|
|
!if &gre &sin $cfname "/nn." 0
|
|
add-mode "wrap"
|
|
!return
|
|
!endif
|
|
set %rctmp &sin $cfname "."
|
|
!if &equ %rctmp 0
|
|
!return
|
|
!endif
|
|
set %rctmp &mid $cfname &add %rctmp 1 5
|
|
!if &or &seq %rctmp "c" &seq %rctmp "h"
|
|
add-mode "cmode"
|
|
!endif
|
|
!if &or &seq %rctmp "txt" &or &seq %rctmp "doc" &or &seq %rctmp "tmp" &seq %rctmp "tex"
|
|
add-mode "wrap"
|
|
!endif
|
|
|
|
!endm
|
|
|
|
bind-to-key execute-macro-35 M-FNR
|
|
|
|
; Make cut-paste easier in window systems
|
|
|
|
bind-to-key newline ^J
|
|
|
|
!if &or &gre &sin $LANG "UTF-8" 0 &gre &sin $LANG "utf8" 0
|
|
add-global-mode "utf-8"
|
|
!endif
|
|
|
|
set $discmd "TRUE"
|