aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2008-02-10 21:56:38 +0000
committerStefan Monnier2008-02-10 21:56:38 +0000
commitc53956feade4a83a7f3a18379aa83657f8976aa1 (patch)
tree257f9db5691c03795986df1a44c9449127309521 /src
parentf1914c4078082de71933f6cdf7735411e488d045 (diff)
downloademacs-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/ChangeLog7
-rw-r--r--src/frame.c9
-rw-r--r--src/frame.h1
-rw-r--r--src/terminal.c1
-rw-r--r--src/xterm.c6
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 @@
12008-02-10 Stefan Monnier <monnier@iro.umontreal.ca> 12008-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;
76Lisp_Object Qvisible; 76Lisp_Object Qvisible;
77Lisp_Object Qdisplay_type; 77Lisp_Object Qdisplay_type;
78Lisp_Object Qbackground_mode; 78Lisp_Object Qbackground_mode;
79Lisp_Object Qnoelisp;
79 80
80Lisp_Object Qx_frame_parameter; 81Lisp_Object Qx_frame_parameter;
81Lisp_Object Qx_resource_name; 82Lisp_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;
795extern Lisp_Object Qframep, Qframe_live_p; 795extern Lisp_Object Qframep, Qframe_live_p;
796extern Lisp_Object Qtty, Qtty_type; 796extern Lisp_Object Qtty, Qtty_type;
797extern Lisp_Object Qterminal, Qterminal_live_p; 797extern Lisp_Object Qterminal, Qterminal_live_p;
798extern Lisp_Object Qnoelisp;
798 799
799extern struct frame *last_nonminibuf_frame; 800extern 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