diff options
| author | Stefan Monnier | 2008-02-10 21:56:38 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-02-10 21:56:38 +0000 |
| commit | c53956feade4a83a7f3a18379aa83657f8976aa1 (patch) | |
| tree | 257f9db5691c03795986df1a44c9449127309521 /src | |
| parent | f1914c4078082de71933f6cdf7735411e488d045 (diff) | |
| download | emacs-c53956feade4a83a7f3a18379aa83657f8976aa1.tar.gz emacs-c53956feade4a83a7f3a18379aa83657f8976aa1.zip | |
* frame.c (Qnoelisp): New symbol.
(syms_of_frame): Initialize it.
(Fdelete_frame): Use it to distinguish a mere `force' passed from
someharmles Elisp code, from a strong `force' from x_connection_closed.
* frame.h (Qnoelisp): Declare.
* xterm.c (x_connection_closed): Pass `noelisp'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/frame.c | 9 | ||||
| -rw-r--r-- | src/frame.h | 1 | ||||
| -rw-r--r-- | src/terminal.c | 1 | ||||
| -rw-r--r-- | src/xterm.c | 6 |
5 files changed, 18 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 67f281919a9..782b2de8086 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2008-02-10 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2008-02-10 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * frame.c (Qnoelisp): New symbol. | ||
| 4 | (syms_of_frame): Initialize it. | ||
| 5 | (Fdelete_frame): Use it to distinguish a mere `force' passed from | ||
| 6 | someharmles Elisp code, from a strong `force' from x_connection_closed. | ||
| 7 | * frame.h (Qnoelisp): Declare. | ||
| 8 | * xterm.c (x_connection_closed): Pass `noelisp'. | ||
| 9 | |||
| 3 | * lisp.h (struct Lisp_Misc_Any, struct Lisp_Marker) | 10 | * lisp.h (struct Lisp_Misc_Any, struct Lisp_Marker) |
| 4 | (struct Lisp_Overlay, struct Lisp_Kboard_Objfwd) | 11 | (struct Lisp_Overlay, struct Lisp_Kboard_Objfwd) |
| 5 | (struct Lisp_Save_Value, struct Lisp_Free): Use enum Lisp_Misc_Type | 12 | (struct Lisp_Save_Value, struct Lisp_Free): Use enum Lisp_Misc_Type |
diff --git a/src/frame.c b/src/frame.c index fec911f4b0c..3328b307cbf 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -76,6 +76,7 @@ Lisp_Object Qx, Qw32, Qmac, Qpc; | |||
| 76 | Lisp_Object Qvisible; | 76 | Lisp_Object Qvisible; |
| 77 | Lisp_Object Qdisplay_type; | 77 | Lisp_Object Qdisplay_type; |
| 78 | Lisp_Object Qbackground_mode; | 78 | Lisp_Object Qbackground_mode; |
| 79 | Lisp_Object Qnoelisp; | ||
| 79 | 80 | ||
| 80 | Lisp_Object Qx_frame_parameter; | 81 | Lisp_Object Qx_frame_parameter; |
| 81 | Lisp_Object Qx_resource_name; | 82 | Lisp_Object Qx_resource_name; |
| @@ -1406,10 +1407,10 @@ But FORCE inhibits this too. */) | |||
| 1406 | } | 1407 | } |
| 1407 | 1408 | ||
| 1408 | /* Run `delete-frame-functions' | 1409 | /* Run `delete-frame-functions' |
| 1409 | unless FORCE is true or frame is a tooltip. | 1410 | unless FORCE is `noelisp' or frame is a tooltip. |
| 1410 | FORCE is set when handling a disconnect from the terminal, | 1411 | FORCE is set to `noelisp' when handling a disconnect from the terminal, |
| 1411 | so we don't dare call Lisp code. */ | 1412 | so we don't dare call Lisp code. */ |
| 1412 | if (!NILP (Vrun_hooks) && NILP (force) | 1413 | if (!NILP (Vrun_hooks) && EQ (force, Qnoelisp) |
| 1413 | && NILP (Fframe_parameter (frame, intern ("tooltip")))) | 1414 | && NILP (Fframe_parameter (frame, intern ("tooltip")))) |
| 1414 | { | 1415 | { |
| 1415 | Lisp_Object args[2]; | 1416 | Lisp_Object args[2]; |
| @@ -4395,6 +4396,8 @@ syms_of_frame () | |||
| 4395 | staticpro (&Qdisplay_type); | 4396 | staticpro (&Qdisplay_type); |
| 4396 | Qbackground_mode = intern ("background-mode"); | 4397 | Qbackground_mode = intern ("background-mode"); |
| 4397 | staticpro (&Qbackground_mode); | 4398 | staticpro (&Qbackground_mode); |
| 4399 | Qnoelisp = intern ("noelisp"); | ||
| 4400 | staticpro (&Qnoelisp); | ||
| 4398 | Qtty_color_mode = intern ("tty-color-mode"); | 4401 | Qtty_color_mode = intern ("tty-color-mode"); |
| 4399 | staticpro (&Qtty_color_mode); | 4402 | staticpro (&Qtty_color_mode); |
| 4400 | Qtty = intern ("tty"); | 4403 | Qtty = intern ("tty"); |
diff --git a/src/frame.h b/src/frame.h index 5b02b330440..b0b7cc383d3 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -795,6 +795,7 @@ typedef struct frame *FRAME_PTR; | |||
| 795 | extern Lisp_Object Qframep, Qframe_live_p; | 795 | extern Lisp_Object Qframep, Qframe_live_p; |
| 796 | extern Lisp_Object Qtty, Qtty_type; | 796 | extern Lisp_Object Qtty, Qtty_type; |
| 797 | extern Lisp_Object Qterminal, Qterminal_live_p; | 797 | extern Lisp_Object Qterminal, Qterminal_live_p; |
| 798 | extern Lisp_Object Qnoelisp; | ||
| 798 | 799 | ||
| 799 | extern struct frame *last_nonminibuf_frame; | 800 | extern struct frame *last_nonminibuf_frame; |
| 800 | 801 | ||
diff --git a/src/terminal.c b/src/terminal.c index 914db8818f3..2e0bcbb45a6 100644 --- a/src/terminal.c +++ b/src/terminal.c | |||
| @@ -271,6 +271,7 @@ delete_terminal (struct terminal *terminal) | |||
| 271 | struct frame *f = XFRAME (frame); | 271 | struct frame *f = XFRAME (frame); |
| 272 | if (FRAME_LIVE_P (f) && f->terminal == terminal) | 272 | if (FRAME_LIVE_P (f) && f->terminal == terminal) |
| 273 | { | 273 | { |
| 274 | /* Maybe this should pass Qnoelisp rather than Qt? */ | ||
| 274 | Fdelete_frame (frame, Qt); | 275 | Fdelete_frame (frame, Qt); |
| 275 | } | 276 | } |
| 276 | } | 277 | } |
diff --git a/src/xterm.c b/src/xterm.c index 840c874950b..418e59448e9 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -8062,7 +8062,7 @@ x_connection_closed (dpy, error_message) | |||
| 8062 | && FRAME_X_P (XFRAME (minibuf_frame)) | 8062 | && FRAME_X_P (XFRAME (minibuf_frame)) |
| 8063 | && ! EQ (frame, minibuf_frame) | 8063 | && ! EQ (frame, minibuf_frame) |
| 8064 | && FRAME_X_DISPLAY_INFO (XFRAME (minibuf_frame)) == dpyinfo) | 8064 | && FRAME_X_DISPLAY_INFO (XFRAME (minibuf_frame)) == dpyinfo) |
| 8065 | Fdelete_frame (frame, Qt); | 8065 | Fdelete_frame (frame, Qnoelisp); |
| 8066 | } | 8066 | } |
| 8067 | 8067 | ||
| 8068 | /* Now delete all remaining frames on the dead display. | 8068 | /* Now delete all remaining frames on the dead display. |
| @@ -8075,7 +8075,7 @@ x_connection_closed (dpy, error_message) | |||
| 8075 | /* Set this to t so that Fdelete_frame won't get confused | 8075 | /* Set this to t so that Fdelete_frame won't get confused |
| 8076 | trying to find a replacement. */ | 8076 | trying to find a replacement. */ |
| 8077 | FRAME_KBOARD (XFRAME (frame))->Vdefault_minibuffer_frame = Qt; | 8077 | FRAME_KBOARD (XFRAME (frame))->Vdefault_minibuffer_frame = Qt; |
| 8078 | Fdelete_frame (frame, Qt); | 8078 | Fdelete_frame (frame, Qnoelisp); |
| 8079 | } | 8079 | } |
| 8080 | 8080 | ||
| 8081 | /* We have to close the display to inform Xt that it doesn't | 8081 | /* We have to close the display to inform Xt that it doesn't |
| @@ -8087,7 +8087,7 @@ x_connection_closed (dpy, error_message) | |||
| 8087 | M-x make-frame-on-display RET :1 RET | 8087 | M-x make-frame-on-display RET :1 RET |
| 8088 | 8088 | ||
| 8089 | will indefinitely wait in Xt for events for display `:1', opened | 8089 | will indefinitely wait in Xt for events for display `:1', opened |
| 8090 | in the first class to make-frame-on-display. | 8090 | in the first call to make-frame-on-display. |
| 8091 | 8091 | ||
| 8092 | Closing the display is reported to lead to a bus error on | 8092 | Closing the display is reported to lead to a bus error on |
| 8093 | OpenWindows in certain situations. I suspect that is a bug | 8093 | OpenWindows in certain situations. I suspect that is a bug |