;	EMACS.RC:	Startup file for MicroEMACS 3.8 (HP 110) 
;
;			This file is executed everytime the
;			editor is entered

;	***** Rebind the Function key group

bind-to-key search-forward		FN;
bind-to-key search-reverse		FN<
bind-to-key next-window			FN=
bind-to-key execute-macro		FN>
bind-to-key find-file			FN?
bind-to-key view-file			FN@
bind-to-key save-file			FNA
bind-to-key exit-emacs			FNB
bind-to-key describe-key		FND
bind-to-key meta-prefix			`
bind-to-key beginning-of-file		FNs
bind-to-key end-of-file			FNt

;	Enter Help
1 store-macro
	delete-other-windows
	help
	8 resize-window
	bind-to-key execute-macro-12 FNH
	bind-to-key execute-macro-13 FNP
	bind-to-key execute-macro-11 FNT
	beginning-of-file
	2 forward-character
	clear-message-line
!endm

;	consult file
2 store-macro
	2 split-current-window
	previous-window
	view-file @"File to Consult: "
	8 resize-window
	next-window
!endm

;	Exit Help
11 store-macro
	bind-to-key previous-line FNH
	bind-to-key next-line FNP
	bind-to-key execute-macro-1 FNT
	delete-window
	clear-message-line
!endm

;	last help page
12 store-macro
	beginning-of-line
	search-reverse "=>"
	1 redraw-display
!endm

;	next help page
13 store-macro
	beginning-of-line
	2 forward-character
	search-forward "=>"
	1 redraw-display
!endm

;	bring up the function key window

	2 split-current-window
	select-buffer "Function Keys"
	2 resize-window
	insert-string " F1 search     | F2 search back | F3 next wind   | F4 Exec Macro  | MENU Help"
	newline
	insert-string "SYS desc key   | F5 Find file   | F6 view file   | F7 save file   | F8 exit"
	beginning-of-file
	unmark-buffer
	next-window
S
