From: Chong Yidong Date: Mon, 11 Sep 2006 13:03:40 +0000 (+0000) Subject: * keymap.c (Fkey_binding): Use string position for string objects. X-Git-Tag: emacs-pretest-22.0.90~618 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=91197db4cb05edc4ba9789a1c2339d23b37ee973;p=emacs.git * keymap.c (Fkey_binding): Use string position for string objects. --- diff --git a/src/ChangeLog b/src/ChangeLog index f406681ec68..fea9f668224 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 --git a/src/keymap.c b/src/keymap.c index c249c6de406..8b99231a91d 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1587,13 +1587,16 @@ is non-nil, `key-binding' returns the unmapped command. */) && 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);