Mercurial > emacs
comparison src/keyboard.c @ 69717:8f7fe45e9fe8
(tool_bar_items): Use map_keymap.
(process_tool_bar_item): Add dummy args to fit the required interface.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 29 Mar 2006 08:00:23 +0000 |
parents | 041aa462ad58 |
children | 7f48146dd4d2 |
comparison
equal
deleted
inserted
replaced
69716:73f175471c73 | 69717:8f7fe45e9fe8 |
---|---|
7579 Lisp_Object QCimage; | 7579 Lisp_Object QCimage; |
7580 | 7580 |
7581 /* Function prototypes. */ | 7581 /* Function prototypes. */ |
7582 | 7582 |
7583 static void init_tool_bar_items P_ ((Lisp_Object)); | 7583 static void init_tool_bar_items P_ ((Lisp_Object)); |
7584 static void process_tool_bar_item P_ ((Lisp_Object, Lisp_Object)); | 7584 static void process_tool_bar_item P_ ((Lisp_Object, Lisp_Object, void*, Lisp_Object)); |
7585 static int parse_tool_bar_item P_ ((Lisp_Object, Lisp_Object)); | 7585 static int parse_tool_bar_item P_ ((Lisp_Object, Lisp_Object)); |
7586 static void append_tool_bar_item P_ ((void)); | 7586 static void append_tool_bar_item P_ ((void)); |
7587 | 7587 |
7588 | 7588 |
7589 /* Return a vector of tool bar items for keymaps currently in effect. | 7589 /* Return a vector of tool bar items for keymaps currently in effect. |
7657 { | 7657 { |
7658 Lisp_Object keymap; | 7658 Lisp_Object keymap; |
7659 | 7659 |
7660 keymap = get_keymap (access_keymap (maps[i], Qtool_bar, 1, 0, 1), 0, 1); | 7660 keymap = get_keymap (access_keymap (maps[i], Qtool_bar, 1, 0, 1), 0, 1); |
7661 if (CONSP (keymap)) | 7661 if (CONSP (keymap)) |
7662 { | 7662 map_keymap (keymap, process_tool_bar_item, Qnil, NULL, 1); |
7663 Lisp_Object tail; | |
7664 | |
7665 /* KEYMAP is a list `(keymap (KEY . BINDING) ...)'. */ | |
7666 for (tail = keymap; CONSP (tail); tail = XCDR (tail)) | |
7667 { | |
7668 Lisp_Object keydef = XCAR (tail); | |
7669 if (CONSP (keydef)) | |
7670 process_tool_bar_item (XCAR (keydef), XCDR (keydef)); | |
7671 } | |
7672 } | |
7673 } | 7663 } |
7674 | 7664 |
7675 Vinhibit_quit = oquit; | 7665 Vinhibit_quit = oquit; |
7676 *nitems = ntool_bar_items / TOOL_BAR_ITEM_NSLOTS; | 7666 *nitems = ntool_bar_items / TOOL_BAR_ITEM_NSLOTS; |
7677 return tool_bar_items_vector; | 7667 return tool_bar_items_vector; |
7679 | 7669 |
7680 | 7670 |
7681 /* Process the definition of KEY which is DEF. */ | 7671 /* Process the definition of KEY which is DEF. */ |
7682 | 7672 |
7683 static void | 7673 static void |
7684 process_tool_bar_item (key, def) | 7674 process_tool_bar_item (key, def, args, data) |
7685 Lisp_Object key, def; | 7675 Lisp_Object key, def, data; |
7676 void *args; | |
7686 { | 7677 { |
7687 int i; | 7678 int i; |
7688 extern Lisp_Object Qundefined; | 7679 extern Lisp_Object Qundefined; |
7689 struct gcpro gcpro1, gcpro2; | 7680 struct gcpro gcpro1, gcpro2; |
7690 | 7681 |