Mercurial > emacs
diff src/xterm.c @ 93369:ed10c3092847
* 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.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 29 Mar 2008 01:46:10 +0000 |
parents | e3c5f1568f5c |
children | 5901a9d70af5 |
line wrap: on
line diff
--- a/src/xterm.c Sat Mar 29 01:09:45 2008 +0000 +++ b/src/xterm.c Sat Mar 29 01:46:10 2008 +0000 @@ -8144,7 +8144,11 @@ /* 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 @@ 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); }