* src/keyboard.c (active_maps): Fcurrent_active_maps expects a position, not
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 14 Feb 2013 14:40:54 +0000 (09:40 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 14 Feb 2013 14:40:54 +0000 (09:40 -0500)
an event.

src/ChangeLog
src/keyboard.c

index 82cc8f0..3c9ea25 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-14  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * keyboard.c (active_maps): Fcurrent_active_maps expects a position, not
+       an event.
+
 2013-02-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * keyboard.c (syms_of_keyboard): Further tweaks of docstring.
index 4750748..fe1c3d7 100644 (file)
@@ -8644,7 +8644,8 @@ follow_key (Lisp_Object keymap, Lisp_Object key)
 static Lisp_Object
 active_maps (Lisp_Object first_event)
 {
-  Lisp_Object position = INTEGERP (first_event) ? Qnil : first_event;
+  Lisp_Object position
+    = CONSP (first_event) ? CAR_SAFE (XCDR (first_event)) : Qnil;
   return Fcons (Qkeymap, Fcurrent_active_maps (Qt, position));
 }