Mercurial > emacs
comparison src/xterm.c @ 90370:e3bacb89536a
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-46
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 157-163)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 58-61)
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 19 Mar 2006 19:43:57 +0000 |
parents | a802c5505156 1ea752831737 |
children | e6bf73e43cf4 |
comparison
equal
deleted
inserted
replaced
90369:88810aee3a45 | 90370:e3bacb89536a |
---|---|
7587 void | 7587 void |
7588 x_uncatch_errors () | 7588 x_uncatch_errors () |
7589 { | 7589 { |
7590 struct x_error_message_stack *tmp; | 7590 struct x_error_message_stack *tmp; |
7591 | 7591 |
7592 BLOCK_INPUT; | |
7593 | |
7592 /* The display may have been closed before this function is called. | 7594 /* The display may have been closed before this function is called. |
7593 Check if it is still open before calling XSync. */ | 7595 Check if it is still open before calling XSync. */ |
7594 if (x_display_info_for_display (x_error_message->dpy) != 0) | 7596 if (x_display_info_for_display (x_error_message->dpy) != 0) |
7595 { | 7597 XSync (x_error_message->dpy, False); |
7596 BLOCK_INPUT; | |
7597 XSync (x_error_message->dpy, False); | |
7598 UNBLOCK_INPUT; | |
7599 } | |
7600 | 7598 |
7601 tmp = x_error_message; | 7599 tmp = x_error_message; |
7602 x_error_message = x_error_message->prev; | 7600 x_error_message = x_error_message->prev; |
7603 xfree (tmp); | 7601 xfree (tmp); |
7602 UNBLOCK_INPUT; | |
7604 } | 7603 } |
7605 | 7604 |
7606 /* If any X protocol errors have arrived since the last call to | 7605 /* If any X protocol errors have arrived since the last call to |
7607 x_catch_errors or x_check_errors, signal an Emacs error using | 7606 x_catch_errors or x_check_errors, signal an Emacs error using |
7608 sprintf (a buffer, FORMAT, the x error message text) as the text. */ | 7607 sprintf (a buffer, FORMAT, the x error message text) as the text. */ |
10341 mask >>= 1; | 10340 mask >>= 1; |
10342 } | 10341 } |
10343 | 10342 |
10344 *offset = off; | 10343 *offset = off; |
10345 *bits = nr; | 10344 *bits = nr; |
10345 } | |
10346 | |
10347 int | |
10348 x_display_ok (display) | |
10349 const char * display; | |
10350 { | |
10351 int dpy_ok = 1; | |
10352 Display *dpy; | |
10353 | |
10354 if (!display) | |
10355 display = getenv("DISPLAY"); | |
10356 if (!display) | |
10357 return 0; | |
10358 | |
10359 if ((dpy = XOpenDisplay (display))) | |
10360 XCloseDisplay (dpy); | |
10361 else | |
10362 dpy_ok = 0; | |
10363 return dpy_ok; | |
10346 } | 10364 } |
10347 | 10365 |
10348 struct x_display_info * | 10366 struct x_display_info * |
10349 x_term_init (display_name, xrm_option, resource_name) | 10367 x_term_init (display_name, xrm_option, resource_name) |
10350 Lisp_Object display_name; | 10368 Lisp_Object display_name; |