]> code.delx.au - gnu-emacs/blobdiff - src/keymap.c
(xic_create_xfontset): Fix previous change.
[gnu-emacs] / src / keymap.c
index 9b36ec08b6d7b0d656d193c678710193c02257de..11e3e348da5b1b2834102c0eac1e32567dbd2a3a 100644 (file)
@@ -1156,7 +1156,7 @@ binding KEY to DEF is added at the front of KEYMAP.  */)
 
   meta_bit = VECTORP (key) ? meta_modifier : 0x80;
 
-  if (VECTORP (def) && ASIZE (def) > 0 && CONSP (AREF (def, make_number (0))))
+  if (VECTORP (def) && ASIZE (def) > 0 && CONSP (AREF (def, 0)))
     { /* DEF is apparently an XEmacs-style keyboard macro.  */
       Lisp_Object tmp = Fmake_vector (make_number (ASIZE (def)), Qnil);
       int i = ASIZE (def);
@@ -1610,13 +1610,12 @@ specified buffer position instead of point are used.
 
       /* We are not interested in locations without event data */
 
-      if (EVENT_HAS_PARAMETERS (event)) {
-       Lisp_Object kind;
-
-       kind = EVENT_HEAD_KIND (EVENT_HEAD (event));
-       if (EQ (kind, Qmouse_click))
-         position = EVENT_START (event);
-      }
+      if (EVENT_HAS_PARAMETERS (event))
+       {
+         Lisp_Object kind = EVENT_HEAD_KIND (EVENT_HEAD (event));
+         if (CONSP (XCDR (event)) && EQ (kind, Qmouse_click))
+           position = EVENT_START (event);
+       }
     }
 
   /* Key sequences beginning with mouse clicks
@@ -1709,7 +1708,8 @@ specified buffer position instead of point are used.
              
              pos = XCDR (string);
              string = XCAR (string);
-             if (XINT (pos) >= 0
+             if (INTEGERP (pos)
+                 && XINT (pos) >= 0
                  && XINT (pos) < SCHARS (string))
                {
                  map = Fget_text_property (pos, Qlocal_map, string);