aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keymap.c')
-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;