[gnu.emacs.bug] Inconsistency of define-prefix-command in keymap.c

rbj@NAV.ICST.NBS.GOV (Nilbert T Bignum) (02/16/89)

M-x emacs-version => 18.52.infinity

Hey, when you look at this closely, it will jump out at you. The doc string
says function definition, but it is actually the value that's being set.
Perhaps somebody meant `Ffset' instead of `Fset'?

DEFUN ("define-prefix-command", Fdefine_prefix_command, Sdefine_prefix_command, 1, 1, 0,
  "Define SYMBOL as a prefix command.\n\
A keymap is created and stored as SYMBOL's function definition.")
===========================================^^^^^^^^
  (name)
     Lisp_Object name;
{
  Fset (name, Fmake_keymap ());
==^^^^
  return name;
}

I did a tags-search on this guy and found no references except the definition.
Perhaps now would be a good time to toy with its definition.

It seems the idiom goes something like this:

	(defvar foo-map (make-keymap))
	(fset 'foo-command foo-map)
	(define-key some-map "keys" 'foo-command)

Actually, I see no reason why two distinct symbols need be used, and
propose that both the value and function cells be set to the same keymap.
If two distinct symbols are required for some reason, then perhaps
define-prefix-command should take two arguments and do both for you.

BTW, is copy-keymap broken in 18.52? It hangs forever for me.

	Nilbert T Bignum <rbj@nav.icst.nbs.gov>
	NTSI: Never Twice the Same Institute