comparison src/keymap.c @ 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 d9638b932900
children c83903b9e676 03934708f1e9
comparison
equal deleted inserted replaced
66756:670149b47c39 66757:3f4ee1926eb1
2375 Lisp_Object tail, value; 2375 Lisp_Object tail, value;
2376 2376
2377 for (tail = shadow; CONSP (tail); tail = XCDR (tail)) 2377 for (tail = shadow; CONSP (tail); tail = XCDR (tail))
2378 { 2378 {
2379 value = Flookup_key (XCAR (tail), key, flag); 2379 value = Flookup_key (XCAR (tail), key, flag);
2380 if (!NILP (value) && !NATNUMP (value)) 2380 if (NATNUMP (value))
2381 {
2382 value = Flookup_key (XCAR (tail), Fsubstring (key, 0, value), flag);
2383 if (!NILP (value))
2384 return Qnil;
2385 }
2386 else if (!NILP (value))
2381 return value; 2387 return value;
2382 } 2388 }
2383 return Qnil; 2389 return Qnil;
2384 } 2390 }
2385 2391