changeset 69173:fdee8318ddc9

* xterm.h, xterm.c (x_uncatch_errors): Delete unneccessary argument. * xterm.c: (x_load_font, x_term_init, XTmouse_position) (handle_one_xevent, x_connection_closed, x_list_fonts): No arg for x_uncatch_errors. * xselect.c (x_own_selection, x_decline_selection_request) (x_reply_selection_request, x_get_foreign_selection) (Fx_get_atom_name, Fx_send_client_event): Likewise. * xfns.c (x_real_positions, x_set_mouse_color, Fx_focus_frame): Likewise.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 27 Feb 2006 03:35:31 +0000
parents e22243af3267
children adf46e1bddc6
files src/ChangeLog src/xfns.c src/xselect.c src/xterm.c src/xterm.h
diffstat 5 files changed, 40 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Feb 27 02:07:37 2006 +0000
+++ b/src/ChangeLog	Mon Feb 27 03:35:31 2006 +0000
@@ -1,3 +1,19 @@
+2006-02-26  Chong Yidong  <cyd@stupidchicken.com>
+
+	* xterm.h, xterm.c (x_uncatch_errors): Delete unneccessary
+	argument.
+
+	* xterm.c: (x_load_font, x_term_init, XTmouse_position)
+	(handle_one_xevent, x_connection_closed, x_list_fonts): No arg for
+	x_uncatch_errors.
+
+	* xselect.c (x_own_selection, x_decline_selection_request)
+	(x_reply_selection_request, x_get_foreign_selection)
+	(Fx_get_atom_name, Fx_send_client_event): Likewise.
+
+	* xfns.c (x_real_positions, x_set_mouse_color, Fx_focus_frame):
+	Likewise.
+
 2006-02-26  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* lread.c: Declare Vload_file_rep_suffixes instead of
@@ -28,7 +44,7 @@
 2006-02-25  Chong Yidong  <cyd@stupidchicken.com>
 
 	* xterm.h (x_catch_errors) Return value changed to void.
-	(x_uncatch_errors): Delete unused count argument delete.
+	(x_uncatch_errors): Delete unused count argument.
 
 	* xterm.c (x_catch_errors): Don't use record_unwind_protect, since
 	it can be called in a signal handler.
--- a/src/xfns.c	Mon Feb 27 02:07:37 2006 +0000
+++ b/src/xfns.c	Mon Feb 27 03:35:31 2006 +0000
@@ -666,7 +666,7 @@
       had_errors = x_had_errors_p (FRAME_X_DISPLAY (f));
     }
 
-  x_uncatch_errors (FRAME_X_DISPLAY (f));
+  x_uncatch_errors ();
 
   UNBLOCK_INPUT;
 
@@ -1021,7 +1021,7 @@
 
   /* Check and report errors with the above calls.  */
   x_check_errors (dpy, "can't set cursor shape: %s");
-  x_uncatch_errors (dpy);
+  x_uncatch_errors ();
 
   {
     XColor fore_color, back_color;
@@ -3443,7 +3443,7 @@
   x_catch_errors (dpy);
   XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
 		  RevertToParent, CurrentTime);
-  x_uncatch_errors (dpy);
+  x_uncatch_errors ();
   UNBLOCK_INPUT;
 
   return Qnil;
--- a/src/xselect.c	Mon Feb 27 02:07:37 2006 +0000
+++ b/src/xselect.c	Mon Feb 27 03:35:31 2006 +0000
@@ -410,7 +410,7 @@
   x_catch_errors (display);
   XSetSelectionOwner (display, selection_atom, selecting_window, time);
   x_check_errors (display, "Can't set selection: %s");
-  x_uncatch_errors (display);
+  x_uncatch_errors ();
   UNBLOCK_INPUT;
 
   /* Now update the local cache */
@@ -586,7 +586,7 @@
   x_catch_errors (reply.display);
   XSendEvent (reply.display, reply.requestor, False, 0L, (XEvent *) &reply);
   XFlush (reply.display);
-  x_uncatch_errors (reply.display);
+  x_uncatch_errors ();
   UNBLOCK_INPUT;
 }
 
@@ -860,7 +860,7 @@
   BLOCK_INPUT;
 
   unbind_to (count, Qnil);
-  x_uncatch_errors (display);
+  x_uncatch_errors ();
   UNBLOCK_INPUT;
 }
 
@@ -1434,7 +1434,7 @@
   BLOCK_INPUT;
   unbind_to (count, Qnil);
   x_check_errors (display, "Cannot get selection: %s");
-  x_uncatch_errors (display);
+  x_uncatch_errors ();
   UNBLOCK_INPUT;
 
   if (NILP (XCAR (reading_selection_reply)))
@@ -2673,7 +2673,7 @@
   if (! x_had_errors_p (dpy))
     ret = make_string (name, strlen (name));
 
-  x_uncatch_errors (dpy);
+  x_uncatch_errors ();
 
   if (atom && name) XFree (name);
   if (NILP (ret)) ret = make_string ("", 0);
@@ -2849,7 +2849,7 @@
     XSendEvent (dpyinfo->display, wdest, propagate, mask, &event);
     XFlush (dpyinfo->display);
   }
