diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2006-02-12 00:15:44 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2006-02-12 00:15:44 +0000 |
commit | 1913a2b35da45eeeb71ef851975be7d57c11de78 (patch) | |
tree | 6cd59883fb931999da5b62c03b321ade6f77e66e /src/keyboard.c | |
parent | a5805c9d0240fab504f2a3e32db6449392005fb6 (diff) | |
parent | a528b71e55b2b244a5dd35318713ccb20398cbbf (diff) | |
download | emacs-1913a2b35da45eeeb71ef851975be7d57c11de78.tar.gz |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-49
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-50
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-51
Make constrain-to-field notice overlays
* emacs@sv.gnu.org/emacs--devo--0--patch-52
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-53
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-54
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-55
Merge from erc--emacs--0
* emacs@sv.gnu.org/emacs--devo--0--patch-56
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-57
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-58
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-59
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-60
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-61
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-62
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-63
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-64
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-65
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-66
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-67
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-68
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-69
rcirc: Add flexible response formatting; Add nick abbrevs
* emacs@sv.gnu.org/emacs--devo--0--patch-70
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-71
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-72
Update from CVS: man/dired.texi (Tumme): More tumme documentation.
* emacs@sv.gnu.org/gnus--rel--5.10--patch-18
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-19
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-20
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-21
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-22
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-23
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-24
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-25
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-26
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-27
Update from CVS: lisp/gnus.el: Remove bogus comment.
* emacs@sv.gnu.org/gnus--rel--5.10--patch-28
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-29
Add sendmail.el and smptmail.el from Emacs tree to contrib/
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-508
Diffstat (limited to 'src/keyboard.c')
-rw-r--r-- | src/keyboard.c | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index dc509ad5717..319e6d24974 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1,7 +1,7 @@ /* Keyboard and mouse input; editor command loop. Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, - 2005 Free Software Foundation, Inc. + 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -633,6 +633,11 @@ static EMACS_TIME timer_idleness_start_time; 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. */ @@ -7453,7 +7458,9 @@ parse_menu_item (item, notreal, inmenubar) 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; } } @@ -7482,7 +7489,12 @@ parse_menu_item (item, notreal, inmenubar) 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 @@ -8002,8 +8014,13 @@ parse_tool_bar_item (key, item) 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 @@ -9907,7 +9924,7 @@ a special event, so ignore the prefix argument and don't clear it. */) while (1) { - final = Findirect_function (cmd); + final = Findirect_function (cmd, Qnil); if (CONSP (final) && (tem = Fcar (final), EQ (tem, Qautoload))) { @@ -11934,6 +11951,14 @@ If the value is not a number, such messages don't time out. */); 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 |