2021-09-15 21:44:59 -04:00
|
|
|
; .emacsrc -- Startup file for µEMACS 4.2
|
2005-05-31 11:50:56 -04:00
|
|
|
;
|
|
|
|
; This file is executed every time the editor is entered.
|
|
|
|
|
2021-09-15 21:44:59 -04:00
|
|
|
set $discmd FALSE
|
|
|
|
!if ¬ &seq $progname µEMACS
|
|
|
|
; uemacs/PK and MicroEMACS
|
|
|
|
set $discmd TRUE
|
|
|
|
!return
|
2005-05-31 11:50:56 -04:00
|
|
|
!endif
|
|
|
|
|
2021-09-15 21:44:59 -04:00
|
|
|
set $tab 4
|
|
|
|
# set $viewtab TRUE # uncomment this line if you need to visualize tabs
|
|
|
|
set $fillcol 76
|
2005-05-31 11:50:56 -04:00
|
|
|
|
|
|
|
|
2021-09-15 21:44:59 -04:00
|
|
|
## Help facility
|
|
|
|
!if &seq $TERM cygwin
|
|
|
|
set $scroll FALSE
|
|
|
|
set %F1 FNP #currently not readable
|
|
|
|
set %Home FN1
|
|
|
|
set %End FN4
|
|
|
|
!else
|
|
|
|
set %F1 FNP
|
|
|
|
set %Home FNH
|
|
|
|
set %End FNF
|
2005-05-31 11:50:56 -04:00
|
|
|
!endif
|
|
|
|
|
2021-09-15 21:44:59 -04:00
|
|
|
!store 40
|
|
|
|
set $discmd FALSE
|
2005-05-31 11:50:56 -04:00
|
|
|
!if ¬ &seq $cbufname "emacs.hlp"
|
|
|
|
write-message "(Loading Help)"
|
|
|
|
!force help
|
2021-09-15 21:44:59 -04:00
|
|
|
!if ¬ &seq $cbufname "emacs.hlp"
|
|
|
|
write-message "(Failed to load Help)"
|
2005-05-31 11:50:56 -04:00
|
|
|
!else
|
2021-09-15 21:44:59 -04:00
|
|
|
!force 8 resize-window
|
|
|
|
bind-to-key execute-macro-39 FN5
|
|
|
|
bind-to-key execute-macro-38 FN6
|
|
|
|
bind-to-key execute-macro-37 %Home
|
|
|
|
bind-to-key execute-macro-36 %End
|
|
|
|
beginning-of-line
|
|
|
|
2 forward-character
|
|
|
|
1 redraw-display
|
|
|
|
set %hlpupdn "[PgUp] / [PgDn]"
|
|
|
|
set %hlphelp "[F1]"
|
|
|
|
run helponhelp
|
2005-05-31 11:50:56 -04:00
|
|
|
!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
|
2021-09-15 21:44:59 -04:00
|
|
|
run helponhelp
|
2005-05-31 11:50:56 -04:00
|
|
|
!else
|
2021-09-15 21:44:59 -04:00
|
|
|
!force search-reverse "=>"
|
|
|
|
bind-to-key previous-page FN5
|
|
|
|
bind-to-key next-page FN6
|
|
|
|
bind-to-key beginning-of-file %Home
|
|
|
|
bind-to-key end-of-file %End
|
2005-05-31 11:50:56 -04:00
|
|
|
!force delete-window
|
|
|
|
clear-message-line
|
|
|
|
!endif
|
|
|
|
!endif
|
2021-09-15 21:44:59 -04:00
|
|
|
set $discmd TRUE
|
2005-05-31 11:50:56 -04:00
|
|
|
!endm
|
|
|
|
|
|
|
|
bind-to-key execute-macro-40 M-?
|
2021-09-15 21:44:59 -04:00
|
|
|
bind-to-key execute-macro-40 %F1
|
|
|
|
bind-to-key execute-macro-40 M-O
|
|
|
|
bind-to-key beginning-of-file %Home
|
|
|
|
bind-to-key end-of-file %End
|
2005-05-31 11:50:56 -04:00
|
|
|
|
|
|
|
|
2021-09-15 21:44:59 -04:00
|
|
|
## Help on Help
|
|
|
|
!store helponhelp
|
2005-05-31 11:50:56 -04:00
|
|
|
!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
|
|
|
|
|
|
|
|
|
2021-09-15 21:44:59 -04:00
|
|
|
## Previous help page
|
|
|
|
!store 39
|
2005-05-31 11:50:56 -04:00
|
|
|
!if &seq $cbufname "emacs.hlp"
|
|
|
|
beginning-of-line
|
|
|
|
!force search-reverse "=>"
|
|
|
|
2 forward-character
|
|
|
|
1 redraw-display
|
2021-09-15 21:44:59 -04:00
|
|
|
run helponhelp
|
2005-05-31 11:50:56 -04:00
|
|
|
!else
|
|
|
|
previous-page
|
|
|
|
!endif
|
|
|
|
!endm
|
|
|
|
|
|
|
|
|
2021-09-15 21:44:59 -04:00
|
|
|
## Next help page
|
|
|
|
!store 38
|
2005-05-31 11:50:56 -04:00
|
|
|
!if &seq $cbufname "emacs.hlp"
|
|
|
|
beginning-of-line
|
|
|
|
2 forward-character
|
|
|
|
!force search-forward "=>"
|
|
|
|
1 redraw-display
|
2021-09-15 21:44:59 -04:00
|
|
|
run helponhelp
|
2005-05-31 11:50:56 -04:00
|
|
|
!else
|
|
|
|
next-page
|
|
|
|
!endif
|
|
|
|
!endm
|
|
|
|
|
2021-09-15 21:44:59 -04:00
|
|
|
!store 37
|
|
|
|
beginning-of-file
|
|
|
|
!if &seq $cbufname "emacs.hlp"
|
|
|
|
execute-macro-39
|
2005-05-31 11:50:56 -04:00
|
|
|
!endif
|
2021-09-15 21:44:59 -04:00
|
|
|
!endm
|
|
|
|
|
|
|
|
!store 36
|
|
|
|
end-of-file
|
|
|
|
!if &seq $cbufname "emacs.hlp"
|
|
|
|
execute-macro-39
|
2005-05-31 11:50:56 -04:00
|
|
|
!endif
|
2021-09-15 21:44:59 -04:00
|
|
|
!endm
|
|
|
|
|
|
|
|
|
|
|
|
## Set up auto CMODE or WRAP
|
|
|
|
!store 35
|
|
|
|
set %rctmp &right $cfname 4
|
|
|
|
!if &or &seq .txt %rctmp &seq .doc %rctmp
|
|
|
|
add-mode wrap
|
2005-05-31 11:50:56 -04:00
|
|
|
!return
|
|
|
|
!endif
|
2021-09-15 21:44:59 -04:00
|
|
|
set %rctmp &right %rctmp 2
|
|
|
|
!if &or &seq .c %rctmp &seq .h %rctmp
|
|
|
|
add-mode cmode
|
2005-05-31 11:50:56 -04:00
|
|
|
!return
|
|
|
|
!endif
|
|
|
|
!endm
|
|
|
|
|
2021-09-15 21:44:59 -04:00
|
|
|
bind-to-key execute-macro-35 M-FNR
|
2005-05-31 11:50:56 -04:00
|
|
|
|
|
|
|
|
2021-09-15 21:44:59 -04:00
|
|
|
## Make cut-paste easier in window systems
|
2005-05-31 11:50:56 -04:00
|
|
|
bind-to-key newline ^J
|
|
|
|
|
|
|
|
|
2021-09-15 21:44:59 -04:00
|
|
|
!if &or &sin $LANG "UTF-8" &sin $LANG "utf8"
|
2005-10-02 20:47:28 -04:00
|
|
|
add-global-mode "utf-8"
|
|
|
|
!endif
|
|
|
|
|
2021-09-15 21:44:59 -04:00
|
|
|
set $discmd TRUE
|