]> code.delx.au - gnu-emacs/blobdiff - src/keymap.c
*** empty log message ***
[gnu-emacs] / src / keymap.c
index 68c673380c8693284ba77be1107076075acc2b81..0c1a1146d15f5f97d8f396a04d78cde0c237f1ef 100644 (file)
@@ -615,18 +615,14 @@ get_keyelt (object, autoload)
 
              /* If there's a `:filter FILTER', apply FILTER to the
                 menu-item's definition to get the real definition to
-                use.  Temporarily inhibit GC while evaluating FILTER,
-                because not functions calling get_keyelt are prepared
-                for a GC.  */
+                use.  */
              for (; CONSP (tem) && CONSP (XCDR (tem)); tem = XCDR (tem))
-               if (EQ (XCAR (tem), QCfilter))
+               if (EQ (XCAR (tem), QCfilter) && autoload)
                  {
-                   int count = inhibit_garbage_collection ();
                    Lisp_Object filter;
                    filter = XCAR (XCDR (tem));
                    filter = list2 (filter, list2 (Qquote, object));
                    object = menu_item_eval_property (filter);
-                   unbind_to (count, Qnil);
                    break;
                  }
            }
@@ -1867,9 +1863,6 @@ push_key_description (c, p)
     *p++ = c;
   else
     {
-      if (! NILP (current_buffer->enable_multibyte_characters))
-       c = unibyte_char_to_multibyte (c);
-
       if (NILP (current_buffer->enable_multibyte_characters)
          || SINGLE_BYTE_CHAR_P (c)
          || ! char_valid_p (c, 0))
@@ -2039,15 +2032,6 @@ ascii_sequence_p (seq)
 static Lisp_Object where_is_internal_1 ();
 static void where_is_internal_2 ();
 
-static INLINE int
-menu_item_p (item)
-     Lisp_Object item;
-{
-  return (CONSP (item)
-         && (EQ (XCAR (item),Qmenu_item)
-             || STRINGP (XCAR (item))));
-}
-
 /* Like Flookup_key, but uses a list of keymaps SHADOW instead of a single map.
    Returns the first non-nil binding found in any of those maps.  */
 
@@ -2109,14 +2093,12 @@ where_is_internal (definition, keymaps, firstonly, noindirect)
       last_is_meta = (XINT (last) >= 0
                      && EQ (Faref (this, last), meta_prefix_char));
 
-      if (nomenus && XINT (last) >= 0)
-       { /* If no menu entries should be returned, skip over the
-            keymaps bound to `menu-bar' and `tool-bar'.  */
-         Lisp_Object tem = Faref (this, make_number (0));
-         if (EQ (tem, Qmenu_bar) || EQ (tem, Qtool_bar))
-           continue;
-       }
-
+      if (nomenus && !ascii_sequence_p (this))
+       /* If no menu entries should be returned, skip over the
+          keymaps bound to `menu-bar' and `tool-bar' and other
+          non-ascii prefixes.  */
+       continue;
+      
       QUIT;
 
       while (CONSP (map))
@@ -2300,7 +2282,8 @@ indirect definition itself.")
       for (sequences = Fnreverse (sequences);
           CONSP (sequences);
           sequences = XCDR (sequences))
-       if (EQ (shadow_lookup (keymaps, XCAR (sequences), Qnil), definition))
+       if (EQ (shadow_lookup (keymaps, XCAR (sequences), Qnil), definition)
+           && ascii_sequence_p (XCAR (sequences)))
          RETURN_UNGCPRO (XCAR (sequences));
       RETURN_UNGCPRO (Qnil);
     }
@@ -2362,10 +2345,6 @@ where_is_internal_1 (binding, key, definition, noindirect, this, last,
 {
   Lisp_Object sequence;
 
-  /* Skip left-over menu-items.
-     These can appear in a keymap bound to a mouse click, for example.  */
-  if (nomenus && menu_item_p (binding))
-    return Qnil;
   /* Search through indirections unless that's not wanted.  */
   if (NILP (noindirect))
     binding = get_keyelt (binding, 0);