comparison src/keymap.c @ 23968:4c423f69142b

(Fdefine_prefix_command): Accept a third argument NAME and pass it to Fmake_sparse_keymap.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 31 Dec 1998 13:16:45 +0000
parents c8cdb4e487cb
children 8159c8cb33cc
comparison
equal deleted inserted replaced
23967:e4039c35f2f8 23968:4c423f69142b
1355 1355
1356 UNGCPRO; 1356 UNGCPRO;
1357 return Flist (j, maps); 1357 return Flist (j, maps);
1358 } 1358 }
1359 1359
1360 DEFUN ("define-prefix-command", Fdefine_prefix_command, Sdefine_prefix_command, 1, 2, 0, 1360 DEFUN ("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\
1362 A new sparse keymap is stored as COMMAND's function definition and its value.\n\ 1362 A new sparse keymap is stored as COMMAND's function definition and its value.\n\
1363 If a second optional argument MAPVAR is given, the map is stored as\n\ 1363 If a second optional argument MAPVAR is given, the map is stored as\n\
1364 its value instead of as COMMAND's value; but COMMAND is still defined\n\ 1364 its value instead of as COMMAND's value; but COMMAND is still defined\n\
1365 as a function.") 1365 as a function.\n\
1366 (command, mapvar) 1366 The third optional argument NAME, if given, supplies a menu name\n\
1367 Lisp_Object command, mapvar; 1367 string 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);
1374 else 1376 else
1375 Fset (command, map); 1377 Fset (command, map);