From:	ELAB::SMITH        "Thomas M Smith, GEA Support Center, 8*256-2536, (315)456-2536, FAX -6844"  1-MAY-1991 17:51:08.67
To:	ARISIA::EVERHART
CC:	
Subj:	EMACS vt100.el setups

Glenn,

Following is the contents of our vt100.el file - setups for vt100
terminals (or emulators like xterm...). This file came from the
lisp/term subdirectory of the emacs distribution directory. You can 
compile it into vt100.elc for speed (I forget how...). 

For some reason, I didn't like the vt100.el provided with the 
distribution, so I embarked upon a crusade to get closer to the edt
that I was used to from a vt100/vt200.

I never did get around to figuring out how to setup emacs to work
with a terminal type of "sun" or "sun-cmd", only term=vt100.

Enjoy!

... Tom

p.s. More info coming on XTERM setups when I get a chance!

--------------------------------------------------------------------------------
;; vt100/vt200 series terminal mappings
;; including EDT-like keypad functions
;; Revision: 06/23/88-A

;; Change History:
;;
;; 06/23/88  tms  Fixed edt-case-flip to recognize selected region,
;;                Added edt-select-region, edt-unselect-region functions
;; 06/22/88  tms  Added edt-reset function

;;
;; ----------------------------------------------------------------------------
;;
;; Define variables
;;

(defvar edt-last-deleted-lines ""
  "Last text deleted by an EDT emulation line-delete command.")
(defvar edt-last-deleted-words ""
  "Last text deleted by an EDT emulation word-delete command.")
(defvar edt-last-deleted-chars ""
  "Last text deleted by an EDT emulation character-delete command.")
(defvar edt-string-to-find ""
  "Search string for EDT emulation of Find commands.")
(defvar edt-paste-buffer ""
  "Paste buffer for EDT emulation cut/paste commands.")

;;
;; ----------------------------------------------------------------------------
;;
;; Informational messages
;;

(defun edt-select-msg()
  "Output informational message to minibuffer when select is activated."
  (interactive)
  (message "%s" "Select"))

;;
;; ----------------------------------------------------------------------------
;;
;; Error messages
;;

(defun edt-undefined-key-msg()
  "Output error message to minibuffer when un-mapped key is used."
  (interactive)
  (beep)
  (message "%s" "Key is not defined"))

(defun edt-select-already-active-msg()
  "Output error message to minibuffer when edt select is already active."
  (interactive)
  (beep)
  (message "%s" "Select range is already active"))

(defun edt-select-not-active-msg()
  "Output error message to minibuffer when edt select is not active."
  (interactive)
  (beep)
  (message "%s" "No select range active"))

;;
;; ----------------------------------------------------------------------------
;;
;; Cut/Paste functions
;;

(defun edt-cut ()
  "Cut region between mark and point."
  (interactive)
  (setq edt-paste-buffer
    (buffer-substring (min (point) (mark)) (max (point) (mark))))
  (delete-region (point) (mark))
  (edt-unselect-region))

(defun edt-paste (num)
  "Paste previously cut region into buffer at cursor position.
Accepts a prefix argument to paste multiple times."
  (interactive "p")
  (while (> num 0)
    (insert edt-paste-buffer)
    (setq num (1- num))))

(defun edt-append ()
  "Append region between mark and point to edt-paste-buffer."
  (interactive)
  (setq edt-paste-buffer
    (concat edt-paste-buffer
	    (buffer-substring (min (point) (mark)) (max (point) (mark)))))
  (delete-region (point) (mark))
  (edt-unselect-region))

;;
;; ----------------------------------------------------------------------------
;;
;; Find String functions
;;

(defun edt-forward-find (num)
  "Find next occurrence of specified regular expression.
Accepts a prefix argument to find the Nth occurrence."
  (interactive "p")
  (setq edt-string-to-find (read-string "regexp to find: "))
  (while (> num 0)
    (re-search-forward edt-string-to-find)
    (setq num (1- num))))

(defun edt-forward-fndnxt (num)
  "Find next occurrence of specified regular expression.
Accepts a prefix argument to find the Nth occurrence."
  (interactive "p")
  (while (> num 0)
    (re-search-forward edt-string-to-find)
    (setq num (1- num))))

(defun edt-backward-find (num)
  "Find previous occurrence of specified regular expression.
Accepts a prefix argument to find the Nth occurrence."
  (interactive "p")
  (setq edt-string-to-find (read-string "regexp to find: "))
  (while (> num 0)
    (re-search-backward edt-string-to-find)
    (setq num (1- num))))

