]> code.delx.au - gnu-emacs/blobdiff - src/xterm.c
(temp_output_buffer_setup): Use new type for overlays_(before|after).
[gnu-emacs] / src / xterm.c
index 590ce4f7917d9e3c36ee3abb416dd65c5aa787d2..c8a56dc74429f6df8daa5773ba5ff5785132fcd2 100644 (file)
@@ -159,7 +159,12 @@ extern void _XEditResCheckMessages ();
 #define abs(x) ((x) < 0 ? -(x) : (x))
 
 /* Default to using XIM if available.  */
+#ifdef USE_XIM
 int use_xim = 1;
+#else
+int use_xim = 0;  /* configure --without-xim */
+#endif
+
 \f
 
 /* Non-nil means Emacs uses toolkit scroll bars.  */
@@ -6989,10 +6994,14 @@ x_dispatch_event (event, display)
 {
   struct x_display_info *dpyinfo;
   struct input_event bufp[10];
-  struct input_event *bufpp = bufp;
+  struct input_event *bufpp;
   int numchars = 10;
   int finish = X_EVENT_NORMAL;
 
+  for (bufpp = bufp; bufpp != bufp + 10; bufpp++)
+    EVENT_INIT (*bufpp);
+  bufpp = bufp;
+
   for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next)
     if (dpyinfo->display == display)
       break;
@@ -8116,9 +8125,9 @@ xim_initialize (dpyinfo, resource_name)
       XRegisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb,
                                      resource_name, EMACS_CLASS,
                                      xim_instantiate_callback,
-                                     /* Fixme: This is XPointer in
-                                        XFree86 but (XPointer *) on
-                                        Tru64, at least.  */
+                                     /* This is XPointer in XFree86
+                                        but (XPointer *) on Tru64, at
+                                        least, hence the configure test.  */
                                      (XPointer) xim_inst);
 #else /* not HAVE_X11R6_XIM */
       dpyinfo->xim = NULL;
@@ -10521,10 +10530,17 @@ x_term_init (display_name, xrm_option, resource_name)
                                    build_string ("useXIM"),
                                    build_string ("UseXIM"),
                                    Qnil, Qnil);
+#ifdef USE_XIM
     if (STRINGP (value)
        && (!strcmp (XSTRING (value)->data, "false")
            || !strcmp (XSTRING (value)->data, "off")))
       use_xim = 0;
+#else
+    if (STRINGP (value)
+       && (!strcmp (XSTRING (value)->data, "true")
+           || !strcmp (XSTRING (value)->data, "on")))
+      use_xim = 1;
+#endif
   }
 
   UNBLOCK_INPUT;