summaryrefslogtreecommitdiff
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-06-17 23:48:10 +0000
committerRichard M. Stallman <rms@gnu.org>1995-06-17 23:48:10 +0000
commitc439978d6f7a37ac04b5b9f9abe2b003d4ef2f54 (patch)
tree197e1205d44be2902099cc572149dcaefd8b49a2 /src/xmenu.c
parentf2ba34dec3db6f68aabb6ec0b2101e5b444f05df (diff)
downloademacs-c439978d6f7a37ac04b5b9f9abe2b003d4ef2f54.tar.gz
(menu_item_equiv_key): Do reconsider a command that had
no equivalent before, if it is in Vdefine_key_rebound_commands.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index dad781e67b1..fc7615e9fdd 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -86,6 +86,8 @@ extern Lisp_Object Qmenu_enable;
extern Lisp_Object Qmenu_bar;
extern Lisp_Object Qmouse_click, Qevent_kind;
+extern Lisp_Object Vdefine_key_rebound_commands;
+
#ifdef USE_X_TOOLKIT
extern void process_expose_from_menu ();
extern XtAppContext Xt_app_con;
@@ -381,9 +383,13 @@ menu_item_equiv_key (item_string, item1, descrip_ptr)
check if the original command matches the cached command. */
&& !(SYMBOLP (def) && SYMBOLP (XSYMBOL (def)->function)
&& EQ (def1, XSYMBOL (def)->function))
- /* If something had no key binding before, don't recheck it--
- doing that takes too much time and makes menus too slow. */
- && !(!NILP (cachelist) && NILP (savedkey)))
+ /* If something had no key binding before, don't recheck it
+ because that is too slow--except if we have a list of rebound
+ commands in Vdefine_key_rebound_commands, do recheck any command
+ that appears in that list. */
+ && (NILP (cachelist) || !NILP (savedkey)
+ || (! EQ (Qt, Vdefine_key_rebound_commands)
+ && !NILP (Fmemq (def, Vdefine_key_rebound_commands)))))
{
changed = 1;
descrip = Qnil;