[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/keyboard.c
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/src/keyboard.c |
Date: |
Sat, 11 Feb 2006 13:50:29 +0000 |
Index: emacs/src/keyboard.c
diff -u emacs/src/keyboard.c:1.849 emacs/src/keyboard.c:1.850
--- emacs/src/keyboard.c:1.849 Fri Feb 10 00:00:30 2006
+++ emacs/src/keyboard.c Sat Feb 11 13:50:29 2006
@@ -649,6 +649,11 @@
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;
+
/* Global variable declarations. */
@@ -7271,7 +7276,9 @@
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;
}
}
@@ -7300,7 +7307,12 @@
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
@@ -7820,8 +7832,13 @@
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
@@ -11471,6 +11488,14 @@
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