Mercurial > emacs
changeset 72806:d148ed3e5bb4
* keymap.c (Fkey_binding): Use string position for string objects.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Mon, 11 Sep 2006 13:03:40 +0000 |
parents | e5e7b6d129dd |
children | 155c26718860 |
files | src/ChangeLog src/keymap.c |
diffstat | 2 files changed, 14 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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 <cyd@stupidchicken.com> + + * keymap.c (Fkey_binding): Use string position for string objects. + 2006-09-11 Kim F. Storm <storm@cua.dk> * keymap.c (Fkey_binding): Fix last change.
--- 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);