(sigunblockx): Definitions deleted.
[bpt/emacs.git] / src / keymap.c
index a0c28bb..88f89cd 100644 (file)
@@ -307,6 +307,11 @@ PARENT should be nil or another keymap.")
         If we came to the end, add the parent in PREV.  */
       if (! CONSP (list) || EQ (Qkeymap, XCONS (list)->car))
        {
+         /* If we already have the right parent, return now
+            so that we avoid the loops below.  */
+         if (EQ (XCONS (prev)->cdr, parent))
+           return parent;
+
          XCONS (prev)->cdr = parent;
          break;
        }