changeset 1236:5e8c234e5f03

* keymap.c (access_keymap): Remove code to notice bindings for Qt. * keymap.c (Fwhere_is_internal): Don't forget to advance map to the next element when we find something that is neither a vector nor a cons. Don't forget to QUIT in the appropriate places, either.
author Jim Blandy <jimb@redhat.com>
date Mon, 28 Sep 1992 02:20:23 +0000
parents a9e3ec19b7d7
children 3929b2135e58
files src/keymap.c
diffstat 1 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Mon Sep 28 01:27:56 1992 +0000
+++ b/src/keymap.c	Mon Sep 28 02:20:23 1992 +0000
@@ -204,11 +204,8 @@
 
 
 /* Look up IDX in MAP.  IDX may be any sort of event.
-
    Note that this does only one level of lookup; IDX must be a single
-   event, not a sequence.  If IDX is unbound in MAP but MAP has a
-   binding for Qt, then Qt's binding is returned; this makes bindings
-   of Qt act like "default" bindings.  */
+   event, not a sequence.  */
 
 Lisp_Object
 access_keymap (map, idx)
@@ -232,7 +229,6 @@
 
   {
     Lisp_Object tail;
-    Lisp_Object t_binding = Qnil;
 
     for (tail = map; CONSP (tail); tail = XCONS (tail)->cdr)
       {
@@ -243,8 +239,6 @@
 	  case Lisp_Cons:
 	    if (EQ (XCONS (binding)->car, idx))
 	      return XCONS (binding)->cdr;
-	    if (EQ (XCONS (binding)->car, Qt))
-	      t_binding = XCONS (binding)->cdr;
 	    break;
 
 	  case Lisp_Vector:
@@ -254,9 +248,9 @@
 	    break;
 	  }
       }
+  }
 
-    return t_binding;
-  }
+  return Qnil;
 }
 
 /* Given OBJECT which was found in a slot in a keymap,
@@ -276,10 +270,9 @@
     {
       register Lisp_Object map, tem;
 
+      /* If the contents are (KEYMAP . ELEMENT), go indirect.  */
       map = get_keymap_1 (Fcar_safe (object), 0);
       tem = Fkeymapp (map);
-
-      /* If the contents are (KEYMAP . ELEMENT), go indirect.  */
       if (!NILP (tem))
 	object = access_keymap (map, Fcdr (object));
       
@@ -1219,6 +1212,8 @@
       int last_is_meta = (XINT (last) >= 0
 			  && EQ (Faref (this, last), meta_prefix_char));
 
+      QUIT;
+
       while (CONSP (map))
 	{
 	  /* Because the code we want to run on each binding is rather
@@ -1233,6 +1228,8 @@
 	  Lisp_Object elt = XCONS (map)->car;
 	  Lisp_Object key, binding, sequence;
 
+	  QUIT;
+
 	  /* Set key and binding to the current key and binding, and
 	     advance map and i to the next binding.  */
 	  if (XTYPE (elt) == Lisp_Vector)
@@ -1261,7 +1258,10 @@
 	  else
 	    /* We want to ignore keymap elements that are neither
 	       vectors nor conses.  */
-	    continue;
+	    {
+	      map = XCONS (map)->cdr;
+	      continue;
+	    }
 
 	  /* Search through indirections unless that's not wanted.  */
 	  if (NILP (noindirect))