Mercurial > emacs
comparison src/xterm.c @ 49054:6b6ac8aa78d2
(x_catch_errors): Save dpy using make_save_value.
(x_catch_errors_unwind): Call XSync.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 06 Jan 2003 00:45:31 +0000 |
parents | c44793510100 |
children | f8288cd7d1cd |
comparison
equal
deleted
inserted
replaced
49053:2990b2f8bfb5 | 49054:6b6ac8aa78d2 |
---|---|
12177 int count = SPECPDL_INDEX (); | 12177 int count = SPECPDL_INDEX (); |
12178 | 12178 |
12179 /* Make sure any errors from previous requests have been dealt with. */ | 12179 /* Make sure any errors from previous requests have been dealt with. */ |
12180 XSync (dpy, False); | 12180 XSync (dpy, False); |
12181 | 12181 |
12182 record_unwind_protect (x_catch_errors_unwind, x_error_message_string); | 12182 record_unwind_protect (x_catch_errors_unwind, |
12183 Fcons (make_save_value (dpy, 0), | |
12184 x_error_message_string)); | |
12183 | 12185 |
12184 x_error_message_string = make_uninit_string (X_ERROR_MESSAGE_SIZE); | 12186 x_error_message_string = make_uninit_string (X_ERROR_MESSAGE_SIZE); |
12185 SSET (x_error_message_string, 0, 0); | 12187 SSET (x_error_message_string, 0, 0); |
12186 | 12188 |
12187 return count; | 12189 return count; |
12191 | 12193 |
12192 static Lisp_Object | 12194 static Lisp_Object |
12193 x_catch_errors_unwind (old_val) | 12195 x_catch_errors_unwind (old_val) |
12194 Lisp_Object old_val; | 12196 Lisp_Object old_val; |
12195 { | 12197 { |
12196 x_error_message_string = old_val; | 12198 Lisp_Object first; |
12199 | |
12200 first = XCAR (old_val); | |
12201 | |
12202 XSync (XSAVE_VALUE (first)->pointer, False); | |
12203 | |
12204 x_error_message_string = XCDR (old_val); | |
12197 return Qnil; | 12205 return Qnil; |
12198 } | 12206 } |
12199 | 12207 |
12200 /* If any X protocol errors have arrived since the last call to | 12208 /* If any X protocol errors have arrived since the last call to |
12201 x_catch_errors or x_check_errors, signal an Emacs error using | 12209 x_catch_errors or x_check_errors, signal an Emacs error using |