(defun edt-backward-fndnxt (num)
  "Find previous occurrence of specified regular expression.
Accepts a prefix argument to find the Nth occurrence."
  (interactive "p")
  (while (> num 0)
    (re-search-backward edt-string-to-find)
    (setq num (1- num))))

;;
;; ----------------------------------------------------------------------------
;;
;; Replace String Functions
;;

(defun edt-forward-substitute (num)
  "Deletes search string, replaces with contents of paste buffer,
and finds next occurrence.
Accepts a prefix argument to substitute for N occurrences."
  (interactive "p")
  (while (> num 0)
    (replace-match edt-paste-buffer t t)
    (edt-forward-fndnxt 1)
    (setq num (1- num))))

(defun edt-backward-substitute (num)
  "Deletes search string, replaces with contents of paste buffer,
and finds previous occurrence.
Accepts a prefix argument to substitute for N occurrences."
  (interactive "p")
  (while (> num 0)
    (replace-match edt-paste-buffer t t)
    (edt-backward-fndnxt 1)
    (setq num (1- num))))

(defun edt-replace ()
  "Deletes select range and replaces it with contents of paste buffer."
  (interactive)
  (delete-region (point) (mark))
  (insert edt-paste-buffer))

;;
;; ----------------------------------------------------------------------------
;;
;; Delete/Undelete Functions
;;

(defun edt-delete-current-line (num)
  "Delete one or specified number of lines after point.
This includes the newline character at the end of each line.
They are saved for the EDT edt-undelete-lines command."
  (interactive "p")
  (let ((beg (point)))
    (forward-line num)
    (if (not (eq (preceding-char) ?\n))
	(insert "\n"))
    (setq edt-last-deleted-lines
	  (buffer-substring beg (point)))
    (delete-region beg (point))))

(defun edt-delete-to-eol (num)
  "Delete text up to end of line.
With argument, delete up to to Nth line-end past point.
They are saved for the EDT edt-undelete-lines command."
  (interactive "p")
  (let ((beg (point)))
    (forward-char 1)
    (end-of-line num)
    (setq edt-last-deleted-lines
	  (buffer-substring beg (point)))
    (delete-region beg (point))))

(defun edt-delete-current-word (num)
  "Delete one or specified number of words after point.
They are saved for the EDT edt-undelete-words command."
  (interactive "p")
  (let ((beg (point)))
;;    (forward-word num)
      (edt-forward-to-word num)
    (setq edt-last-deleted-words
	  (buffer-substring beg (point)))
    (delete-region beg (point))))

(defun edt-delete-previous-word (num)
  "Delete one or specified number of words before point.
They are saved for the EDT edt-undelete-words command."
  (interactive "p")
  (let ((beg (point)))
;;  (forward-word (- num))
    (edt-backward-to-word num)
    (setq edt-last-deleted-words
	  (buffer-substring (point) beg))
    (delete-region beg (point))))

(defun edt-delete-current-char (num)
  "Delete one or specified number of characters after point.
They are saved for the EDT edt-undelete-chars command."
  (interactive "p")
  (setq edt-last-deleted-chars
	(buffer-substring (point) (min (point-max) (+ (point) num))))
  (delete-region (point) (min (point-max) (+ (point) num))))

(defun edt-delete-previous-char (num)
  "Delete one or specified number of characters before point.
They are saved for the EDT edt-undelete-chars command."
  (interactive "p")
  (setq edt-last-deleted-chars
	(buffer-substring (max (point-min) (- (point) num)) (point)))
  (delete-region (max (point-min) (- (point) num)) (point)))

(defun edt-undelete-lines ()
  "Yank lines deleted by last EDT line-deletion command."
  (interactive)
  (let ((beg (point)))
    (insert edt-last-deleted-lines)
    (goto-char beg)))

(defun edt-undelete-words ()
  "Yank words deleted by last EDT word-deletion command."
  (interactive)
  (let ((beg (point)))
    (insert edt-last-deleted-words)
    (goto-char beg)))

(defun edt-undelete-chars ()
  "Yank characters deleted by last EDT character-deletion command."
  (interactive)
  (let ((beg (point)))
    (insert edt-last-deleted-chars)
    (goto-char beg)))

;;
;; ----------------------------------------------------------------------------
;;
;; Cursor Movement Functions
;;

