Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!NAV.ICST.NBS.GOV!rbj From: rbj@NAV.ICST.NBS.GOV (Nilbert T Bignum) Newsgroups: gnu.emacs.bug Subject: Inconsistency of define-prefix-command in keymap.c Message-ID: <8902152355.AA09454@nav.icst.nbs.gov> Date: 15 Feb 89 23:55:32 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: National Institute of Standards and Technology Lines: 36 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 NTSI: Never Twice the Same Institute