aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov <[email protected]>2005-11-09 07:48:38 +0000
committerJuri Linkov <[email protected]>2005-11-09 07:48:38 +0000
commitd35f78c989efa1cac28d6aa75f65f1990d0669c6 (patch)
tree59ba07dc3745af72adb5eb037f15fdbfc0bbabc0
parent8b363e6f08ce2f37fa84522b3ceb44440b9fe124 (diff)
(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.
-rw-r--r--src/keymap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/keymap.c b/src/keymap.c
index f74ee61a08..f2370225ab 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -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;