;	EMACS.RC:	Standard micro Startup program
;			for MicroEMACS 3.9d and above
;			(C)opyright 1987 by Daniel M Lawrence
;			Last Update: 1 August 1988

; Hide what is happening while we set up
set $discmd FALSE

write-message "[Setting up....]"

; this puts any buffers whose associated filename ends in .c or .h into CMODE
set $sync TRUE
;set $terse TRUE
set $auto-c TRUE
set $asave 100
set $tpause 1
set $noflash 1
;set $doublestar 1
;set $catchsuspend 1
set $auto-width 1

;set $ttytimeout 2000000
;set $prefdlay 0

; now some key bindings, to get a complete list of functions and bindings,
; start up emacs and type "ESC x describe-bindings RETURN"
bind-to-key save-file			^XS
bind-to-key incremental-search		^X/
bind-to-key reverse-incremental-search	^R
bind-to-key shell-command		M-!
bind-to-key renew-buffer		^X.
bind-to-key change-char-case		^]
bind-to-key quote-character		^XQ
bind-to-key pipe-command		M-$
bind-to-key filter-buffer		M-#
bind-to-key set-mark			^@
bind-to-key meta-quote			^X^[
; Linux maps pound to 0xA3
map-key  "#"
; Some other UNIX systems map pound to 0x9C
map-key  "#"

; If you screen "SNOWS", uncomment this line
;	set $flicker "TRUE"

; To use an IBM-PC EGA card, uncomment the following line
; set $sres "EGA"

; UNIX only
; Note that UNIX FN keys are FN1->FN0 (keys F1->F10), DOS is some strange
; assignment based on what DOS returns.
bind-to-key incremental-search		FN1
bind-to-key reverse-incremental-search	FN2
;bind-to-key hunt-forward		FN3
;bind-to-key hunt-backward		FN4
;bind-to-key execute-macro-1		FN5
;bind-to-key execute-macro-2		FN6
bind-to-key next-buffer			FN7
bind-to-key find-file			FN8
bind-to-key save-file			FN9
bind-to-key exit-emacs			FN0

;	bring up the function key window
1 store-macro
	select-buffer "Function Keys"
	insert-string "f1 search->   f2 <-search   f7 nxt buff   f8 find-file   f9 save   f10 exit~n"
	beginning-of-file
	unmark-buffer
	1 split-current-window
	select-buffer "Function Keys"
	!force 1 resize-window
	next-window
!endm

;execute-macro-1

set %rcfkeys FALSE

; Restart prompts, etc.
set $discmd TRUE
