diff options
author | Stefan Monnier <[email protected]> | 2008-03-29 01:46:10 +0000 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2008-03-29 01:46:10 +0000 |
commit | 58555d8187f3425f69e57316cfcd296f8fe08433 (patch) | |
tree | 6483ae1ed8053ad2f3ec7c41241a2e7ab443a5f1 /src/xterm.c | |
parent | 769087cead629d7ad1fd5cfc15ce75625a78e6b3 (diff) |
* keyboard.c (pending_funcalls): New var.
(timer_check): Run it.
(syms_of_keyboard): Initialize it.
* terminal.c (Qrun_hook_with_args, Qdelete_terminal_functions)
(Vdelete_terminal_functions): New vars.
(syms_of_terminal): Initialize them.
(Fdelete_terminal): Run delete-terminal-functions.
* xdisp.c (safe_eval): Rewrite.
(safe_call2): New fun.
* frame.c (Qdelete_frame_functions): New var.
(syms_of_frame): Initialize it.
(Fdelete_frame): Use it and use safe_call2 and pending_funcalls.
* lisp.h (safe_call2, pending_funcalls): Declare.
Diffstat (limited to 'src/xterm.c')
-rw-r--r-- | src/xterm.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/xterm.c b/src/xterm.c index f8ef761c5f..147e492e7d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8144,7 +8144,11 @@ x_connection_closed (dpy, error_message) /* We have just closed all frames on this display. */ abort (); - x_delete_display (dpyinfo); + { + Lisp_Object tmp; + XSETTERMINAL (tmp, dpyinfo->terminal); + Fdelete_terminal (tmp, Qnoelisp); + } } x_uncatch_errors (); @@ -8165,10 +8169,9 @@ x_connection_closed (dpy, error_message) unbind_to (index, Qnil); clear_waiting_for_input (); - /* FIXME: This is an asynchronous interrupt w.r.t elisp, so signalling an - error might not be the best thing to do. I'd vote for creating an - elisp event and stuffing it in the queue so people can bind to it via - the global map. --Stef */ + /* Here, we absolutely have to use a non-local exit (e.g. signal, throw, + longjmp), because returning from this function would get us back into + Xlib's code which will directly call `exit'. */ error ("%s", error_msg); } |