Commit 9ea173e8 authored by Gerd Moellmann's avatar Gerd Moellmann

Change spelling of `toolbar' to `tool_bar' or `tool-bar'.

Likewise for upper-case etc.
parent e037b9ec
......@@ -2247,14 +2247,14 @@ mark_object (argptr)
mark_object (&ptr->buffer_predicate);
mark_object (&ptr->buffer_list);
mark_object (&ptr->menu_bar_window);
mark_object (&ptr->toolbar_window);
mark_object (&ptr->tool_bar_window);
mark_face_cache (ptr->face_cache);
#ifdef HAVE_WINDOW_SYSTEM
mark_image_cache (ptr);
mark_object (&ptr->desired_toolbar_items);
mark_object (&ptr->current_toolbar_items);
mark_object (&ptr->desired_toolbar_string);
mark_object (&ptr->current_toolbar_string);
mark_object (&ptr->desired_tool_bar_items);
mark_object (&ptr->current_tool_bar_items);
mark_object (&ptr->desired_tool_bar_string);
mark_object (&ptr->current_tool_bar_string);
#endif /* HAVE_WINDOW_SYSTEM */
}
else if (GC_BOOL_VECTOR_P (obj))
......
......@@ -1264,7 +1264,7 @@ enum face_id
{
DEFAULT_FACE_ID,
MODE_LINE_FACE_ID,
TOOLBAR_FACE_ID,
TOOL_BAR_FACE_ID,
BITMAP_AREA_FACE_ID,
TOP_LINE_FACE_ID,
BASIC_FACE_ID_SENTINEL
......@@ -1581,7 +1581,7 @@ struct it
unsigned overlay_strings_at_end_processed_p : 1;
/* The ID of the default face to use. One of DEFAULT_FACE_ID,
MODE_LINE_FACE_ID, or TOOLBAR_FACE_ID, depending on what we
MODE_LINE_FACE_ID, or TOOL_BAR_FACE_ID, depending on what we
are displaying. */
int base_face_id;
......@@ -1961,69 +1961,69 @@ struct image_cache
/***********************************************************************
Toolbars
Tool-bars
***********************************************************************/
/* Enumeration defining where to find toolbar item information in
toolbar items vectors stored with frames. Each toolbar item
occupies TOOLBAR_ITEM_NSLOTS elements in such a vector. */
/* Enumeration defining where to find tool-bar item information in
tool-bar items vectors stored with frames. Each tool-bar item
occupies TOOL_BAR_ITEM_NSLOTS elements in such a vector. */
enum toolbar_item_idx
enum tool_bar_item_idx
{
/* The key of the toolbar item. Used to remove items when a binding
/* The key of the tool-bar item. Used to remove items when a binding
for `undefined' is found. */
TOOLBAR_ITEM_KEY,
TOOL_BAR_ITEM_KEY,
/* Non-nil if item is enabled. */
TOOLBAR_ITEM_ENABLED_P,
TOOL_BAR_ITEM_ENABLED_P,
/* Non-nil if item is selected (pressed). */
TOOLBAR_ITEM_SELECTED_P,
TOOL_BAR_ITEM_SELECTED_P,
/* Caption. */
TOOLBAR_ITEM_CAPTION,
TOOL_BAR_ITEM_CAPTION,
/* Image(s) to display. This is either a single image specification
or a vector of specifications. */
TOOLBAR_ITEM_IMAGES,
TOOL_BAR_ITEM_IMAGES,
/* The binding. */
TOOLBAR_ITEM_BINDING,
TOOL_BAR_ITEM_BINDING,
/* Button type. One of nil, `:radio' or `:toggle'. */
TOOLBAR_ITEM_TYPE,
TOOL_BAR_ITEM_TYPE,
/* Help string. */
TOOLBAR_ITEM_HELP,
TOOL_BAR_ITEM_HELP,
/* Sentinel = number of slots in toolbar_items occupied by one
toolbar item. */
TOOLBAR_ITEM_NSLOTS
/* Sentinel = number of slots in tool_bar_items occupied by one
tool-bar item. */
TOOL_BAR_ITEM_NSLOTS
};
/* An enumeration for the different images that can be specified
for a toolbar item. */
for a tool-bar item. */
enum toolbar_item_image
enum tool_bar_item_image
{
TOOLBAR_IMAGE_ENABLED_SELECTED,
TOOLBAR_IMAGE_ENABLED_DESELECTED,
TOOLBAR_IMAGE_DISABLED_SELECTED,
TOOLBAR_IMAGE_DISABLED_DESELECTED
TOOL_BAR_IMAGE_ENABLED_SELECTED,
TOOL_BAR_IMAGE_ENABLED_DESELECTED,
TOOL_BAR_IMAGE_DISABLED_SELECTED,
TOOL_BAR_IMAGE_DISABLED_DESELECTED
};
/* Non-zero means raise toolbar buttons when the mouse moves over them. */
/* Non-zero means raise tool-bar buttons when the mouse moves over them. */
extern int auto_raise_toolbar_buttons_p;
extern int auto_raise_tool_bar_buttons_p;
/* Margin around toolbar buttons in pixels. */
/* Margin around tool-bar buttons in pixels. */
extern int toolbar_button_margin;
extern int tool_bar_button_margin;
/* Thickness of relief to draw around toolbar buttons. */
/* Thickness of relief to draw around tool-bar buttons. */
extern int toolbar_button_relief;
extern int tool_bar_button_relief;
......@@ -2060,8 +2060,8 @@ void move_it_vertically P_ ((struct it *, int));
void move_it_by_lines P_ ((struct it *, int, int));
int frame_mode_line_height P_ ((struct frame *));
void highlight_trailing_whitespace P_ ((struct frame *, struct glyph_row *));
int toolbar_item_info P_ ((struct frame *, struct glyph *, int *));
extern Lisp_Object Qtoolbar;
int tool_bar_item_info P_ ((struct frame *, struct glyph *, int *));
extern Lisp_Object Qtool_bar;
extern Lisp_Object Vshow_trailing_whitespace;
extern int redisplaying_p;
......
......@@ -885,9 +885,9 @@ clear_current_matrices (f)
if (WINDOWP (f->menu_bar_window))
clear_glyph_matrix (XWINDOW (f->menu_bar_window)->current_matrix);
/* Clear the matrix of the toolbar window, if any. */
if (WINDOWP (f->toolbar_window))
clear_glyph_matrix (XWINDOW (f->toolbar_window)->current_matrix);
/* Clear the matrix of the tool-bar window, if any. */
if (WINDOWP (f->tool_bar_window))
clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix);
/* Clear current window matrices. */
xassert (WINDOWP (FRAME_ROOT_WINDOW (f)));
......@@ -907,8 +907,8 @@ clear_desired_matrices (f)
if (WINDOWP (f->menu_bar_window))
clear_glyph_matrix (XWINDOW (f->menu_bar_window)->desired_matrix);
if (WINDOWP (f->toolbar_window))
clear_glyph_matrix (XWINDOW (f->toolbar_window)->desired_matrix);
if (WINDOWP (f->tool_bar_window))
clear_glyph_matrix (XWINDOW (f->tool_bar_window)->desired_matrix);
/* Do it for window matrices. */
xassert (WINDOWP (FRAME_ROOT_WINDOW (f)));
......@@ -2076,21 +2076,21 @@ adjust_frame_glyphs_for_window_redisplay (f)
}
#endif /* not USE_X_TOOLKIT */
/* Allocate/ reallocate matrices of the toolbar window. If we don't
have a toolbar window yet, make one. */
if (NILP (f->toolbar_window))
/* Allocate/ reallocate matrices of the tool bar window. If we
don't have a tool bar window yet, make one. */
if (NILP (f->tool_bar_window))
{
f->toolbar_window = make_window ();
w = XWINDOW (f->toolbar_window);
f->tool_bar_window = make_window ();
w = XWINDOW (f->tool_bar_window);
XSETFRAME (w->frame, f);
w->pseudo_window_p = 1;
}
else
w = XWINDOW (f->toolbar_window);
w = XWINDOW (f->tool_bar_window);
XSETFASTINT (w->top, FRAME_MENU_BAR_LINES (f));
XSETFASTINT (w->left, 0);
XSETFASTINT (w->height, FRAME_TOOLBAR_LINES (f));
XSETFASTINT (w->height, FRAME_TOOL_BAR_LINES (f));
XSETFASTINT (w->width, FRAME_WINDOW_WIDTH (f));
allocate_matrices_for_window_redisplay (w, ch_dim);
}
......@@ -2167,14 +2167,14 @@ free_glyphs (f)
f->menu_bar_window = Qnil;
}
/* Free the toolbar window and its glyph matrices. */
if (!NILP (f->toolbar_window))
/* Free the tool bar window and its glyph matrices. */
if (!NILP (f->tool_bar_window))
{
struct window *w = XWINDOW (f->toolbar_window);
struct window *w = XWINDOW (f->tool_bar_window);
free_glyph_matrix (w->desired_matrix);
free_glyph_matrix (w->current_matrix);
w->desired_matrix = w->current_matrix = NULL;
f->toolbar_window = Qnil;
f->tool_bar_window = Qnil;
}
/* Release frame glyph matrices. Reset fields to zero in
......@@ -3352,10 +3352,10 @@ update_frame (f, force_p, inhibit_hairy_id_p)
update_window (XWINDOW (f->menu_bar_window), 1);
/* Update the tool-bar window, if present. */
if (WINDOWP (f->toolbar_window))
if (WINDOWP (f->tool_bar_window))
{
Lisp_Object tem;
struct window *w = XWINDOW (f->toolbar_window);
struct window *w = XWINDOW (f->tool_bar_window);
/* Update tool-bar window. */
if (w->must_be_updated_p)
......@@ -3365,16 +3365,16 @@ update_frame (f, force_p, inhibit_hairy_id_p)
/* Swap tool-bar strings. We swap because we want to
reuse strings. */
tem = f->current_toolbar_string;
f->current_toolbar_string = f->desired_toolbar_string;
f->desired_toolbar_string = tem;
f->n_current_toolbar_items = f->n_desired_toolbar_items;
tem = f->current_tool_bar_string;
f->current_tool_bar_string = f->desired_tool_bar_string;
f->desired_tool_bar_string = tem;
f->n_current_tool_bar_items = f->n_desired_tool_bar_items;
/* Swap tool-bar items. We swap because we want to
reuse vectors. */
tem = f->current_toolbar_items;
f->current_toolbar_items = f->desired_toolbar_items;
f->desired_toolbar_items = tem;
tem = f->current_tool_bar_items;
f->current_tool_bar_items = f->desired_tool_bar_items;
f->desired_tool_bar_items = tem;
}
}
......@@ -5336,8 +5336,8 @@ change_frame_size_1 (f, newheight, newwidth, pretend, delay, safe)
if (FRAME_TERMCAP_P (f) && !pretend)
FrameCols = newwidth;
if (WINDOWP (f->toolbar_window))
XSETFASTINT (XWINDOW (f->toolbar_window)->width, newwidth);
if (WINDOWP (f->tool_bar_window))
XSETFASTINT (XWINDOW (f->tool_bar_window)->width, newwidth);
}
FRAME_HEIGHT (f) = newheight;
......
......@@ -90,7 +90,7 @@ Lisp_Object Qname;
Lisp_Object Qonly;
Lisp_Object Qunsplittable;
Lisp_Object Qmenu_bar_lines;
Lisp_Object Qtoolbar_lines;
Lisp_Object Qtool_bar_lines;
Lisp_Object Qwidth;
Lisp_Object Qx;
Lisp_Object Qw32;
......@@ -128,8 +128,8 @@ syms_of_frame_1 ()
staticpro (&Qunsplittable);
Qmenu_bar_lines = intern ("menu-bar-lines");
staticpro (&Qmenu_bar_lines);
Qtoolbar_lines = intern ("toolbar-lines");
staticpro (&Qtoolbar_lines);
Qtool_bar_lines = intern ("tool-bar-lines");
staticpro (&Qtool_bar_lines);
Qwidth = intern ("width");
staticpro (&Qwidth);
Qx = intern ("x");
......@@ -329,10 +329,10 @@ make_frame (mini_p)
f->namebuf = 0;
f->title = Qnil;
f->menu_bar_window = Qnil;
f->toolbar_window = Qnil;
f->desired_toolbar_items = f->current_toolbar_items = Qnil;
f->desired_toolbar_string = f->current_toolbar_string = Qnil;
f->n_desired_toolbar_items = f->n_current_toolbar_items = 0;
f->tool_bar_window = Qnil;
f->desired_tool_bar_items = f->current_tool_bar_items = Qnil;
f->desired_tool_bar_string = f->current_tool_bar_string = Qnil;
f->n_desired_tool_bar_items = f->n_current_tool_bar_items = 0;
root_window = make_window ();
if (mini_p)
......
......@@ -148,14 +148,14 @@ struct frame
toolkit support is available. */
Lisp_Object menu_bar_window;
/* A window used to display the toolbar of a frame. */
Lisp_Object toolbar_window;
/* A window used to display the tool-bar of a frame. */
Lisp_Object tool_bar_window;
/* Desired and current toolbar items. */
Lisp_Object desired_toolbar_items, current_toolbar_items;
/* Desired and current tool-bar items. */
Lisp_Object desired_tool_bar_items, current_tool_bar_items;
/* Desired and current contents displayed in toolbar_window. */
Lisp_Object desired_toolbar_string, current_toolbar_string;
/* Desired and current contents displayed in tool_bar_window. */
Lisp_Object desired_tool_bar_string, current_tool_bar_string;
/* beyond here, there should be no more Lisp_Object components. */
......@@ -176,11 +176,11 @@ struct frame
be used for output. */
unsigned glyphs_initialized_p : 1;
/* Margin at the top of the frame. Used to display the toolbar. */
int toolbar_lines;
/* Margin at the top of the frame. Used to display the tool-bar. */
int tool_bar_lines;
int n_desired_toolbar_items;
int n_current_toolbar_items;
int n_desired_tool_bar_items;
int n_current_tool_bar_items;
/* A buffer for decode_mode_line. */
char *decode_mode_spec_buffer;
......@@ -412,14 +412,14 @@ typedef struct frame *FRAME_PTR;
These lines are counted in FRAME_HEIGHT. */
#define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines
/* Number of lines of frame F used for the toolbar. */
/* Number of lines of frame F used for the tool-bar. */
#define FRAME_TOOLBAR_LINES(f) (f)->toolbar_lines
#define FRAME_TOOL_BAR_LINES(f) (f)->tool_bar_lines
/* Lines above the top-most window in frame F. */
#define FRAME_TOP_MARGIN(F) \
(FRAME_MENU_BAR_LINES (F) + FRAME_TOOLBAR_LINES (F))
(FRAME_MENU_BAR_LINES (F) + FRAME_TOOL_BAR_LINES (F))
/* Nonzero if this frame should display a menu bar
in a way that does not use any text lines. */
......
......@@ -2101,7 +2101,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
&& !NILP (prev_event)
&& EVENT_HAS_PARAMETERS (prev_event)
&& !EQ (XCONS (prev_event)->car, Qmenu_bar)
&& !EQ (XCONS (prev_event)->car, Qtoolbar)
&& !EQ (XCONS (prev_event)->car, Qtool_bar)
/* Don't bring up a menu if we already have another event. */
&& NILP (Vunread_command_events)
&& unread_command_char < 0)
......@@ -2354,7 +2354,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
posn = POSN_BUFFER_POSN (EVENT_START (c));
/* Handle menu-bar events:
insert the dummy prefix event `menu-bar'. */
if (EQ (posn, Qmenu_bar) || EQ (posn, Qtoolbar))
if (EQ (posn, Qmenu_bar) || EQ (posn, Qtool_bar))
{
/* Change menu-bar to (menu-bar) as the event "position". */
POSN_BUFFER_POSN (EVENT_START (c)) = Fcons (posn, Qnil);
......@@ -3185,9 +3185,9 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
beginning of the menu sequence, and we might as well leave
that as the `event with parameters' for this selection. */
if ((event->kind == menu_bar_event
|| event->kind == TOOLBAR_EVENT)
|| event->kind == TOOL_BAR_EVENT)
&& !(CONSP (obj) && EQ (XCONS (obj)->car, Qmenu_bar))
&& !(CONSP (obj) && EQ (XCONS (obj)->car, Qtoolbar))
&& !(CONSP (obj) && EQ (XCONS (obj)->car, Qtool_bar))
&& used_mouse_menu)
*used_mouse_menu = 1;
#endif
......@@ -4680,7 +4680,7 @@ make_lispy_event (event)
return XCONS (event->frame_or_window)->cdr;
#endif
case TOOLBAR_EVENT:
case TOOL_BAR_EVENT:
{
Lisp_Object key;
if (!CONSP (event->frame_or_window))
......@@ -6378,40 +6378,40 @@ parse_menu_item (item, notreal, inmenubar)
Tool-bars
***********************************************************************/
/* A vector holding toolbar items while they are parsed in function
toolbar_items runs Each item occupies TOOLBAR_ITEM_NSCLOTS
elements in the vector. */
/* A vector holding tool bar items while they are parsed in function
tool_bar_items runs Each item occupies TOOL_BAR_ITEM_NSCLOTS elements
in the vector. */
static Lisp_Object toolbar_items_vector;
static Lisp_Object tool_bar_items_vector;
/* A vector holding the result of parse_toolbar_item. Layout is like
the one for a single item in toolbar_items_vector. */
/* A vector holding the result of parse_tool_bar_item. Layout is like
the one for a single item in tool_bar_items_vector. */
static Lisp_Object toolbar_item_properties;
static Lisp_Object tool_bar_item_properties;
/* Next free index in toolbar_items_vector. */
/* Next free index in tool_bar_items_vector. */
static int ntoolbar_items;
static int ntool_bar_items;
/* The symbols `toolbar', `toolbar-item', and `:image'. */
/* The symbols `tool-bar', and `:image'. */
extern Lisp_Object Qtoolbar;
extern Lisp_Object Qtool_bar;
Lisp_Object QCimage;
/* Function prototypes. */
static void init_toolbar_items P_ ((Lisp_Object));
static void process_toolbar_item P_ ((Lisp_Object, Lisp_Object));
static int parse_toolbar_item P_ ((Lisp_Object, Lisp_Object));
static void append_toolbar_item P_ ((void));
static void init_tool_bar_items P_ ((Lisp_Object));
static void process_tool_bar_item P_ ((Lisp_Object, Lisp_Object));
static int parse_tool_bar_item P_ ((Lisp_Object, Lisp_Object));
static void append_tool_bar_item P_ ((void));
/* Return a vector of toolbar items for keymaps currently in effect.
/* Return a vector of tool bar items for keymaps currently in effect.
Reuse vector REUSE if non-nil. Return in *NITEMS the number of
toolbar items found. */
tool bar items found. */
Lisp_Object
toolbar_items (reuse, nitems)
tool_bar_items (reuse, nitems)
Lisp_Object reuse;
int *nitems;
{
......@@ -6433,8 +6433,8 @@ toolbar_items (reuse, nitems)
oquit = Vinhibit_quit;
Vinhibit_quit = Qt;
/* Initialize toolbar_items_vector and protect it from GC. */
init_toolbar_items (reuse);
/* Initialize tool_bar_items_vector and protect it from GC. */
init_tool_bar_items (reuse);
/* Build list of keymaps in maps. Set nmaps to the number of maps
to process. */
......@@ -6467,13 +6467,13 @@ toolbar_items (reuse, nitems)
maps[nmaps++] = current_global_map;
/* Process maps in reverse order and look up in each map the prefix
key `toolbar'. */
key `tool-bar'. */
for (i = nmaps - 1; i >= 0; --i)
if (!NILP (maps[i]))
{
Lisp_Object keymap;
keymap = get_keyelt (access_keymap (maps[i], Qtoolbar, 1, 1), 0);
keymap = get_keyelt (access_keymap (maps[i], Qtool_bar, 1, 1), 0);
if (!NILP (Fkeymapp (keymap)))
{
Lisp_Object tail;
......@@ -6483,28 +6483,28 @@ toolbar_items (reuse, nitems)
{
Lisp_Object keydef = XCAR (tail);
if (CONSP (keydef))
process_toolbar_item (XCAR (keydef), XCDR (keydef));
process_tool_bar_item (XCAR (keydef), XCDR (keydef));
}
}
}
Vinhibit_quit = oquit;
*nitems = ntoolbar_items / TOOLBAR_ITEM_NSLOTS;
return toolbar_items_vector;
*nitems = ntool_bar_items / TOOL_BAR_ITEM_NSLOTS;
return tool_bar_items_vector;
}
/* Process the definition of KEY which is DEF. */
static void
process_toolbar_item (key, def)
process_tool_bar_item (key, def)
Lisp_Object key, def;
{
int i;
extern Lisp_Object Qundefined;
struct gcpro gcpro1, gcpro2;
/* Protect KEY and DEF from GC because parse_toolbar_item may call
/* Protect KEY and DEF from GC because parse_tool_bar_item may call
eval. */
GCPRO2 (key, def);
......@@ -6512,32 +6512,32 @@ process_toolbar_item (key, def)
{
/* If a map has an explicit `undefined' as definition,
discard any previously made item. */
for (i = 0; i < ntoolbar_items; i += TOOLBAR_ITEM_NSLOTS)
for (i = 0; i < ntool_bar_items; i += TOOL_BAR_ITEM_NSLOTS)
{
Lisp_Object *v = XVECTOR (toolbar_items_vector)->contents + i;
Lisp_Object *v = XVECTOR (tool_bar_items_vector)->contents + i;
if (EQ (key, v[TOOLBAR_ITEM_KEY]))
if (EQ (key, v[TOOL_BAR_ITEM_KEY]))
{
if (ntoolbar_items > i + TOOLBAR_ITEM_NSLOTS)
bcopy (v + TOOLBAR_ITEM_NSLOTS, v,
((ntoolbar_items - i - TOOLBAR_ITEM_NSLOTS)
if (ntool_bar_items > i + TOOL_BAR_ITEM_NSLOTS)
bcopy (v + TOOL_BAR_ITEM_NSLOTS, v,
((ntool_bar_items - i - TOOL_BAR_ITEM_NSLOTS)
* sizeof (Lisp_Object)));
ntoolbar_items -= TOOLBAR_ITEM_NSLOTS;
ntool_bar_items -= TOOL_BAR_ITEM_NSLOTS;
break;
}
}
}
else if (parse_toolbar_item (key, def))
/* Append a new toolbar item to toolbar_items_vector. Accept
else if (parse_tool_bar_item (key, def))
/* Append a new tool bar item to tool_bar_items_vector. Accept
more than one definition for the same key. */
append_toolbar_item ();
append_tool_bar_item ();
UNGCPRO;
}
/* Parse a toolbar item specification ITEM for key KEY and return the
result in toolbar_item_properties. Value is zero if ITEM is
/* Parse a tool bar item specification ITEM for key KEY and return the
result in tool_bar_item_properties. Value is zero if ITEM is
invalid.
ITEM is a list `(menu-item CAPTION BINDING PROPS...)'.
......@@ -6545,19 +6545,19 @@ process_toolbar_item (key, def)
CAPTION is the caption of the item, If it's not a string, it is
evaluated to get a string.
BINDING is the toolbar item's binding. Toolbar items with keymaps
BINDING is the tool bar item's binding. Tool-bar items with keymaps
as binding are currently ignored.
The following properties are recognized:
- `:enable FORM'.
FORM is evaluated and specifies whether the toolbar item is enabled
or disabled.
FORM is evaluated and specifies whether the tool bar item is
enabled or disabled.
- `:visible FORM'
FORM is evaluated and specifies whether the toolbar item is visible.
FORM is evaluated and specifies whether the tool bar item is visible.
- `:filter FUNCTION'
......@@ -6572,18 +6572,18 @@ process_toolbar_item (key, def)
- `:image IMAGES'
IMAGES is either a single image specification or a vector of four
image specifications. See enum toolbar_item_images.
image specifications. See enum tool_bar_item_images.
- `:help HELP-STRING'.
Gives a help string to display for the toolbar item. */
Gives a help string to display for the tool bar item. */
static int
parse_toolbar_item (key, item)
parse_tool_bar_item (key, item)
Lisp_Object key, item;
{
/* Access slot with index IDX of vector toolbar_item_properties. */
#define PROP(IDX) XVECTOR (toolbar_item_properties)->contents[IDX]
/* Access slot with index IDX of vector tool_bar_item_properties. */
#define PROP(IDX) XVECTOR (tool_bar_item_properties)->contents[IDX]
Lisp_Object filter = Qnil;
Lisp_Object caption;
......@@ -6592,9 +6592,9 @@ parse_toolbar_item (key, item)
int i;
struct gcpro gcpro1;
/* Defininition looks like `(toolbar-item CAPTION BINDING
/* Defininition looks like `(tool-bar-item CAPTION BINDING
PROPS...)'. Rule out items that aren't lists, don't start with
`toolbar-item' or whose rest following `toolbar-item' is not a
`tool-bar-item' or whose rest following `tool-bar-item' is not a
list. */
if (!CONSP (item)
|| !EQ (XCAR (item), Qmenu_item)
......@@ -6602,20 +6602,20 @@ parse_toolbar_item (key, item)
!CONSP (item)))
return 0;
/* Create toolbar_item_properties vector if necessary. Reset it to
/* Create tool_bar_item_properties vector if necessary. Reset it to
defaults. */
if (VECTORP (toolbar_item_properties))
if (VECTORP (tool_bar_item_properties))
{
for (i = 0; i < TOOLBAR_ITEM_NSLOTS; ++i)
for (i = 0; i < TOOL_BAR_ITEM_NSLOTS; ++i)
PROP (i) = Qnil;
}
else
toolbar_item_properties
= Fmake_vector (make_number (TOOLBAR_ITEM_NSLOTS), Qnil);
tool_bar_item_properties
= Fmake_vector (make_number (TOOL_BAR_ITEM_NSLOTS), Qnil);
/* Set defaults. */
PROP (TOOLBAR_ITEM_KEY) = key;
PROP (TOOLBAR_ITEM_ENABLED_P) = Qt;
PROP (TOOL_BAR_ITEM_KEY) = key;
PROP (TOOL_BAR_ITEM_ENABLED_P) = Qt;
/* Get the caption of the item. If the caption is not a string,
evaluate it to get a string. If we don't get a string, skip this
......@@ -6627,7 +6627,7 @@ parse_toolbar_item (key, item)
if (!STRINGP (caption))
return 0;
}
PROP (TOOLBAR_ITEM_CAPTION) = caption;
PROP (TOOL_BAR_ITEM_CAPTION) = caption;
/* Give up if rest following the caption is not a list. */
item = XCDR (item);
......@@ -6635,7 +6635,7 @@ parse_toolbar_item (key, item)