aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii1998-12-31 13:16:45 +0000
committerEli Zaretskii1998-12-31 13:16:45 +0000
commit7f8f0e6709ac15e077b94fa361d914dea14e9a48 (patch)
tree088bd2f26cf0f58a708e498dbe6cf0c96709e81f /src
parent003778571d7a5f7b076742feaa8d01cc631907f4 (diff)
downloademacs-7f8f0e6709ac15e077b94fa361d914dea14e9a48.tar.gz
emacs-7f8f0e6709ac15e077b94fa361d914dea14e9a48.zip
(Fdefine_prefix_command): Accept a third argument NAME
and pass it to Fmake_sparse_keymap.
Diffstat (limited to 'src')
-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.")
1357 return Flist (j, maps); 1357 return Flist (j, maps);
1358} 1358}
1359 1359
1360DEFUN ("define-prefix-command", Fdefine_prefix_command, Sdefine_prefix_command, 1, 2, 0, 1360DEFUN ("define-prefix-command", Fdefine_prefix_command, Sdefine_prefix_command, 1, 3, 0,
1361 "Define COMMAND as a prefix command. COMMAND should be a symbol.\n\ 1361 "Define COMMAND as a prefix command. COMMAND should be a symbol.\n\
1362A new sparse keymap is stored as COMMAND's function definition and its value.\n\ 1362A new sparse keymap is stored as COMMAND's function definition and its value.\n\
1363If a second optional argument MAPVAR is given, the map is stored as\n\ 1363If a second optional argument MAPVAR is given, the map is stored as\n\
1364its value instead of as COMMAND's value; but COMMAND is still defined\n\ 1364its value instead of as COMMAND's value; but COMMAND is still defined\n\
1365as a function.") 1365as a function.\n\
1366 (command, mapvar) 1366The third optional argument NAME, if given, supplies a menu name\n\
1367 Lisp_Object command, mapvar; 1367string for the map. This is required to use the keymap as a menu.")
1368 (command, mapvar, name)
1369 Lisp_Object command, mapvar, name;
1368{ 1370{
1369 Lisp_Object map; 1371 Lisp_Object map;
1370 map = Fmake_sparse_keymap (Qnil); 1372 map = Fmake_sparse_keymap (name);
1371 Ffset (command, map); 1373 Ffset (command, map);
1372 if (!NILP (mapvar)) 1374 if (!NILP (mapvar))
1373 Fset (mapvar, map); 1375 Fset (mapvar, map);