aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey <[email protected]>2006-07-29 18:41:57 +0000
committerKaroly Lorentey <[email protected]>2006-07-29 18:41:57 +0000
commite6aee454e682e137d5b04116716d308c1d5c3544 (patch)
tree2dd86fbdc8e51e61645c3167c9c5f5f6dd4ad8c7
parentd7a0175d426200fb931fa5e5ded5b890726ecd23 (diff)
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: [email protected]/emacs--multi-tty--0--patch-576
-rw-r--r--src/eval.c10
-rw-r--r--src/xterm.c3
-rw-r--r--src/xterm.h1
3 files changed, 13 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 0d7a6a3103..c8ad9004c4 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1261,8 +1261,12 @@ unwind_to_catch (catch, value)
#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 @@ internal_condition_case (bfun, handlers, hfun)
/* 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 @@ internal_condition_case_1 (bfun, arg, handlers, hfun)
/* 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 @@ internal_condition_case_2 (bfun, nargs, args, handlers, hfun)
/* 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;
diff --git a/src/xterm.c b/src/xterm.c
index 9c0b25b08b..5df7896a2b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7615,6 +7615,8 @@ x_clear_errors (dpy)
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 @@ x_fully_uncatch_errors ()
while (x_error_message)
x_uncatch_errors ();
}
+#endif
/* Nonzero if x_catch_errors has been done and not yet canceled. */
diff --git a/src/xterm.h b/src/xterm.h
index 4580f3c074..6bbcdc6389 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -975,7 +975,6 @@ extern int x_had_errors_p P_ ((Display *));
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));