# HG changeset patch # User Chong Yidong # Date 1157942045 0 # Node ID 64e86769392f3338021ce61f81779e6e0355bd18 # Parent 155fb0a17074941516290cf1fde1e4c0932bccf0 * keymap.c (Fkey_binding): Check for local keymap for mouse click events. diff -r 155fb0a17074 -r 64e86769392f src/ChangeLog --- a/src/ChangeLog Mon Sep 11 02:25:00 2006 +0000 +++ b/src/ChangeLog Mon Sep 11 02:34:05 2006 +0000 @@ -1,3 +1,8 @@ +2006-09-10 Chong Yidong + + * keymap.c (Fkey_binding): Check for local keymap for mouse click + events. + 2006-09-10 Kim F. Storm * keyboard.c (Finput_pending_p): Check Vunread_input_method_events diff -r 155fb0a17074 -r 64e86769392f src/keymap.c --- a/src/keymap.c Mon Sep 11 02:25:00 2006 +0000 +++ b/src/keymap.c Mon Sep 11 02:34:05 2006 +0000 @@ -1576,6 +1576,33 @@ GCPRO1 (key); +#ifdef HAVE_MOUSE + if (VECTORP (key) + && ASIZE (key) > 0 + && CONSP (AREF (key, 0)) + && SYMBOLP (XCAR (AREF (key, 0))) + && CONSP (XCDR (AREF (key, 0)))) + { + Lisp_Object map, obj, pos = XCAR (XCDR (AREF (key, 0))); + + if (XINT (Flength (pos)) == 10 && INTEGERP (XCAR (XCDR (pos)))) + { + obj = Fnth (make_number(4), pos); + map = Fget_char_property (XCAR (XCDR (pos)), + Qkeymap, + NILP (obj) ? + Fwindow_buffer (XCAR (pos)) + : XCAR (obj)); + if (!NILP (Fkeymapp (map))) + { + value = Flookup_key (map, key, accept_default); + if (! NILP (value) && !INTEGERP (value)) + goto done; + } + } + } +#endif /* HAVE_MOUSE */ + if (!NILP (current_kboard->Voverriding_terminal_local_map)) { value = Flookup_key (current_kboard->Voverriding_terminal_local_map,