🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #189161

Help with EDT GOLD/keypad

#189161
From: David L. Huestis
Date: Fri, 19 Apr 1991 04:35
67 lines
3637 bytes
I have recently begun to use GNU emacs version 18.52 under VMS
(I am an experienced system manager and programmer, having written
my own screen editor in 1983).  I would like to modify the emulation
of EDT's use of keypad and GOLD/keypad functions, but no matter what
I try I always get "undefined" when preceding a keypad-stroke with GOLD.
Below I include some fragments of EMACS_LIBRARY:[LISP]EDT.EL that appear
to set up the GOLD/keypad functions.  If I use them as is I get the error
ESC O P ESC is undefined.  If I enter my own

	(define-key GOLD-map "\e-Ot" 'move-to-end)

I get ESC O P ESC O is undefined (presumably I need to use SS3-map
as defined by VT100.EL).

Has anyone else made the GOLD/keypad functions work?

; -----------------------------------------------------------------

; ...

  (edt-bind-gold-keypad)	;Must do this *after* $TERM.el is loaded

; ...

(define-key function-keymap "\C-a" 'GOLD-prefix)	;PF1 ("gold")

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

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

(defun define-keypad-key (keymap function-keymap-slot definition)
  (let ((function-key-sequence (function-key-sequence function-keymap-slot)))
    (if function-key-sequence
	(define-key keymap function-key-sequence definition))))

;;Bind GOLD/Keyboard keys
; ...

;Bind GOLD/Keypad keys
(defun edt-bind-gold-keypad ()
  (define-keypad-key GOLD-map ?u 'line-to-top-of-window) ;"up-arrow"
  (define-keypad-key GOLD-map ?d 'line-to-bottom-of-window) ;"down-arrow"
  (define-keypad-key GOLD-map ?l 'backward-sentence) ;"left-arrow"
  (define-keypad-key GOLD-map ?r 'forward-sentence) ;"right-arrow"
  (define-keypad-key GOLD-map ?\C-a 'mark-section-wisely) ;Gold     "PF1"
  (define-keypad-key GOLD-map ?\C-b 'describe-function)	;Help     "PF2"
  (define-keypad-key GOLD-map ?\C-c 'occur) ;Find     "PF3"
  (define-keypad-key GOLD-map ?\C-d 'undelete-lines) ;Und Line "PF4"
  (define-keypad-key GOLD-map ?0 'open-line) ;Open L   "0"
  (define-keypad-key GOLD-map ?1 'case-flip-character) ;Chgcase  "1"
  (define-keypad-key GOLD-map ?2 'delete-to-eol) ;Del EOL  "2"
  (define-keypad-key GOLD-map ?3 'copy-region-as-kill) ;Copy     "3"
  (define-keypad-key GOLD-map ?4 'move-to-end) ;Bottom   "4"
  (define-keypad-key GOLD-map ?5 'move-to-beginning) ;Top      "5"
  (define-keypad-key GOLD-map ?6 'yank)	;Paste    "6"
  (define-keypad-key GOLD-map ?7 'execute-extended-command) ;Command  "7"
  (define-keypad-key GOLD-map ?8 'indent-or-fill-region) ;Fill     "8"
  (define-keypad-key GOLD-map ?9 'replace-regexp) ;Replace  "9"
  (define-keypad-key GOLD-map ?- 'undelete-words) ;UND word "-"
  (define-keypad-key GOLD-map ?, 'undelete-chars) ;UND Char ","
  (define-keypad-key GOLD-map ?. 'redraw-display) ;Reset Window "."
  (define-keypad-key GOLD-map ?e 'shell-command)) ;"ENTER"

; ...
Technical Details
Message-ID: <5FIKDN@MPLVAX.SRI.COM>
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!samsung!rex!wuarchive!cs.utexas.edu!sun-barr!newstop!sun!quintus!unix!MPLVAX.SRI.COM!HUESTIS

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,1afa0d75583484bb,start
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-04-20 05:21:06 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!samsung!rex!wuarchive!cs.utexas.edu!sun-barr!newstop!sun!quintus!unix!MPLVAX.SRI.COM!HUESTIS
From: HUESTIS@MPLVAX.SRI.COM (David L. Huestis)
Newsgroups: gnu.emacs.help
Subject: Help with EDT GOLD/keypad
Message-ID: <5FIKDN@MPLVAX.SRI.COM>
Date: 19 Apr 91 04:35:19 GMT
Sender: news@unix.SRI.COM
Organization: Molecular Physics Laboratory, SRI International, Menlo Park, CA
Lines: 67