summaryrefslogtreecommitdiff
path: root/src/keymap.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>1998-12-31 13:16:45 +0000
committerEli Zaretskii <eliz@gnu.org>1998-12-31 13:16:45 +0000
commit7f8f0e6709ac15e077b94fa361d914dea14e9a48 (patch)
tree088bd2f26cf0f58a708e498dbe6cf0c96709e81f /src/keymap.c
parent003778571d7a5f7b076742feaa8d01cc631907f4 (diff)
downloademacs-7f8f0e6709ac15e077b94fa361d914dea14e9a48.tar.gz
(Fdefine_prefix_command): Accept a third argument NAME
and pass it to Fmake_sparse_keymap.
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/keymap.c b/src/keymap.c
index ce59d5ae19f..caf4300187f 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1357,17 +1357,19 @@ bindings; see the description of `lookup-key' for more details about this.")
return Flist (j, maps);
}
-DEFUN ("define-prefix-command", Fdefine_prefix_command, Sdefine_prefix_command, 1, 2, 0,
+DEFUN ("define-prefix-command", Fdefine_prefix_command, Sdefine_prefix_command, 1, 3, 0,
"Define COMMAND as a prefix command. COMMAND should be a symbol.\n\
A new sparse keymap is stored as COMMAND's function definition and its value.\n\
If a second optional argument MAPVAR is given, the map is stored as\n\
its value instead of as COMMAND's value; but COMMAND is still defined\n\
-as a function.")
- (command, mapvar)
- Lisp_Object command, mapvar;
+as a function.\n\
+The third optional argument NAME, if given, supplies a menu name\n\
+string for the map. This is required to use the keymap as a menu.")
+ (command, mapvar, name)
+ Lisp_Object command, mapvar, name;
{
Lisp_Object map;
- map = Fmake_sparse_keymap (Qnil);
+ map = Fmake_sparse_keymap (name);
Ffset (command, map);
if (!NILP (mapvar))
Fset (mapvar, map);