aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorGerd Moellmann2000-09-29 12:42:01 +0000
committerGerd Moellmann2000-09-29 12:42:01 +0000
commit25126faa090a88cf01bdeee642876ebdf9523408 (patch)
treedcb5e3db4c07963740ec7d66a9504a7901ab9d2a /src/keyboard.c
parenta55b799a749ae03ed5f0fb043d8f4c699852d717 (diff)
downloademacs-25126faa090a88cf01bdeee642876ebdf9523408.tar.gz
emacs-25126faa090a88cf01bdeee642876ebdf9523408.zip
(menu_bar_one_keymap): If KEYMAP is a symbol,
use its function definition. (tool_bar_items): Likewise.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 8199667bf07..501174faaca 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -6139,8 +6139,8 @@ map_prompt (map)
6139 return Qnil; 6139 return Qnil;
6140} 6140}
6141 6141
6142static void menu_bar_item (); 6142static void menu_bar_item P_ ((Lisp_Object, Lisp_Object));
6143static void menu_bar_one_keymap (); 6143static void menu_bar_one_keymap P_ ((Lisp_Object));
6144 6144
6145/* These variables hold the vector under construction within 6145/* These variables hold the vector under construction within
6146 menu_bar_items and its subroutines, and the current index 6146 menu_bar_items and its subroutines, and the current index
@@ -6236,16 +6236,13 @@ menu_bar_items (old)
6236 result = Qnil; 6236 result = Qnil;
6237 6237
6238 for (mapno = nmaps - 1; mapno >= 0; mapno--) 6238 for (mapno = nmaps - 1; mapno >= 0; mapno--)
6239 { 6239 if (!NILP (maps[mapno]))
6240 if (! NILP (maps[mapno])) 6240 {
6241 def = get_keyelt (access_keymap (maps[mapno], Qmenu_bar, 1, 0), 0); 6241 def = get_keyelt (access_keymap (maps[mapno], Qmenu_bar, 1, 0), 0);
6242 else 6242 tem = Fkeymapp (def);
6243 def = Qnil; 6243 if (!NILP (tem))
6244 6244 menu_bar_one_keymap (def);
6245 tem = Fkeymapp (def); 6245 }
6246 if (!NILP (tem))
6247 menu_bar_one_keymap (def);
6248 }
6249 6246
6250 /* Move to the end those items that should be at the end. */ 6247 /* Move to the end those items that should be at the end. */
6251 6248
@@ -6309,6 +6306,11 @@ menu_bar_one_keymap (keymap)
6309{ 6306{
6310 Lisp_Object tail, item; 6307 Lisp_Object tail, item;
6311 6308
6309 /* If KEYMAP is a symbol, its function definition is the keymap
6310 to use. */
6311 if (SYMBOLP (keymap))
6312 keymap = indirect_function (keymap);
6313
6312 menu_bar_one_keymap_changed_items = Qnil; 6314 menu_bar_one_keymap_changed_items = Qnil;
6313 6315
6314 /* Loop over all keymap entries that have menu strings. */ 6316 /* Loop over all keymap entries that have menu strings. */
@@ -6901,6 +6903,11 @@ tool_bar_items (reuse, nitems)
6901 { 6903 {
6902 Lisp_Object tail; 6904 Lisp_Object tail;
6903 6905
6906 /* If KEYMAP is a symbol, its function definition is the
6907 keymap to use. */
6908 if (SYMBOLP (keymap))
6909 keymap = indirect_function (keymap);
6910
6904 /* KEYMAP is a list `(keymap (KEY . BINDING) ...)'. */ 6911 /* KEYMAP is a list `(keymap (KEY . BINDING) ...)'. */
6905 for (tail = keymap; CONSP (tail); tail = XCDR (tail)) 6912 for (tail = keymap; CONSP (tail); tail = XCDR (tail))
6906 { 6913 {