Mercurial > emacs
changeset 83536:0014f454c421
Fix x_catch_errors-related abort after X disconnects. (Reported by Dan Nicolaescu).
* src/xterm.h: Remove declaration for x_fully_uncatch_errors.
* src/xterm.c (x_fully_uncatch_errors): Disable definition.
* src/eval.c (unwind_to_catch): Don't call x_fully_uncatch_errors.
(internal_condition_case, internal_condition_case_1)
(internal_condition_case_2): Don't abort when x_catching_errors.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-576
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sat, 29 Jul 2006 18:41:57 +0000 |
parents | 6c8cebe86511 |
children | c19f348befac |
files | src/eval.c src/xterm.c src/xterm.h |
diffstat | 3 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/eval.c Sat Jul 29 10:51:50 2006 +0000 +++ b/src/eval.c Sat Jul 29 18:41:57 2006 +0000 @@ -1261,8 +1261,12 @@ #if HAVE_X_WINDOWS /* If x_catch_errors was done, turn it off now. (First we give unbind_to a chance to do that.) */ +#if 0 /* This would disable x_catch_errors after x_connection_closed. + * The catch must remain in effect during that delicate + * state. --lorentey */ x_fully_uncatch_errors (); #endif +#endif byte_stack_list = catch->byte_stack; gcprolist = catch->gcpro; @@ -1439,10 +1443,12 @@ /* Since Fsignal will close off all calls to x_catch_errors, we will get the wrong results if some are not closed now. */ +#if 0 /* Fsignal doesn't do that anymore. --lorentey */ #if HAVE_X_WINDOWS if (x_catching_errors ()) abort (); #endif +#endif c.tag = Qnil; c.val = Qnil; @@ -1487,10 +1493,12 @@ /* Since Fsignal will close off all calls to x_catch_errors, we will get the wrong results if some are not closed now. */ +#if 0 /* Fsignal doesn't do that anymore. --lorentey */ #if HAVE_X_WINDOWS if (x_catching_errors ()) abort (); #endif +#endif c.tag = Qnil; c.val = Qnil; @@ -1538,10 +1546,12 @@ /* Since Fsignal will close off all calls to x_catch_errors, we will get the wrong results if some are not closed now. */ +#if 0 /* Fsignal doesn't do that anymore. --lorentey */ #if HAVE_X_WINDOWS if (x_catching_errors ()) abort (); #endif +#endif c.tag = Qnil; c.val = Qnil;
--- a/src/xterm.c Sat Jul 29 10:51:50 2006 +0000 +++ b/src/xterm.c Sat Jul 29 18:41:57 2006 +0000 @@ -7615,6 +7615,8 @@ x_error_message->string[0] = 0; } +#if 0 /* See comment in unwind_to_catch why calling this is a bad + * idea. --lorentey */ /* Close off all unclosed x_catch_errors calls. */ void @@ -7623,6 +7625,7 @@ while (x_error_message) x_uncatch_errors (); } +#endif /* Nonzero if x_catch_errors has been done and not yet canceled. */
--- a/src/xterm.h Sat Jul 29 10:51:50 2006 +0000 +++ b/src/xterm.h Sat Jul 29 18:41:57 2006 +0000 @@ -975,7 +975,6 @@ extern int x_catching_errors P_ ((void)); extern void x_uncatch_errors P_ ((void)); extern void x_clear_errors P_ ((Display *)); -extern void x_fully_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));