From: Juri Linkov Date: Wed, 9 Nov 2005 07:48:38 +0000 (+0000) Subject: (shadow_lookup): If Flookup_key returns a number, X-Git-Tag: emacs-pretest-22.0.90~6005 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d35f78c989efa1cac28d6aa75f65f1990d0669c6;p=emacs.git (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. --- diff --git a/src/keymap.c b/src/keymap.c index f74ee61a08c..f2370225ab8 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;