static EMACS_TIME timer_last_idleness_start_time;
+/* If non-nil, events produced by disabled menu items and tool-bar
+ buttons are not ignored. Help functions bind this to allow help on
+ those items and buttons. */
+Lisp_Object Venable_disabled_menus_and_buttons;
+
\f
/* Global variable declarations. */
if (SYMBOLP (item))
{
tem = Fget (item, Qmenu_enable);
- if (!NILP (tem))
+ if (!NILP (Venable_disabled_menus_and_buttons))
+ AREF (item_properties, ITEM_PROPERTY_ENABLE) = Qt;
+ else if (!NILP (tem))
AREF (item_properties, ITEM_PROPERTY_ENABLE) = tem;
}
}
item = XCDR (item);
if (EQ (tem, QCenable))
- AREF (item_properties, ITEM_PROPERTY_ENABLE) = XCAR (item);
+ {
+ if (!NILP (Venable_disabled_menus_and_buttons))
+ AREF (item_properties, ITEM_PROPERTY_ENABLE) = Qt;
+ else
+ AREF (item_properties, ITEM_PROPERTY_ENABLE) = XCAR (item);
+ }
else if (EQ (tem, QCvisible) && !notreal)
{
/* If got a visible property and that evaluates to nil
value = XCAR (XCDR (item));
if (EQ (key, QCenable))
- /* `:enable FORM'. */
- PROP (TOOL_BAR_ITEM_ENABLED_P) = value;
+ {
+ /* `:enable FORM'. */
+ if (!NILP (Venable_disabled_menus_and_buttons))
+ PROP (TOOL_BAR_ITEM_ENABLED_P) = Qt;
+ else
+ PROP (TOOL_BAR_ITEM_ENABLED_P) = value;
+ }
else if (EQ (key, QCvisible))
{
/* `:visible FORM'. If got a visible property and that
The value of that variable is passed to `quit-flag' and later causes a
peculiar kind of quitting. */);
Vthrow_on_input = Qnil;
+
+ DEFVAR_LISP ("enable-disabled-menus-and-buttons",
+ &Venable_disabled_menus_and_buttons,
+ doc: /* If non-nil, don't ignore events produced by disabled menu items and tool-bar.
+
+Help functions bind this to allow help on disabled menu items
+and tool-bar buttons. */);
+ Venable_disabled_menus_and_buttons = Qnil;
}
void