[comp.emacs] Gnu Emacs and function key bindings

brant@linc.cis.upenn.edu (Brant Cheikes) (08/11/87)

Someone please straighten me out on this if I'm committing an
egregious error.  I'm defining a new set of keypad definitions in Gnu
Emacs for a new machine (a Unix PC), and after looking in
lisp/keypad.el, the method used seems pretty random.  It appears that
to bind a new function key to say, 'advertised-undo, one picks an entry
in the function-keymap *arbitrarily*, uses keypad-default to bind the
entry to 'advertised-undo, then places the entry (using ?c syntax)
into the specific keymap using setup-terminal-keymap.  It's the
seeming arbitrariness of picking the function-keymap entry that
bothers me.  In keypad.el, there are a bunch of initial keymap to
command bindings, and there is some documentation for others.  Some of
the documented keymap entries aren't bound in keypad.el.  Can anyone
tell me why, for example, I shouldn't just look through keypad.el,
find a character that isn't used in any of its keypad-defaults, and
bind that to the command of my choice, as in:

(keypad-default "2" 'advertised-undo)

then, later:

  (setup-terminal-keymap ATT-map-1 ; <esc>O prefix map
			 '( ...
			   ("a" . ?2)	; Undo (advertised-undo)
			    ...))

Assuming <esc>Oa was generated by the key labeled "Undo" on my
keyboard.

Is there any rationale or methodology for picking the character to use
in the second argument to keypad-default?

								Brant
-----------------------------------------------------------------------------
Brant Cheikes                                      University of Pennsylvania
ARPA: brant@linc.cis.upenn.edu               Computer and Information Science
=============================================================================