-  x_uncatch_errors (dpyinfo->display);
+  x_uncatch_errors ();
   UNBLOCK_INPUT;
 
   return Qnil;
--- a/src/xterm.c	Mon Feb 27 02:07:37 2006 +0000
+++ b/src/xterm.c	Mon Feb 27 03:35:31 2006 +0000
@@ -325,7 +325,7 @@
 
 static int x_io_error_quitter P_ ((Display *));
 void x_catch_errors P_ ((Display *));
-void x_uncatch_errors P_ ((Display *));
+void x_uncatch_errors P_ ((void));
 void x_lower_frame P_ ((struct frame *));
 void x_scroll_bar_clear P_ ((struct frame *));
 int x_had_errors_p P_ ((Display *));
@@ -3795,7 +3795,7 @@
 	if (x_had_errors_p (FRAME_X_DISPLAY (*fp)))
 	  f1 = 0;
 
-	x_uncatch_errors (FRAME_X_DISPLAY (*fp));
+	x_uncatch_errors ();
 
 	/* If not, is it one of our scroll bars?  */
 	if (! f1)
@@ -5721,7 +5721,7 @@
                     /* This is needed to detect the error
                        if there is an error.  */
                     XSync (d, False);
-                    x_uncatch_errors (d);
+                    x_uncatch_errors ();
                   }
                 /* Not certain about handling scroll bars here */
 #endif /* 0 */
@@ -7529,19 +7529,16 @@
    DPY should be the display that was passed to x_catch_errors.  */
 
 void
-x_uncatch_errors (dpy)
-     Display *dpy;
+x_uncatch_errors ()
 {
   struct x_error_message_stack *tmp;
 
-  eassert (x_error_message && dpy == x_error_message->dpy);
-
   /* The display may have been closed before this function is called.
      Check if it is still open before calling XSync.  */
-  if (x_display_info_for_display (dpy) != 0)
+  if (x_display_info_for_display (x_error_message->dpy) != 0)
     {
       BLOCK_INPUT;
-      XSync (dpy, False);
+      XSync (x_error_message->dpy, False);
       UNBLOCK_INPUT;
     }
 
@@ -7566,7 +7563,7 @@
     {
       char string[X_ERROR_MESSAGE_SIZE];
       bcopy (x_error_message->string, string, X_ERROR_MESSAGE_SIZE);
-      x_uncatch_errors (dpy);
+      x_uncatch_errors ();
       error (format, string);
     }
 }
@@ -7726,7 +7723,7 @@
   if (dpyinfo)
     x_delete_display (dpyinfo);
 
-  x_uncatch_errors (dpy);
+  x_uncatch_errors ();
 
   if (x_display_list == 0)
     {
@@ -9452,7 +9449,7 @@
 	    }
 	}
 
-      x_uncatch_errors (dpy);
+      x_uncatch_errors ();
       UNBLOCK_INPUT;
 
       if (names)
@@ -9553,7 +9550,7 @@
 		  thisinfo = NULL;
 		  x_clear_errors (dpy);
 		}
-	      x_uncatch_errors (dpy);
+	      x_uncatch_errors ();
 	      UNBLOCK_INPUT;
 
 	      if (thisinfo)
@@ -9756,7 +9753,7 @@
 	font = NULL;
 	x_clear_errors (FRAME_X_DISPLAY (f));
       }
-    x_uncatch_errors (FRAME_X_DISPLAY (f));
+    x_uncatch_errors ();
     UNBLOCK_INPUT;
     if (!font)
       return NULL;
@@ -10541,7 +10538,7 @@
       abort ();
     if (x_had_errors_p (dpy) || !XQueryFont (dpy, font))
       XrmPutLineResource (&xrdb, "Emacs.dialog.*.font: 9x15");
-    x_uncatch_errors (dpy);
+    x_uncatch_errors ();
   }
 #endif
 #endif
--- a/src/xterm.h	Mon Feb 27 02:07:37 2006 +0000
+++ b/src/xterm.h	Mon Feb 27 03:35:31 2006 +0000
@@ -960,7 +960,7 @@
 void x_wm_set_size_hint P_ ((struct frame *, long, int));
 void x_catch_errors P_ ((Display *));
 int x_had_errors_p P_ ((Display *));
-void x_uncatch_errors P_ ((Display *));
+void x_uncatch_errors P_ ((void));
 void x_check_errors P_ ((Display *, char *));
 int x_text_icon P_ ((struct frame *, char *));
 int x_bitmap_icon P_ ((struct frame *, Lisp_Object));
@@ -977,7 +977,7 @@
 extern void x_catch_errors P_ ((Display *));
 extern void x_check_errors P_ ((Display *, char *));
 extern int x_had_errors_p P_ ((Display *));
-extern void x_uncatch_errors P_ ((Display *));
+extern void x_uncatch_errors P_ ((void));
 extern void x_set_window_size P_ ((struct frame *, int, int, int));
 extern void x_set_mouse_position P_ ((struct frame *, int, int));
 extern void x_set_mouse_pixel_position P_ ((struct frame *, int, int));