-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid using numbered macroes if key binding is not needed.
- Loading branch information
Showing
4 changed files
with
161 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
# 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 (Micro-EMACS) | ||
# 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 | ||
!force 8 resize-window | ||
bind-to-key execute-macro-39 FN5 | ||
bind-to-key execute-macro-38 FN6 | ||
beginning-of-line | ||
2 forward-character | ||
1 redraw-display | ||
save-window | ||
set %hlpupdn "<Prev Scrn> / <Next Scrn>" | ||
set %hlphelp "<Help>" | ||
run helponhelp | ||
!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 | ||
bind-to-key previous-page FN5 | ||
bind-to-key next-page FN6 | ||
!force restore-window | ||
!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 FNh | ||
|
||
; 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 | ||
|
||
; Set up auto CMODE | ||
|
||
37 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-37 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" |