2 * ASIZE (this_command_keys),
Qnil);
- AREF (this_command_keys, this_command_key_count) = key;
+ ASET (this_command_keys, this_command_key_count, key);
++this_command_key_count;
}
/* Initialize optional entries. */
for (i = ITEM_PROPERTY_DEF; i < ITEM_PROPERTY_ENABLE; i++)
- AREF (item_properties, i) = Qnil;
- AREF (item_properties, ITEM_PROPERTY_ENABLE) = Qt;
+ ASET (item_properties, i, Qnil);
+ ASET (item_properties, ITEM_PROPERTY_ENABLE, Qt);
/* Save the item here to protect it from GC. */
- AREF (item_properties, ITEM_PROPERTY_ITEM) = item;
+ ASET (item_properties, ITEM_PROPERTY_ITEM, item);
item_string = XCAR (item);
if (STRINGP (item_string))
{
/* Old format menu item. */
- AREF (item_properties, ITEM_PROPERTY_NAME) = item_string;
+ ASET (item_properties, ITEM_PROPERTY_NAME, item_string);
/* Maybe help string. */
if (CONSP (item) && STRINGP (XCAR (item)))
{
- AREF (item_properties, ITEM_PROPERTY_HELP) = XCAR (item);
+ ASET (item_properties, ITEM_PROPERTY_HELP, XCAR (item));
start = item;
item = XCDR (item);
}
}
/* This is the real definition--the function to run. */
- AREF (item_properties, ITEM_PROPERTY_DEF) = item;
+ ASET (item_properties, ITEM_PROPERTY_DEF, item);
/* Get enable property, if any. */
if (SYMBOLP (item))
{
tem = Fget (item, Qmenu_enable);
if (!NILP (Venable_disabled_menus_and_buttons))
- AREF (item_properties, ITEM_PROPERTY_ENABLE) = Qt;
+ ASET (item_properties, ITEM_PROPERTY_ENABLE, Qt);
else if (!NILP (tem))
- AREF (item_properties, ITEM_PROPERTY_ENABLE) = tem;
+ ASET (item_properties, ITEM_PROPERTY_ENABLE, tem);
}
}
else if (EQ (item_string, Qmenu_item) && CONSP (item))
{
/* New format menu item. */
- AREF (item_properties, ITEM_PROPERTY_NAME) = XCAR (item);
+ ASET (item_properties, ITEM_PROPERTY_NAME, XCAR (item));
start = XCDR (item);
if (CONSP (start))
{
/* We have a real binding. */
- AREF (item_properties, ITEM_PROPERTY_DEF) = XCAR (start);
+ ASET (item_properties, ITEM_PROPERTY_DEF, XCAR (start));
item = XCDR (start);
/* Is there a cache list with key equivalences. */
if (EQ (tem, QCenable))
{
if (!NILP (Venable_disabled_menus_and_buttons))
- AREF (item_properties, ITEM_PROPERTY_ENABLE) = Qt;
+ ASET (item_properties, ITEM_PROPERTY_ENABLE, Qt);
else
- AREF (item_properties, ITEM_PROPERTY_ENABLE) = XCAR (item);
+ ASET (item_properties, ITEM_PROPERTY_ENABLE, XCAR (item));
}
else if (EQ (tem, QCvisible) && !notreal)
{
return 0;
}
else if (EQ (tem, QChelp))
- AREF (item_properties, ITEM_PROPERTY_HELP) = XCAR (item);
+ ASET (item_properties, ITEM_PROPERTY_HELP, XCAR (item));
else if (EQ (tem, QCfilter))
filter = item;
else if (EQ (tem, QCkey_sequence))
{
tem = XCAR (item);
if (CONSP (tem) || (STRINGP (tem) && NILP (cachelist)))
- AREF (item_properties, ITEM_PROPERTY_KEYEQ) = tem;
+ ASET (item_properties, ITEM_PROPERTY_KEYEQ, tem);
}
else if (EQ (tem, QCbutton) && CONSP (XCAR (item)))
{
type = XCAR (tem);
if (EQ (type, QCtoggle) || EQ (type, QCradio))
{
- AREF (item_properties, ITEM_PROPERTY_SELECTED)
- = XCDR (tem);
- AREF (item_properties, ITEM_PROPERTY_TYPE)
- = type;
+ ASET (item_properties, ITEM_PROPERTY_SELECTED,
+ XCDR (tem));
+ ASET (item_properties, ITEM_PROPERTY_TYPE, type);
}
}
item = XCDR (item);
item_string = menu_item_eval_property (item_string);
if (!STRINGP (item_string))
return 0;
- AREF (item_properties, ITEM_PROPERTY_NAME) = item_string;
+ ASET (item_properties, ITEM_PROPERTY_NAME, item_string);
}
/* If got a filter apply it on definition. */
def = menu_item_eval_property (list2 (XCAR (filter),
list2 (Qquote, def)));
- AREF (item_properties, ITEM_PROPERTY_DEF) = def;
+ ASET (item_properties, ITEM_PROPERTY_DEF, def);
}
/* Enable or disable selection of item. */
tem = menu_item_eval_property (tem);
if (inmenubar && NILP (tem))
return 0; /* Ignore disabled items in menu bar. */
- AREF (item_properties, ITEM_PROPERTY_ENABLE) = tem;
+ ASET (item_properties, ITEM_PROPERTY_ENABLE, tem);
}
/* If we got no definition, this item is just unselectable text which
/* For a subkeymap, just record its details and exit. */
if (CONSP (tem))
{
- AREF (item_properties, ITEM_PROPERTY_MAP) = tem;
- AREF (item_properties, ITEM_PROPERTY_DEF) = tem;
+ ASET (item_properties, ITEM_PROPERTY_MAP, tem);
+ ASET (item_properties, ITEM_PROPERTY_DEF, tem);
return 1;
}
return 1;
/* If we have an equivalent key binding, use that. */
- AREF (item_properties, ITEM_PROPERTY_KEYEQ) = tem;
+ ASET (item_properties, ITEM_PROPERTY_KEYEQ, tem);
/* Include this when menu help is implemented.
tem = XVECTOR (item_properties)->contents[ITEM_PROPERTY_HELP];
/* Handle radio buttons or toggle boxes. */
tem = AREF (item_properties, ITEM_PROPERTY_SELECTED);
if (!NILP (tem))
- AREF (item_properties, ITEM_PROPERTY_SELECTED)
- = menu_item_eval_property (tem);
+ ASET (item_properties, ITEM_PROPERTY_SELECTED,
+ menu_item_eval_property (tem));
return 1;
}