]> git.eshelyaron.com Git - emacs.git/commitdiff
* frame.c (Qnoelisp): New symbol.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 10 Feb 2008 21:56:38 +0000 (21:56 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 10 Feb 2008 21:56:38 +0000 (21:56 +0000)
(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'.

src/ChangeLog
src/frame.c
src/frame.h
src/terminal.c
src/xterm.c

index 67f281919a9ae41e70ab2b7ae43fa9f36787771d..782b2de8086947cc19acd9b1563081745aabf916 100644 (file)
@@ -1,5 +1,12 @@
 2008-02-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * 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'.
+
        * lisp.h (struct Lisp_Misc_Any, struct Lisp_Marker)
        (struct Lisp_Overlay, struct Lisp_Kboard_Objfwd)
        (struct Lisp_Save_Value, struct Lisp_Free): Use enum Lisp_Misc_Type
index fec911f4b0c5c64a6b839c0f27892d25cdbe82f4..3328b307cbfbc444ea9ad56c6ba77b2e893098c4 100644 (file)
@@ -76,6 +76,7 @@ Lisp_Object Qx, Qw32, Qmac, Qpc;
 Lisp_Object Qvisible;
 Lisp_Object Qdisplay_type;
 Lisp_Object Qbackground_mode;
+Lisp_Object Qnoelisp;
 
 Lisp_Object Qx_frame_parameter;
 Lisp_Object Qx_resource_name;
@@ -1406,10 +1407,10 @@ But FORCE inhibits this too.  */)
     }
 
   /* Run `delete-frame-functions'
-     unless FORCE is true or frame is a tooltip.
-     FORCE is set when handling a disconnect from the terminal,
+     unless FORCE is `noelisp' or frame is a tooltip.
+     FORCE is set to `noelisp' when handling a disconnect from the terminal,
      so we don't dare call Lisp code.  */
-  if (!NILP (Vrun_hooks) && NILP (force)
+  if (!NILP (Vrun_hooks) && EQ (force, Qnoelisp)
       && NILP (Fframe_parameter (frame, intern ("tooltip"))))
     {
       Lisp_Object args[2];
@@ -4395,6 +4396,8 @@ syms_of_frame ()
   staticpro (&Qdisplay_type);
   Qbackground_mode = intern ("background-mode");
   staticpro (&Qbackground_mode);
+  Qnoelisp = intern ("noelisp");
+  staticpro (&Qnoelisp);
   Qtty_color_mode = intern ("tty-color-mode");
   staticpro (&Qtty_color_mode);
   Qtty = intern ("tty");
index 5b02b3304403686817371ed75490fad5141f369b..b0b7cc383d350ae03c1b093dac792166fb12648f 100644 (file)
@@ -795,6 +795,7 @@ typedef struct frame *FRAME_PTR;
 extern Lisp_Object Qframep, Qframe_live_p;
 extern Lisp_Object Qtty, Qtty_type;
 extern Lisp_Object Qterminal, Qterminal_live_p;
+extern Lisp_Object Qnoelisp;
 
 extern struct frame *last_nonminibuf_frame;
 
index 914db8818f393cb7f97db67e6749416cc23acbee..2e0bcbb45a6fda28a27cefb7df52cfb7adbcd1b4 100644 (file)
@@ -271,6 +271,7 @@ delete_terminal (struct terminal *terminal)
       struct frame *f = XFRAME (frame);
       if (FRAME_LIVE_P (f) && f->terminal == terminal)
         {
+         /* Maybe this should pass Qnoelisp rather than Qt?  */
           Fdelete_frame (frame, Qt);
         }
     }
index 840c874950bf4412d9a7f2a4dba49c52d491f5d0..418e59448e9d8bd888a9ec0d429312328463f533 100644 (file)
@@ -8062,7 +8062,7 @@ x_connection_closed (dpy, error_message)
          && FRAME_X_P (XFRAME (minibuf_frame))
          && ! EQ (frame, minibuf_frame)
          && FRAME_X_DISPLAY_INFO (XFRAME (minibuf_frame)) == dpyinfo)
-       Fdelete_frame (frame, Qt);
+       Fdelete_frame (frame, Qnoelisp);
     }
 
   /* Now delete all remaining frames on the dead display.
@@ -8075,7 +8075,7 @@ x_connection_closed (dpy, error_message)
        /* Set this to t so that Fdelete_frame won't get confused
           trying to find a replacement.  */
        FRAME_KBOARD (XFRAME (frame))->Vdefault_minibuffer_frame = Qt;
-       Fdelete_frame (frame, Qt);
+       Fdelete_frame (frame, Qnoelisp);
       }
 
   /* We have to close the display to inform Xt that it doesn't
@@ -8087,7 +8087,7 @@ x_connection_closed (dpy, error_message)
      M-x make-frame-on-display RET :1 RET
 
      will indefinitely wait in Xt for events for display `:1', opened
-     in the first class to make-frame-on-display.
+     in the first call to make-frame-on-display.
 
      Closing the display is reported to lead to a bus error on
      OpenWindows in certain situations.  I suspect that is a bug