aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorGerd Moellmann1999-09-05 15:49:07 +0000
committerGerd Moellmann1999-09-05 15:49:07 +0000
commit9ea173e83025644384bad4a4ea697bcb6cf7995e (patch)
treef787c96d61d0fecd60d18e050f8649b6fd77a19d /src/keyboard.c
parente037b9ecb3c11b1775171da6e9376a5221fefd78 (diff)
downloademacs-9ea173e83025644384bad4a4ea697bcb6cf7995e.tar.gz
emacs-9ea173e83025644384bad4a4ea697bcb6cf7995e.zip
Change spelling of `toolbar' to `tool_bar' or `tool-bar'.
Likewise for upper-case etc.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c211
1 files changed, 106 insertions, 105 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 93feb45ca88..2dc7af7a8aa 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2101,7 +2101,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
2101 && !NILP (prev_event) 2101 && !NILP (prev_event)
2102 && EVENT_HAS_PARAMETERS (prev_event) 2102 && EVENT_HAS_PARAMETERS (prev_event)
2103 && !EQ (XCONS (prev_event)->car, Qmenu_bar) 2103 && !EQ (XCONS (prev_event)->car, Qmenu_bar)
2104 && !EQ (XCONS (prev_event)->car, Qtoolbar) 2104 && !EQ (XCONS (prev_event)->car, Qtool_bar)
2105 /* Don't bring up a menu if we already have another event. */ 2105 /* Don't bring up a menu if we already have another event. */
2106 && NILP (Vunread_command_events) 2106 && NILP (Vunread_command_events)
2107 && unread_command_char < 0) 2107 && unread_command_char < 0)
@@ -2354,7 +2354,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
2354 posn = POSN_BUFFER_POSN (EVENT_START (c)); 2354 posn = POSN_BUFFER_POSN (EVENT_START (c));
2355 /* Handle menu-bar events: 2355 /* Handle menu-bar events:
2356 insert the dummy prefix event `menu-bar'. */ 2356 insert the dummy prefix event `menu-bar'. */
2357 if (EQ (posn, Qmenu_bar) || EQ (posn, Qtoolbar)) 2357 if (EQ (posn, Qmenu_bar) || EQ (posn, Qtool_bar))
2358 { 2358 {
2359 /* Change menu-bar to (menu-bar) as the event "position". */ 2359 /* Change menu-bar to (menu-bar) as the event "position". */
2360 POSN_BUFFER_POSN (EVENT_START (c)) = Fcons (posn, Qnil); 2360 POSN_BUFFER_POSN (EVENT_START (c)) = Fcons (posn, Qnil);
@@ -3185,9 +3185,9 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
3185 beginning of the menu sequence, and we might as well leave 3185 beginning of the menu sequence, and we might as well leave
3186 that as the `event with parameters' for this selection. */ 3186 that as the `event with parameters' for this selection. */
3187 if ((event->kind == menu_bar_event 3187 if ((event->kind == menu_bar_event
3188 || event->kind == TOOLBAR_EVENT) 3188 || event->kind == TOOL_BAR_EVENT)
3189 && !(CONSP (obj) && EQ (XCONS (obj)->car, Qmenu_bar)) 3189 && !(CONSP (obj) && EQ (XCONS (obj)->car, Qmenu_bar))
3190 && !(CONSP (obj) && EQ (XCONS (obj)->car, Qtoolbar)) 3190 && !(CONSP (obj) && EQ (XCONS (obj)->car, Qtool_bar))
3191 && used_mouse_menu) 3191 && used_mouse_menu)
3192 *used_mouse_menu = 1; 3192 *used_mouse_menu = 1;
3193#endif 3193#endif
@@ -4680,7 +4680,7 @@ make_lispy_event (event)
4680 return XCONS (event->frame_or_window)->cdr; 4680 return XCONS (event->frame_or_window)->cdr;
4681#endif 4681#endif
4682 4682
4683 case TOOLBAR_EVENT: 4683 case TOOL_BAR_EVENT:
4684 { 4684 {
4685 Lisp_Object key; 4685 Lisp_Object key;
4686 if (!CONSP (event->frame_or_window)) 4686 if (!CONSP (event->frame_or_window))
@@ -6378,40 +6378,40 @@ parse_menu_item (item, notreal, inmenubar)
6378 Tool-bars 6378 Tool-bars
6379 ***********************************************************************/ 6379 ***********************************************************************/
6380 6380
6381/* A vector holding toolbar items while they are parsed in function 6381/* A vector holding tool bar items while they are parsed in function
6382 toolbar_items runs Each item occupies TOOLBAR_ITEM_NSCLOTS 6382 tool_bar_items runs Each item occupies TOOL_BAR_ITEM_NSCLOTS elements
6383 elements in the vector. */ 6383 in the vector. */
6384 6384
6385static Lisp_Object toolbar_items_vector; 6385static Lisp_Object tool_bar_items_vector;
6386 6386
6387/* A vector holding the result of parse_toolbar_item. Layout is like 6387/* A vector holding the result of parse_tool_bar_item. Layout is like
6388 the one for a single item in toolbar_items_vector. */ 6388 the one for a single item in tool_bar_items_vector. */
6389 6389
6390static Lisp_Object toolbar_item_properties; 6390static Lisp_Object tool_bar_item_properties;
6391 6391
6392/* Next free index in toolbar_items_vector. */ 6392/* Next free index in tool_bar_items_vector. */
6393 6393
6394static int ntoolbar_items; 6394static int ntool_bar_items;
6395 6395
6396/* The symbols `toolbar', `toolbar-item', and `:image'. */ 6396/* The symbols `tool-bar', and `:image'. */
6397 6397
6398extern Lisp_Object Qtoolbar; 6398extern Lisp_Object Qtool_bar;
6399Lisp_Object QCimage; 6399Lisp_Object QCimage;
6400 6400
6401/* Function prototypes. */ 6401/* Function prototypes. */
6402 6402
6403static void init_toolbar_items P_ ((Lisp_Object)); 6403static void init_tool_bar_items P_ ((Lisp_Object));
6404static void process_toolbar_item P_ ((Lisp_Object, Lisp_Object)); 6404static void process_tool_bar_item P_ ((Lisp_Object, Lisp_Object));
6405static int parse_toolbar_item P_ ((Lisp_Object, Lisp_Object)); 6405static int parse_tool_bar_item P_ ((Lisp_Object, Lisp_Object));
6406static void append_toolbar_item P_ ((void)); 6406static void append_tool_bar_item P_ ((void));
6407 6407
6408 6408
6409/* Return a vector of toolbar items for keymaps currently in effect. 6409/* Return a vector of tool bar items for keymaps currently in effect.
6410 Reuse vector REUSE if non-nil. Return in *NITEMS the number of 6410 Reuse vector REUSE if non-nil. Return in *NITEMS the number of
6411 toolbar items found. */ 6411 tool bar items found. */
6412 6412
6413Lisp_Object 6413Lisp_Object
6414toolbar_items (reuse, nitems) 6414tool_bar_items (reuse, nitems)
6415 Lisp_Object reuse; 6415 Lisp_Object reuse;
6416 int *nitems; 6416 int *nitems;
6417{ 6417{
@@ -6433,8 +6433,8 @@ toolbar_items (reuse, nitems)
6433 oquit = Vinhibit_quit; 6433 oquit = Vinhibit_quit;
6434 Vinhibit_quit = Qt; 6434 Vinhibit_quit = Qt;
6435 6435
6436 /* Initialize toolbar_items_vector and protect it from GC. */ 6436 /* Initialize tool_bar_items_vector and protect it from GC. */
6437 init_toolbar_items (reuse); 6437 init_tool_bar_items (reuse);
6438 6438
6439 /* Build list of keymaps in maps. Set nmaps to the number of maps 6439 /* Build list of keymaps in maps. Set nmaps to the number of maps
6440 to process. */ 6440 to process. */
@@ -6467,13 +6467,13 @@ toolbar_items (reuse, nitems)
6467 maps[nmaps++] = current_global_map; 6467 maps[nmaps++] = current_global_map;
6468 6468
6469 /* Process maps in reverse order and look up in each map the prefix 6469 /* Process maps in reverse order and look up in each map the prefix
6470 key `toolbar'. */ 6470 key `tool-bar'. */
6471 for (i = nmaps - 1; i >= 0; --i) 6471 for (i = nmaps - 1; i >= 0; --i)
6472 if (!NILP (maps[i])) 6472 if (!NILP (maps[i]))
6473 { 6473 {
6474 Lisp_Object keymap; 6474 Lisp_Object keymap;
6475 6475
6476 keymap = get_keyelt (access_keymap (maps[i], Qtoolbar, 1, 1), 0); 6476 keymap = get_keyelt (access_keymap (maps[i], Qtool_bar, 1, 1), 0);
6477 if (!NILP (Fkeymapp (keymap))) 6477 if (!NILP (Fkeymapp (keymap)))
6478 { 6478 {
6479 Lisp_Object tail; 6479 Lisp_Object tail;
@@ -6483,28 +6483,28 @@ toolbar_items (reuse, nitems)
6483 { 6483 {
6484 Lisp_Object keydef = XCAR (tail); 6484 Lisp_Object keydef = XCAR (tail);
6485 if (CONSP (keydef)) 6485 if (CONSP (keydef))
6486 process_toolbar_item (XCAR (keydef), XCDR (keydef)); 6486 process_tool_bar_item (XCAR (keydef), XCDR (keydef));
6487 } 6487 }
6488 } 6488 }
6489 } 6489 }
6490 6490
6491 Vinhibit_quit = oquit; 6491 Vinhibit_quit = oquit;
6492 *nitems = ntoolbar_items / TOOLBAR_ITEM_NSLOTS; 6492 *nitems = ntool_bar_items / TOOL_BAR_ITEM_NSLOTS;
6493 return toolbar_items_vector; 6493 return tool_bar_items_vector;
6494} 6494}
6495 6495
6496 6496
6497/* Process the definition of KEY which is DEF. */ 6497/* Process the definition of KEY which is DEF. */
6498 6498
6499static void 6499static void
6500process_toolbar_item (key, def) 6500process_tool_bar_item (key, def)
6501 Lisp_Object key, def; 6501 Lisp_Object key, def;
6502{ 6502{
6503 int i; 6503 int i;
6504 extern Lisp_Object Qundefined; 6504 extern Lisp_Object Qundefined;
6505 struct gcpro gcpro1, gcpro2; 6505 struct gcpro gcpro1, gcpro2;
6506 6506
6507 /* Protect KEY and DEF from GC because parse_toolbar_item may call 6507 /* Protect KEY and DEF from GC because parse_tool_bar_item may call
6508 eval. */ 6508 eval. */
6509 GCPRO2 (key, def); 6509 GCPRO2 (key, def);
6510 6510
@@ -6512,32 +6512,32 @@ process_toolbar_item (key, def)
6512 { 6512 {
6513 /* If a map has an explicit `undefined' as definition, 6513 /* If a map has an explicit `undefined' as definition,
6514 discard any previously made item. */ 6514 discard any previously made item. */
6515 for (i = 0; i < ntoolbar_items; i += TOOLBAR_ITEM_NSLOTS) 6515 for (i = 0; i < ntool_bar_items; i += TOOL_BAR_ITEM_NSLOTS)
6516 { 6516 {
6517 Lisp_Object *v = XVECTOR (toolbar_items_vector)->contents + i; 6517 Lisp_Object *v = XVECTOR (tool_bar_items_vector)->contents + i;
6518 6518
6519 if (EQ (key, v[TOOLBAR_ITEM_KEY])) 6519 if (EQ (key, v[TOOL_BAR_ITEM_KEY]))
6520 { 6520 {
6521 if (ntoolbar_items > i + TOOLBAR_ITEM_NSLOTS) 6521 if (ntool_bar_items > i + TOOL_BAR_ITEM_NSLOTS)
6522 bcopy (v + TOOLBAR_ITEM_NSLOTS, v, 6522 bcopy (v + TOOL_BAR_ITEM_NSLOTS, v,
6523 ((ntoolbar_items - i - TOOLBAR_ITEM_NSLOTS) 6523 ((ntool_bar_items - i - TOOL_BAR_ITEM_NSLOTS)
6524 * sizeof (Lisp_Object))); 6524 * sizeof (Lisp_Object)));
6525 ntoolbar_items -= TOOLBAR_ITEM_NSLOTS; 6525 ntool_bar_items -= TOOL_BAR_ITEM_NSLOTS;
6526 break; 6526 break;
6527 } 6527 }
6528 } 6528 }
6529 } 6529 }
6530 else if (parse_toolbar_item (key, def)) 6530 else if (parse_tool_bar_item (key, def))
6531 /* Append a new toolbar item to toolbar_items_vector. Accept 6531 /* Append a new tool bar item to tool_bar_items_vector. Accept
6532 more than one definition for the same key. */ 6532 more than one definition for the same key. */
6533 append_toolbar_item (); 6533 append_tool_bar_item ();
6534 6534
6535 UNGCPRO; 6535 UNGCPRO;
6536} 6536}
6537 6537
6538 6538
6539/* Parse a toolbar item specification ITEM for key KEY and return the 6539/* Parse a tool bar item specification ITEM for key KEY and return the
6540 result in toolbar_item_properties. Value is zero if ITEM is 6540 result in tool_bar_item_properties. Value is zero if ITEM is
6541 invalid. 6541 invalid.
6542 6542
6543 ITEM is a list `(menu-item CAPTION BINDING PROPS...)'. 6543 ITEM is a list `(menu-item CAPTION BINDING PROPS...)'.
@@ -6545,19 +6545,19 @@ process_toolbar_item (key, def)
6545 CAPTION is the caption of the item, If it's not a string, it is 6545 CAPTION is the caption of the item, If it's not a string, it is
6546 evaluated to get a string. 6546 evaluated to get a string.
6547 6547
6548 BINDING is the toolbar item's binding. Toolbar items with keymaps 6548 BINDING is the tool bar item's binding. Tool-bar items with keymaps
6549 as binding are currently ignored. 6549 as binding are currently ignored.
6550 6550
6551 The following properties are recognized: 6551 The following properties are recognized:
6552 6552
6553 - `:enable FORM'. 6553 - `:enable FORM'.
6554 6554
6555 FORM is evaluated and specifies whether the toolbar item is enabled 6555 FORM is evaluated and specifies whether the tool bar item is
6556 or disabled. 6556 enabled or disabled.
6557 6557
6558 - `:visible FORM' 6558 - `:visible FORM'
6559 6559
6560 FORM is evaluated and specifies whether the toolbar item is visible. 6560 FORM is evaluated and specifies whether the tool bar item is visible.
6561 6561
6562 - `:filter FUNCTION' 6562 - `:filter FUNCTION'
6563 6563
@@ -6572,18 +6572,18 @@ process_toolbar_item (key, def)
6572 - `:image IMAGES' 6572 - `:image IMAGES'
6573 6573
6574 IMAGES is either a single image specification or a vector of four 6574 IMAGES is either a single image specification or a vector of four
6575 image specifications. See enum toolbar_item_images. 6575 image specifications. See enum tool_bar_item_images.
6576 6576
6577 - `:help HELP-STRING'. 6577 - `:help HELP-STRING'.
6578 6578
6579 Gives a help string to display for the toolbar item. */ 6579 Gives a help string to display for the tool bar item. */
6580 6580
6581static int 6581static int
6582parse_toolbar_item (key, item) 6582parse_tool_bar_item (key, item)
6583 Lisp_Object key, item; 6583 Lisp_Object key, item;
6584{ 6584{
6585 /* Access slot with index IDX of vector toolbar_item_properties. */ 6585 /* Access slot with index IDX of vector tool_bar_item_properties. */
6586#define PROP(IDX) XVECTOR (toolbar_item_properties)->contents[IDX] 6586#define PROP(IDX) XVECTOR (tool_bar_item_properties)->contents[IDX]
6587 6587
6588 Lisp_Object filter = Qnil; 6588 Lisp_Object filter = Qnil;
6589 Lisp_Object caption; 6589 Lisp_Object caption;
@@ -6592,9 +6592,9 @@ parse_toolbar_item (key, item)
6592 int i; 6592 int i;
6593 struct gcpro gcpro1; 6593 struct gcpro gcpro1;
6594 6594
6595 /* Defininition looks like `(toolbar-item CAPTION BINDING 6595 /* Defininition looks like `(tool-bar-item CAPTION BINDING
6596 PROPS...)'. Rule out items that aren't lists, don't start with 6596 PROPS...)'. Rule out items that aren't lists, don't start with
6597 `toolbar-item' or whose rest following `toolbar-item' is not a 6597 `tool-bar-item' or whose rest following `tool-bar-item' is not a
6598 list. */ 6598 list. */
6599 if (!CONSP (item) 6599 if (!CONSP (item)
6600 || !EQ (XCAR (item), Qmenu_item) 6600 || !EQ (XCAR (item), Qmenu_item)
@@ -6602,20 +6602,20 @@ parse_toolbar_item (key, item)
6602 !CONSP (item))) 6602 !CONSP (item)))
6603 return 0; 6603 return 0;
6604 6604
6605 /* Create toolbar_item_properties vector if necessary. Reset it to 6605 /* Create tool_bar_item_properties vector if necessary. Reset it to
6606 defaults. */ 6606 defaults. */
6607 if (VECTORP (toolbar_item_properties)) 6607 if (VECTORP (tool_bar_item_properties))
6608 { 6608 {
6609 for (i = 0; i < TOOLBAR_ITEM_NSLOTS; ++i) 6609 for (i = 0; i < TOOL_BAR_ITEM_NSLOTS; ++i)
6610 PROP (i) = Qnil; 6610 PROP (i) = Qnil;
6611 } 6611 }
6612 else 6612 else
6613 toolbar_item_properties 6613 tool_bar_item_properties
6614 = Fmake_vector (make_number (TOOLBAR_ITEM_NSLOTS), Qnil); 6614 = Fmake_vector (make_number (TOOL_BAR_ITEM_NSLOTS), Qnil);
6615 6615
6616 /* Set defaults. */ 6616 /* Set defaults. */
6617 PROP (TOOLBAR_ITEM_KEY) = key; 6617 PROP (TOOL_BAR_ITEM_KEY) = key;
6618 PROP (TOOLBAR_ITEM_ENABLED_P) = Qt; 6618 PROP (TOOL_BAR_ITEM_ENABLED_P) = Qt;
6619 6619
6620 /* Get the caption of the item. If the caption is not a string, 6620 /* Get the caption of the item. If the caption is not a string,
6621 evaluate it to get a string. If we don't get a string, skip this 6621 evaluate it to get a string. If we don't get a string, skip this
@@ -6627,7 +6627,7 @@ parse_toolbar_item (key, item)
6627 if (!STRINGP (caption)) 6627 if (!STRINGP (caption))
6628 return 0; 6628 return 0;
6629 } 6629 }
6630 PROP (TOOLBAR_ITEM_CAPTION) = caption; 6630 PROP (TOOL_BAR_ITEM_CAPTION) = caption;
6631 6631
6632 /* Give up if rest following the caption is not a list. */ 6632 /* Give up if rest following the caption is not a list. */
6633 item = XCDR (item); 6633 item = XCDR (item);
@@ -6635,7 +6635,7 @@ parse_toolbar_item (key, item)
6635 return 0; 6635 return 0;
6636 6636
6637 /* Store the binding. */ 6637 /* Store the binding. */
6638 PROP (TOOLBAR_ITEM_BINDING) = XCAR (item); 6638 PROP (TOOL_BAR_ITEM_BINDING) = XCAR (item);
6639 item = XCDR (item); 6639 item = XCDR (item);
6640 6640
6641 /* Process the rest of the properties. */ 6641 /* Process the rest of the properties. */
@@ -6648,7 +6648,7 @@ parse_toolbar_item (key, item)
6648 6648
6649 if (EQ (key, QCenable)) 6649 if (EQ (key, QCenable))
6650 /* `:enable FORM'. */ 6650 /* `:enable FORM'. */
6651 PROP (TOOLBAR_ITEM_ENABLED_P) = value; 6651 PROP (TOOL_BAR_ITEM_ENABLED_P) = value;
6652 else if (EQ (key, QCvisible)) 6652 else if (EQ (key, QCvisible))
6653 { 6653 {
6654 /* `:visible FORM'. If got a visible property and that 6654 /* `:visible FORM'. If got a visible property and that
@@ -6658,7 +6658,7 @@ parse_toolbar_item (key, item)
6658 } 6658 }
6659 else if (EQ (key, QChelp)) 6659 else if (EQ (key, QChelp))
6660 /* `:help HELP-STRING'. */ 6660 /* `:help HELP-STRING'. */
6661 PROP (TOOLBAR_ITEM_HELP) = value; 6661 PROP (TOOL_BAR_ITEM_HELP) = value;
6662 else if (EQ (key, QCfilter)) 6662 else if (EQ (key, QCfilter))
6663 /* ':filter FORM'. */ 6663 /* ':filter FORM'. */
6664 filter = value; 6664 filter = value;
@@ -6671,8 +6671,8 @@ parse_toolbar_item (key, item)
6671 selected = XCDR (value); 6671 selected = XCDR (value);
6672 if (EQ (type, QCtoggle) || EQ (type, QCradio)) 6672 if (EQ (type, QCtoggle) || EQ (type, QCradio))
6673 { 6673 {
6674 PROP (TOOLBAR_ITEM_SELECTED_P) = selected; 6674 PROP (TOOL_BAR_ITEM_SELECTED_P) = selected;
6675 PROP (TOOLBAR_ITEM_TYPE) = type; 6675 PROP (TOOL_BAR_ITEM_TYPE) = type;
6676 } 6676 }
6677 } 6677 }
6678 else if (EQ (key, QCimage) 6678 else if (EQ (key, QCimage)
@@ -6680,29 +6680,29 @@ parse_toolbar_item (key, item)
6680 || (VECTORP (value) && XVECTOR (value)->size == 4))) 6680 || (VECTORP (value) && XVECTOR (value)->size == 4)))
6681 /* Value is either a single image specification or a vector 6681 /* Value is either a single image specification or a vector
6682 of 4 such specifications for the different buttion states. */ 6682 of 4 such specifications for the different buttion states. */
6683 PROP (TOOLBAR_ITEM_IMAGES) = value; 6683 PROP (TOOL_BAR_ITEM_IMAGES) = value;
6684 } 6684 }
6685 6685
6686 /* If got a filter apply it on binding. */ 6686 /* If got a filter apply it on binding. */
6687 if (!NILP (filter)) 6687 if (!NILP (filter))
6688 PROP (TOOLBAR_ITEM_BINDING) 6688 PROP (TOOL_BAR_ITEM_BINDING)
6689 = menu_item_eval_property (list2 (filter, 6689 = menu_item_eval_property (list2 (filter,
6690 list2 (Qquote, 6690 list2 (Qquote,
6691 PROP (TOOLBAR_ITEM_BINDING)))); 6691 PROP (TOOL_BAR_ITEM_BINDING))));
6692 6692
6693 /* See if the binding is a keymap. Give up if it is. */ 6693 /* See if the binding is a keymap. Give up if it is. */
6694 if (!NILP (get_keymap_1 (PROP (TOOLBAR_ITEM_BINDING), 0, 1))) 6694 if (!NILP (get_keymap_1 (PROP (TOOL_BAR_ITEM_BINDING), 0, 1)))
6695 return 0; 6695 return 0;
6696 6696
6697 /* Enable or disable selection of item. */ 6697 /* Enable or disable selection of item. */
6698 if (!EQ (PROP (TOOLBAR_ITEM_ENABLED_P), Qt)) 6698 if (!EQ (PROP (TOOL_BAR_ITEM_ENABLED_P), Qt))
6699 PROP (TOOLBAR_ITEM_ENABLED_P) 6699 PROP (TOOL_BAR_ITEM_ENABLED_P)
6700 = menu_item_eval_property (PROP (TOOLBAR_ITEM_ENABLED_P)); 6700 = menu_item_eval_property (PROP (TOOL_BAR_ITEM_ENABLED_P));
6701 6701
6702 /* Handle radio buttons or toggle boxes. */ 6702 /* Handle radio buttons or toggle boxes. */
6703 if (!NILP (PROP (TOOLBAR_ITEM_SELECTED_P))) 6703 if (!NILP (PROP (TOOL_BAR_ITEM_SELECTED_P)))
6704 PROP (TOOLBAR_ITEM_SELECTED_P) 6704 PROP (TOOL_BAR_ITEM_SELECTED_P)
6705 = menu_item_eval_property (PROP (TOOLBAR_ITEM_SELECTED_P)); 6705 = menu_item_eval_property (PROP (TOOL_BAR_ITEM_SELECTED_P));
6706 6706
6707 return 1; 6707 return 1;
6708 6708
@@ -6710,48 +6710,49 @@ parse_toolbar_item (key, item)
6710} 6710}
6711 6711
6712 6712
6713/* Initialize Vtoolbar_items. REUSE, if non-nil, is a vector that can 6713/* Initialize tool_bar_items_vector. REUSE, if non-nil, is a vector
6714 be reused. */ 6714 that can be reused. */
6715 6715
6716static void 6716static void
6717init_toolbar_items (reuse) 6717init_tool_bar_items (reuse)
6718 Lisp_Object reuse; 6718 Lisp_Object reuse;
6719{ 6719{
6720 if (VECTORP (reuse)) 6720 if (VECTORP (reuse))
6721 toolbar_items_vector = reuse; 6721 tool_bar_items_vector = reuse;
6722 else 6722 else
6723 toolbar_items_vector = Fmake_vector (make_number (64), Qnil); 6723 tool_bar_items_vector = Fmake_vector (make_number (64), Qnil);
6724 ntoolbar_items = 0; 6724 ntool_bar_items = 0;
6725} 6725}
6726 6726
6727 6727
6728/* Append parsed toolbar item properties from toolbar_item_properties */ 6728/* Append parsed tool bar item properties from
6729 tool_bar_item_properties */
6729 6730
6730static void 6731static void
6731append_toolbar_item () 6732append_tool_bar_item ()
6732{ 6733{
6733 Lisp_Object *to, *from; 6734 Lisp_Object *to, *from;
6734 6735
6735 /* Enlarge toolbar_items_vector if necessary. */ 6736 /* Enlarge tool_bar_items_vector if necessary. */
6736 if (ntoolbar_items + TOOLBAR_ITEM_NSLOTS 6737 if (ntool_bar_items + TOOL_BAR_ITEM_NSLOTS
6737 >= XVECTOR (toolbar_items_vector)->size) 6738 >= XVECTOR (tool_bar_items_vector)->size)
6738 { 6739 {
6739 Lisp_Object new_vector; 6740 Lisp_Object new_vector;
6740 int old_size = XVECTOR (toolbar_items_vector)->size; 6741 int old_size = XVECTOR (tool_bar_items_vector)->size;
6741 6742
6742 new_vector = Fmake_vector (make_number (2 * old_size), Qnil); 6743 new_vector = Fmake_vector (make_number (2 * old_size), Qnil);
6743 bcopy (XVECTOR (toolbar_items_vector)->contents, 6744 bcopy (XVECTOR (tool_bar_items_vector)->contents,
6744 XVECTOR (new_vector)->contents, 6745 XVECTOR (new_vector)->contents,
6745 old_size * sizeof (Lisp_Object)); 6746 old_size * sizeof (Lisp_Object));
6746 toolbar_items_vector = new_vector; 6747 tool_bar_items_vector = new_vector;
6747 } 6748 }
6748 6749
6749 /* Append entries from toolbar_item_properties to the end of 6750 /* Append entries from tool_bar_item_properties to the end of
6750 toolbar_items_vector. */ 6751 tool_bar_items_vector. */
6751 to = XVECTOR (toolbar_items_vector)->contents + ntoolbar_items; 6752 to = XVECTOR (tool_bar_items_vector)->contents + ntool_bar_items;
6752 from = XVECTOR (toolbar_item_properties)->contents; 6753 from = XVECTOR (tool_bar_item_properties)->contents;
6753 bcopy (from, to, TOOLBAR_ITEM_NSLOTS * sizeof *to); 6754 bcopy (from, to, TOOL_BAR_ITEM_NSLOTS * sizeof *to);
6754 ntoolbar_items += TOOLBAR_ITEM_NSLOTS; 6755 ntool_bar_items += TOOL_BAR_ITEM_NSLOTS;
6755} 6756}
6756 6757
6757 6758
@@ -6821,7 +6822,7 @@ read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu)
6821 use a real menu for mouse selection. */ 6822 use a real menu for mouse selection. */
6822 if (EVENT_HAS_PARAMETERS (prev_event) 6823 if (EVENT_HAS_PARAMETERS (prev_event)
6823 && !EQ (XCONS (prev_event)->car, Qmenu_bar) 6824 && !EQ (XCONS (prev_event)->car, Qmenu_bar)
6824 && !EQ (XCONS (prev_event)->car, Qtoolbar)) 6825 && !EQ (XCONS (prev_event)->car, Qtool_bar))
6825 { 6826 {
6826 /* Display the menu and get the selection. */ 6827 /* Display the menu and get the selection. */
6827 Lisp_Object *realmaps 6828 Lisp_Object *realmaps
@@ -7786,7 +7787,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
7786 posn = POSN_BUFFER_POSN (EVENT_START (key)); 7787 posn = POSN_BUFFER_POSN (EVENT_START (key));
7787 /* Handle menu-bar events: 7788 /* Handle menu-bar events:
7788 insert the dummy prefix event `menu-bar'. */ 7789 insert the dummy prefix event `menu-bar'. */
7789 if (EQ (posn, Qmenu_bar) || EQ (posn, Qtoolbar)) 7790 if (EQ (posn, Qmenu_bar) || EQ (posn, Qtool_bar))
7790 { 7791 {
7791 if (t + 1 >= bufsize) 7792 if (t + 1 >= bufsize)
7792 error ("Key sequence too long"); 7793 error ("Key sequence too long");
@@ -9520,7 +9521,7 @@ struct event_head head_table[] = {
9520void 9521void
9521syms_of_keyboard () 9522syms_of_keyboard ()
9522{ 9523{
9523 /* Toolbars. */ 9524 /* Tool-bars. */
9524 QCimage = intern (":image"); 9525 QCimage = intern (":image");
9525 staticpro (&QCimage); 9526 staticpro (&QCimage);
9526 9527
@@ -9530,10 +9531,10 @@ syms_of_keyboard ()
9530 staticpro (&item_properties); 9531 staticpro (&item_properties);
9531 item_properties = Qnil; 9532 item_properties = Qnil;
9532 9533
9533 staticpro (&toolbar_item_properties); 9534 staticpro (&tool_bar_item_properties);
9534 toolbar_item_properties = Qnil; 9535 tool_bar_item_properties = Qnil;
9535 staticpro (&toolbar_items_vector); 9536 staticpro (&tool_bar_items_vector);
9536 toolbar_items_vector = Qnil; 9537 tool_bar_items_vector = Qnil;
9537 9538
9538 staticpro (&real_this_command); 9539 staticpro (&real_this_command);
9539 real_this_command = Qnil; 9540 real_this_command = Qnil;