(defun edt-skip-blanks-forward ()
  "Skips blanks forward until something else reached."
  (interactive)
  (while (eq (following-char) ?\ )
    (forward-char)))

(defun edt-skip-blanks-backward ()
  "Skips blanks backwards until something else reached."
  (interactive)
  (while (eq (preceding-char) ?\ )
    (backward-char)))

(defun edt-skip-nonblanks-forward ()
  "Skip non-blank strings forward until control char, blank, newline reached."
  (interactive)
  (while (and (> (following-char) ?\ ) (not (eq (following-char) ?\n)))
    (forward-char)))

(defun edt-skip-nonblanks-backward ()
  "Skip non-blank strings backward until control char, blank, newline reached."
  (interactive)
  (while (and (> (preceding-char) ?\ ) (not (eq (preceding-char) ?\n)))
    (backward-char)))

(defun edt-prev-beginning-of-line (num)
  "Move to beginning of line; if at beginning, move to beginning
of previous line.  Accepts a prefix argument for the number of lines
to move."
  (interactive "p")
  (backward-char)
  (beginning-of-line num))

(defun edt-next-end-of-line (num)
  "Move to end of line; if at end, move to end of next line.
Accepts a prefix argument for the number of lines to move."
  (interactive "p")
  (forward-char)
  (end-of-line num))

(defun edt-previous-end-of-line (num)
  "Move EOL upward.
Accepts a prefix argument for the number of lines to move."
  (interactive "p")
  (end-of-line (- 1 num)))


(defun edt-forward-to-word (num)
  "Move to next word-beginning, or to Nth following word-beginning."
  (interactive "p")
  (while (> num 0)
    (cond
     
     ((looking-at " ")
      (edt-skip-blanks-forward))
     
     ((looking-at "\n")
      (forward-char))
     
     ((< (following-char) ?\ )
      (forward-char)
      (edt-skip-blanks-forward))
     
     (t
      (edt-skip-nonblanks-forward)
      (edt-skip-blanks-forward)))
    
    (setq num (1- num))))

(defun edt-backward-to-word (num)
  "Move to previous word-beginning, or to Nth previous word-beginning."
  (interactive "p")
  (while (> num 0)
    (cond
     
     ((eq (preceding-char) ?\ )
      (edt-skip-blanks-backward)
      (edt-skip-nonblanks-backward))

     ((eq (preceding-char) ?\n)
      (backward-char))
     
     ((< (preceding-char) ?\ )
      (backward-char))
     
     (t
      (edt-skip-nonblanks-backward)))
    
    (setq num (1- num))))

(defun edt-backward-line (num)
  "Move point to start of previous line.
Prefix argument serves as repeat-count."
  (interactive "p")
  (forward-line (- num)))

(defun edt-next-paragraph (num)
  "Move to beginning of the next indented paragraph.
Accepts a prefix argument for the number of paragraphs."
  (interactive "p")
  (while (> num 0)
    (next-line 1)
    (forward-paragraph)
    (previous-line 1)
    (if (eolp) (next-line 1))
    (setq num (1- num))))

(defun edt-previous-paragraph (num)
  "Move to beginning of previous indented paragraph.
Accepts a prefix argument for the number of paragraphs."
  (interactive "p")
  (while (> num 0)
    (backward-paragraph)
    (previous-line 1)
    (if (eolp) (next-line 1))
    (setq num (1- num))))

(defun edt-move-to-beginning ()
  "Move cursor to the beginning of buffer, but don't set the mark."
  (interactive)
  (goto-char (point-min)))

(defun edt-move-to-end ()
  "Move cursor to the end of buffer, but don't set the mark."
  (interactive)
  (goto-char (point-max)))

(defun edt-goto-percent (perc)
  "Move point to ARG percentage of the buffer."
  (interactive "NGoto-percentage: ")
  (if (or (> perc 100) (< perc 0))
      (error "Percentage %d out of range 0 < percent < 100" perc)
    (goto-char (/ (* (point-max) perc) 100))))


;;
;; ----------------------------------------------------------------------------
;;
;; Window manipulation functions
;;

(defun edt-scroll-window-down (num)
  "Scroll the display down a window-full.
Accepts a prefix argument for the number of window-fulls to scroll."
  (interactive "p")
  (scroll-down (- (* (window-height) num) 2)))

(defun edt-scroll-window-up (num)
  "Scroll the display up a window-full.
Accepts a prefix argument for the number of window-fulls to scroll."
  (interactive "p")
  (scroll-up (- (* (window-height) num) 2)))

