From aaef169dc63c4b557374540756865991e1bf6305 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Mon, 6 Feb 2006 15:23:23 +0000 Subject: Update years in copyright notice; nfc. --- src/keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/keyboard.c') diff --git a/src/keyboard.c b/src/keyboard.c index 897f691a5e9..21bd13060c4 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. -- cgit v1.2.1 From a7f96a358b12d90b44fa11ac65caf24fd164ad6d Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 10 Feb 2006 00:00:31 +0000 Subject: * data.c (Findirect_function): Add NOERROR arg. All callers changed to pass Qnil for NOERROR. * keymap.c (current_minor_maps_error): Remove. (current_minor_maps): Pass Qt for NOERROR to Findirect_function instead of using internal_condition_case_1+current_minor_maps_error. --- src/keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/keyboard.c') diff --git a/src/keyboard.c b/src/keyboard.c index 21bd13060c4..d5c5f184cfa 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -9700,7 +9700,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))) { -- cgit v1.2.1 From 9d56e0da1fe2128b9c7ffdf05f5f7b9ad2ece9fc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 11 Feb 2006 13:50:29 +0000 Subject: (Venable_disabled_menus_and_buttons): New variable. (syms_of_keyboard): DEVFAR_LISP and initialize it. (parse_tool_bar_item, parse_menu_item): If that variable is non-nil, don't disable menu items and tool-bar buttons. --- src/keyboard.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'src/keyboard.c') diff --git a/src/keyboard.c b/src/keyboard.c index d5c5f184cfa..a1b8ad34b07 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -649,6 +649,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. */ @@ -7271,7 +7276,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; } } @@ -7300,7 +7307,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 @@ -7820,8 +7832,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 @@ -11471,6 +11488,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 -- cgit v1.2.1