# HG changeset patch # User Chong Yidong # Date 1157979820 0 # Node ID d148ed3e5bb4ae4c65f108ff1234e1c0d6791a70 # Parent e5e7b6d129dd785fb05f7b34fd5ea54d52e1c389 * keymap.c (Fkey_binding): Use string position for string objects. diff -r e5e7b6d129dd -r d148ed3e5bb4 src/ChangeLog --- a/src/ChangeLog Mon Sep 11 11:15:54 2006 +0000 +++ b/src/ChangeLog Mon Sep 11 13:03:40 2006 +0000 @@ -1,3 +1,7 @@ +2006-09-11 Chong Yidong + + * keymap.c (Fkey_binding): Use string position for string objects. + 2006-09-11 Kim F. Storm * keymap.c (Fkey_binding): Fix last change. diff -r e5e7b6d129dd -r d148ed3e5bb4 src/keymap.c --- a/src/keymap.c Mon Sep 11 11:15:54 2006 +0000 +++ b/src/keymap.c Mon Sep 11 13:03:40 2006 +0000 @@ -1587,13 +1587,16 @@ && XINT (Flength (pos)) == 10 && INTEGERP (XCAR (XCDR (pos)))) { - Lisp_Object map, obj; - obj = Fnth (make_number(4), pos); - map = Fget_char_property (XCAR (XCDR (pos)), - Qkeymap, - NILP (obj) ? - Fwindow_buffer (XCAR (pos)) - : XCAR (obj)); + Lisp_Object map, object; + + object = Fnth (make_number(4), pos); + + if (CONSP (object)) + map = Fget_char_property (XCDR (object), Qkeymap, XCAR (object)); + else + map = Fget_char_property (XCAR (XCDR (pos)), Qkeymap, + Fwindow_buffer (XCAR (pos))); + if (!NILP (Fkeymapp (map))) { value = Flookup_key (map, key, accept_default);