(defun edt-beginning-of-window ()
  "Home cursor to top of window."
  (interactive)
  (move-to-window-line 0))

(defun edt-line-to-bottom-of-window ()
  "Move the current line to the bottom of the window."
  (interactive)
  (recenter -1))

(defun edt-line-to-top-of-window ()
  "Move the current line to the top of the window."
  (interactive)
  (recenter 0))

;;
;; ----------------------------------------------------------------------------
;;
;; Set ADVANCE/BACKUP modes
;;

(defun edt-advance-direction ()
  "Set EDT Advance mode so keypad commands move forward."
  (interactive)
  (setq edt-direction-string "ADVANCE")

  (define-key CSI-map "1~" 'edt-forward-find)		; Find
  (define-key GOLD-map "\eOR" 'edt-forward-find)	; PF1 PF3
  (define-key SS3-map "R" 'edt-forward-fndnxt)	        ; PF3

  (define-key GOLD-map "\eOM" 'edt-forward-substitute)  ; PF1 Enter

  (define-key SS3-map "p" 'forward-line)		; KP0
  (define-key SS3-map "q" 'edt-forward-to-word)		; KP1
  (define-key SS3-map "r" 'edt-next-end-of-line)	; KP2
  (define-key SS3-map "s" 'forward-char)		; KP3
  (define-key SS3-map "w" 'edt-next-paragraph)		; KP7
  (define-key SS3-map "x" 'edt-scroll-window-up)	; KP8
  )

(defun edt-backup-direction ()
  "Set EDT Backup mode so keypad commands move backward."
  (interactive)
  (setq edt-direction-string "BACKUP")

  (define-key CSI-map "1~" 'edt-backward-find)		; Find
  (define-key GOLD-map "\eOR" 'edt-backward-find)	; PF1 PF3
  (define-key SS3-map "R" 'edt-backward-fndnxt)	        ; PF3
  
  (define-key GOLD-map "\eOM" 'edt-backward-substitute) ; PF1 Enter

  (define-key SS3-map "p" 'edt-backward-line)		; KP0
  (define-key SS3-map "q" 'edt-backward-to-word)	; KP1
  (define-key SS3-map "r" 'edt-previous-end-of-line)	; KP2
  (define-key SS3-map "s" 'backward-char)		; KP3
  (define-key SS3-map "w" 'edt-previous-paragraph)	; KP7
  (define-key SS3-map "x" 'edt-scroll-window-down)	; KP8
  )

;;
;; ----------------------------------------------------------------------------
;;
;; Miscellaneous Functions
;;

(defun edt-reset ()
  "Reset Mark and redraw display."
  (interactive)
  (edt-unselect-region)
  (redraw-display))

(defun edt-select-region()
  "Sets mark to select a region of text."
  (interactive)
  (cond
   ((eq (mark) nil)
    (set-mark (point))
    (edt-select-msg))
   (t
    (edt-select-already-active-msg))))

(defun edt-unselect-region ()
  "Un-select any currently selected region."
  (interactive)
;;(setq mark-ring nil)
  (set-mark nil))

(defun edt-case-flip-region (num)
  "Change case of region or of the number of characters specified
as a prefix argument."
  (interactive "p")

  (if (eq (mark) nil)

;; if mark is not set, just do num characters from point

      (edt-case-flip-character num)
    
;; if mark is set, do the selected region between mark (inclusive) and
;; point (exclusive)

    (cond

;; point < mark
	
     ((< (point) (mark))
      (let ((save (point)))
        (goto-char (+ (point) 1))
	(edt-case-flip-character (+ (- (mark) (point)) 1))
	(goto-char save)
	(edt-unselect-region)))
	
;; point > mark

     ((> (point) (mark))
      (let ((save (point)))
	(goto-char (mark))
	(edt-case-flip-character (- save (mark)))
	(goto-char save)
	(edt-unselect-region)))

;; point = mark	

	(t
	 (edt-case-flip-character 1)
	 (edt-unselect-region))
	
	) ;end-condition
    ) ;end-if
  ) ;end-defun
       
(defun edt-case-flip-character (num)
  "Change the case of the character under the cursor.
Accepts a prefix argument of the number of characters to invert.
Leaves point at the next character."
  (interactive "p")
  (while (> num 0)
    (funcall (if (<= ?a (following-char))
		 'upcase-region 'downcase-region)
	     (point) (1+ (point)))
    (forward-char 1)
    (setq num (1- num))))

(defun edt-indent-or-fill-region ()
  "Fill region in text modes, indent region in programming language modes."
  (interactive)
  (if (string= paragraph-start "^$\\|^")
      (indent-region (point) (mark) nil)
    (fill-region (point) (mark))))

(defun edt-mark-section-wisely ()
  "Mark the section in a manner consistent with the major-mode.
Uses mark-defun for emacs-lisp, lisp,
mark-c-function for C,
and mark-paragraph for other modes."
  (interactive)
  (cond  ((eq major-mode 'emacs-lisp-mode)
	  (mark-defun))
	 ((eq major-mode 'lisp-mode)
	  (mark-defun))
	 ((eq major-mode 'c-mode)
	  (mark-c-function))
	 (t (mark-paragraph))))


;; Make direction of motion show in mode line
;; Note that the keypad is always turned on when in Emacs.


(or (assq 'edt-direction-string minor-mode-alist)
    (setq minor-mode-alist (cons '(edt-direction-string edt-direction-string)
				 minor-mode-alist)))

;;
;; --------------------------------------------------------------------------
;;
;; CSI definitions
;;
;; user should (setq vt-esc-bracket nil) in ~/.emacs to preserve
;; original esc-[ behavior, otherwise will have to use esc-[[
;;

(defvar vt-esc-bracket t "If non-nil vt.el overwrites esc-[")

(defvar CSI-map nil
  "The CSI-map maps the CSI function keys on the LK201 keyboard.
The CSI keys are the dark function keys, and are only active in
VT200-mode, except for the arrow keys, which return CSI codes in
normal cursor mode.")

(if (not CSI-map)
    (progn
	(setq CSI-map (make-sparse-keymap))

	(define-key CSI-map "A" 'previous-line)			; up arrow
	(define-key CSI-map "B" 'next-line)			; down-arrow
	(define-key CSI-map "C" 'forward-char)			; right-arrow
	(define-key CSI-map "D" 'backward-char)			; left-arrow
	(define-key CSI-map "1~" 'edt-forward-find)		; Find
	(define-key CSI-map "2~" 'edt-paste)			; Insert Here
	(define-key CSI-map "3~" 'edt-cut)			; Re-move
	(define-key CSI-map "4~" 'edt-select-region)		; Select
	(define-key CSI-map "5~" 'scroll-down)			; Prev Screen
	(define-key CSI-map "6~" 'scroll-up)			; Next Screen
	(define-key CSI-map "17~" 'edt-undefined-key-msg)	; F6
	(define-key CSI-map "18~" 'edt-undefined-key-msg)	; F7
	(define-key CSI-map "19~" 'edt-undefined-key-msg)	; F8
	(define-key CSI-map "20~" 'edt-undefined-key-msg)	; F9
	(define-key CSI-map "21~" 'edt-undefined-key-msg)	; F10
	(define-key CSI-map "23~" 'ESC-prefix)			; F11 (ESC)
	(define-key CSI-map "24~" 'edt-undefined-key-msg)	; F12
	(define-key CSI-map "25~" 'edt-undefined-key-msg)	; F13
	(define-key CSI-map "26~" 'edt-undefined-key-msg)	; F14
	(define-key CSI-map "28~" 'info)			; Help
	(define-key CSI-map "29~" 'edt-undefined-key-msg)	; Do
	(define-key CSI-map "31~" 'edt-undefined-key-msg)	; F17
	(define-key CSI-map "32~" 'edt-undefined-key-msg)	; F18
	(define-key CSI-map "33~" 'edt-undefined-key-msg)	; F19
	(define-key CSI-map "34~" 'edt-undefined-key-msg)	; F20
	))

(if vt-esc-bracket
    (progn
      (global-unset-key "\e[")
	(define-key esc-map "[" CSI-map)	       	; CSI-map
	(define-key esc-map "[[" 'backward-paragraph)	; original esc-[
	))

;;
;; ----------------------------------------------------------------------------
;;
;; SS3 Definitions
;;

(defvar SS3-map nil
  "SS3-map maps the SS3 function keys on the VT200 keyboard.
The SS3 keys are the numeric keypad keys in keypad application mode
\(DECKPAM) and the cursor keys in application mode.  SS3 is DEC's
name for the sequence <ESC>O which is the common prefix of what these
keys transmit.")

(if (not SS3-map)
    (progn

	(setq SS3-map (make-sparse-keymap))

	(define-key SS3-map "A" 'previous-line)			; up-arrow
	(define-key SS3-map "B" 'next-line)			; dwn-arrow
	(define-key SS3-map "C" 'forward-char)			; rt-arrow
	(define-key SS3-map "D" 'backward-char)			; lft-arrow
	(define-key SS3-map "M" 'open-line)			; Enter
	(define-key SS3-map "P" 'GOLD-prefix)  			; PF1
	(define-key SS3-map "Q" 'describe-key)			; PF2
	(define-key SS3-map "R" 'edt-forward-fndnxt)		; PF3
	(define-key SS3-map "S" 'edt-delete-current-line)	; PF4
	(define-key SS3-map "l" 'edt-delete-current-char)	; KP,
	(define-key SS3-map "m" 'edt-delete-current-word)	; KP-
	(define-key SS3-map "n" 'edt-select-region)		; KP.
	(define-key SS3-map "p" 'forward-line)			; KP0
	(define-key SS3-map "q" 'edt-forward-to-word)		; KP1
	(define-key SS3-map "r" 'edt-next-end-of-line)		; KP2
	(define-key SS3-map "s" 'forward-char)			; KP3
	(define-key SS3-map "t" 'edt-advance-direction)		; KP4
	(define-key SS3-map "u" 'edt-backup-direction)		; KP5
	(define-key SS3-map "v" 'edt-cut)			; KP6
	(define-key SS3-map "w" 'edt-next-paragraph)		; KP7
	(define-key SS3-map "x" 'edt-scroll-window-up)		; KP8
	(define-key SS3-map "y" 'edt-append)		        ; KP9
	))

(global-unset-key "\eO")
(define-key global-map "\eO" SS3-map)
;;
;; ----------------------------------------------------------------------------
;;
;; GOLD Definitions
;;

(defvar GOLD-map nil
  "GOLD-map maps the letters and function keys on the LK201 keyboard
preceeded by the PF1 key.  PF1 is the 7-bit escape sequence <ESC>OP.")

(if (not GOLD-map)
    (progn

	(setq GOLD-map (make-sparse-keymap))
	(fset 'GOLD-prefix GOLD-map)

	(define-key GOLD-map "S" 'save-buffer)			; PF1 S
	(define-key GOLD-map "s" 'save-buffer)			; PF1 s

	(define-key GOLD-map "\eOA" 'edt-move-to-beginning)	; PF1 up-arrow
	(define-key GOLD-map "\eOB" 'edt-move-to-end)		; PF1 dwn-arrow
	(define-key GOLD-map "\eOC" 'edt-next-end-of-line)	; PF1 rt-arrow
	(define-key GOLD-map "\eOD" 'edt-prev-beginning-of-line); PF1 lft-arrow
	(define-key GOLD-map "\eOM" 'edt-forward-substitute)	; PF1 Enter
	(define-key GOLD-map "\eOQ" 'describe-key)		; PF1 PF2
	(define-key GOLD-map "\eOR" 'edt-forward-find)		; PF1 PF3
	(define-key GOLD-map "\eOS" 'edt-undelete-lines)	; PF1 PF4
	(define-key GOLD-map "\eOl" 'edt-undelete-chars)	; PF1 KP,
	(define-key GOLD-map "\eOm" 'edt-undelete-words)	; PF1 KP-
	(define-key GOLD-map "\eOn" 'edt-reset)	        	; PF1 KP.
	(define-key GOLD-map "\eOp" 'open-line)         	; PF1 KP0
	(define-key GOLD-map "\eOq" 'edt-case-flip-region)	; PF1 KP1
	(define-key GOLD-map "\eOr" 'edt-delete-to-eol)		; PF1 KP2
	(define-key GOLD-map "\eOs" 'copy-region-as-kill)	; PF1 KP3
	(define-key GOLD-map "\eOt" 'edt-move-to-end)		; PF1 KP4
	(define-key GOLD-map "\eOu" 'edt-move-to-beginning)	; PF1 KP5
	(define-key GOLD-map "\eOv" 'edt-paste)			; PF1 KP6
	(define-key GOLD-map "\eOw" 'execute-extended-command)	; PF1 KP7
	(define-key GOLD-map "\eOx" 'edt-indent-or-fill-region)	; PF1 KP8
	(define-key GOLD-map "\eOy" 'edt-replace)		; PF1 KP9
	))

;;(define-key global-map "\eOP" GOLD-map)


--------------------------------------------------------------------------------
