diff src/xfns.c @ 69152:f2147c1027b6

* xterm.h (x_catch_errors) Return value changed to void. (x_uncatch_errors): Unused count argument deleted. * xterm.c (x_catch_errors): Don't use record_unwind_protect, since it can be called in a signal handler. (x_catch_errors_unwind): Function deleted. (x_uncatch_errors): Deallocate last x_error_message_stack struct. (x_check_errors): Call x_uncatch_errors before signalling error. (x_load_font, x_term_init, XTmouse_position, handle_one_xevent) (x_connection_closed, x_list_fonts): Use new versions of x_catch_errors and 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. * eval.c (record_unwind_protect): Add an assertion.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 25 Feb 2006 23:20:10 +0000
parents 4c87a7783f95
children fdee8318ddc9 8a1ee48a8386
line wrap: on
line diff
--- a/src/xfns.c	Sat Feb 25 16:49:00 2006 +0000
+++ b/src/xfns.c	Sat Feb 25 23:20:10 2006 +0000
@@ -577,11 +577,9 @@
   int had_errors = 0;
   Window win = f->output_data.x->parent_desc;
 
-  int count;
-
   BLOCK_INPUT;
 
-  count = x_catch_errors (FRAME_X_DISPLAY (f));
+  x_catch_errors (FRAME_X_DISPLAY (f));
 
   if (win == FRAME_X_DISPLAY_INFO (f)->root_window)
     win = FRAME_OUTER_WINDOW (f);
@@ -668,7 +666,7 @@
       had_errors = x_had_errors_p (FRAME_X_DISPLAY (f));
     }
 
-  x_uncatch_errors (FRAME_X_DISPLAY (f), count);
+  x_uncatch_errors (FRAME_X_DISPLAY (f));
 
   UNBLOCK_INPUT;
 
@@ -946,7 +944,6 @@
   Display *dpy = FRAME_X_DISPLAY (f);
   Cursor cursor, nontext_cursor, mode_cursor, hand_cursor;
   Cursor hourglass_cursor, horizontal_drag_cursor;
-  int count;
   unsigned long pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
   unsigned long mask_color = x->background_pixel;
 
@@ -963,7 +960,7 @@
   BLOCK_INPUT;
 
   /* It's not okay to crash if the user selects a screwy cursor.  */
-  count = x_catch_errors (dpy);
+  x_catch_errors (dpy);
 
   if (!NILP (Vx_pointer_shape))
     {
@@ -1024,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, count);
+  x_uncatch_errors (dpy);
 
   {
     XColor fore_color, back_color;
@@ -3441,13 +3438,12 @@
 {
   struct frame *f = check_x_frame (frame);
   Display *dpy = FRAME_X_DISPLAY (f);
-  int count;
 
   BLOCK_INPUT;
-  count = x_catch_errors (dpy);
+  x_catch_errors (dpy);
   XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
 		  RevertToParent, CurrentTime);
-  x_uncatch_errors (dpy, count);
+  x_uncatch_errors (dpy);
   UNBLOCK_INPUT;
 
   return Qnil;