[net.emacs] GNU Emacs prefix keys - help!

mjp@spice.cs.cmu.edu (Michael Portuesi) (10/04/86)

Keywords:


I would like to set up some bindings for the function keys on my
vt100.  The VT-100 sends the following code for the function keys:

	Key		Sequence sent
	-----------------------------
	PF1		ESC O P
	PF2		ESC O Q
	PF3		ESC O R
	PF4		ESC O S

The following code in my .emacs file gives an error upon loading:

(global-set-key "\M-OP" 'next-window)		; PF1 key -- next window
(global-set-key "\M-OQ" 'find-file)		; PF2 key -- find file
(global-set-key "\M-OR" 'undo)			; PF3 key -- undo
(global-set-key "\M-OS" 'help-for-help)		; PF4 key -- help

I believe Emacs is not accepting the bindings since it refuses to
acknowledge ESC-O as a valid prefix character.

I checked the manual.  It says that Emacs binds a prefix key to a
symbol whose function definition is a keymap (actually, a Lisp vector)
of commands that are bound to that prefix key.  For example, C-X is
bound to the symbol Control-X-Prefix, whose definition is a Lisp
vector of subcommands.

What I really want to do is define M-O to be a prefix key, so I can
place the function key bindings in its keymap.  But the Emacs manual
tells me nothing about actually defining new prefix keys.  My longtime
friend, apropos, seems to be of no help either.

Can anyone enlighten me?  Please send me e-mail.  I will summarize
back here with both an explanation of defining prefix keys and some
Emacs Lisp code to do useful things with the arrow/function keys of
the VT-100.
-- 

+----------------------------------------------------------------------------+
| Mike Portuesi								     |
| Carnegie-Mellon University Computer Science Department		     |
|									     |
| ARPA: mjp@spice.cs.cmu.edu (preferred), mp1u@td.cc.cmu.edu		     |
| UUCP: {harvard | seismo | ucbvax | decwrl}!spice.cs.cmu.edu!mjp	     |
|									     |
| "Little things remind me of you...Cheap cologne and that damn song too!"   |
|			--The Flirts, "Jukebox"				     |
+----------------------------------------------------------------------------+