]> git.eshelyaron.com Git - emacs.git/commitdiff
(menu_item_equiv_key): Check whether def1 matches
authorRichard M. Stallman <rms@gnu.org>
Tue, 7 Jun 1994 18:31:56 +0000 (18:31 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 7 Jun 1994 18:31:56 +0000 (18:31 +0000)
un-aliased command name as well as given command name.

src/xmenu.c

index a00bcb1a78b4e503a6e9c92899fd0cedd77a4750..3a0e2137cbe6d7577e4d8db9ec912dd27b693372 100644 (file)
@@ -324,6 +324,11 @@ menu_item_equiv_key (item_string, item1, descrip_ptr)
     def1 = Fkey_binding (savedkey, Qnil);
   /* If not, update it.  */
   if (! EQ (def1, def)
+      /* If the command is an alias for another
+         (such as easymenu.el and lmenu.el set it up),
+         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)))