changeset 66757:3f4ee1926eb1

(shadow_lookup): If Flookup_key returns a number, call it again with a sub-key-sequence, and if its return value is non-nil (sub-key is bound), return nil.
author Juri Linkov <juri@jurta.org>
date Wed, 09 Nov 2005 07:48:38 +0000
parents 670149b47c39
children 7049164b53da
files src/keymap.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Wed Nov 09 07:41:48 2005 +0000
+++ b/src/keymap.c	Wed Nov 09 07:48:38 2005 +0000
@@ -2377,7 +2377,13 @@
   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;