]> git.eshelyaron.com Git - emacs.git/commitdiff
(shadow_lookup): If Flookup_key returns a number,
authorJuri Linkov <juri@jurta.org>
Wed, 9 Nov 2005 07:48:38 +0000 (07:48 +0000)
committerJuri Linkov <juri@jurta.org>
Wed, 9 Nov 2005 07:48:38 +0000 (07:48 +0000)
call it again with a sub-key-sequence, and if its return value
is non-nil (sub-key is bound), return nil.

src/keymap.c

index f74ee61a08c16f851a391985d76d68de6fa70e9a..f2370225ab81ca8292d3c613badf08e7fe79c0fe 100644 (file)
@@ -2377,7 +2377,13 @@ shadow_lookup (shadow, key, flag)
   for (tail = shadow; CONSP (tail); tail = XCDR (tail))
     {
       value = Flookup_key (XCAR (tail), key, flag);
-      if (!NILP (value) && !NATNUMP (value))
+      if (NATNUMP (value))
+       {
+         value = Flookup_key (XCAR (tail), Fsubstring (key, 0, value), flag);
+         if (!NILP (value))
+           return Qnil;
+       }
+      else if (!NILP (value))
        return value;
     }
   return Qnil;