]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename inhibit_window_configuration_change_hook to inhibit_lisp_code.
authorChong Yidong <cyd@gnu.org>
Mon, 12 Mar 2012 06:34:32 +0000 (14:34 +0800)
committerChong Yidong <cyd@gnu.org>
Mon, 12 Mar 2012 06:34:32 +0000 (14:34 +0800)
This is a tweak to 2012-02-23T07:28:21Z!cyd@gnu.org, suggested by Stefan.

* eval.c (inhibit_lisp_code): Rename from
inhibit_window_configuration_change_hook; move from window.c.

* xfns.c (unwind_create_frame_1, Fx_create_frame):
* window.c (run_window_configuration_change_hook)
(syms_of_window): Callers changed.

src/ChangeLog
src/eval.c
src/lisp.h
src/window.c
src/window.h
src/xfns.c

index 0bcbf4e269a9e959651169f1b2ed8890c6517bdf..07cc8dac1b3c5fdd0d7f9c980eb76a4e0302abb5 100644 (file)
@@ -1,3 +1,12 @@
+2012-03-12  Chong Yidong  <cyd@gnu.org>
+
+       * eval.c (inhibit_lisp_code): Rename from
+       inhibit_window_configuration_change_hook; move from window.c.
+
+       * xfns.c (unwind_create_frame_1, Fx_create_frame):
+       * window.c (run_window_configuration_change_hook)
+       (syms_of_window): Callers changed.
+
 2012-03-11  Chong Yidong  <cyd@gnu.org>
 
        * keymap.c (Fkey_description): Doc fix (Bug#9700).
index 344228741cbd6d084b109e092892259e4f6d8cd3..4a3f5083b3b88a0f66cd5d3e556b98a5d4b1f07e 100644 (file)
@@ -124,6 +124,12 @@ Lisp_Object Vsignaling_function;
 
 int handling_signal;
 
+/* If non-nil, Lisp code must not be run since some part of Emacs is
+   in an inconsistent state.  Currently, x-create-frame uses this to
+   avoid triggering window-configuration-change-hook while the new
+   frame is half-initialized.  */
+Lisp_Object inhibit_lisp_code;
+
 static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *);
 static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN;
 static int interactive_p (int);
@@ -3766,6 +3772,8 @@ alist of active lexical bindings.  */);
   staticpro (&Vsignaling_function);
   Vsignaling_function = Qnil;
 
+  inhibit_lisp_code = Qnil;
+
   defsubr (&Sor);
   defsubr (&Sand);
   defsubr (&Sif);
index 36f58d05b42305460a012c1a9e783cf6053fb154..bd19da55b2a1492bd0cf4d2891333f85f947e6d7 100644 (file)
@@ -2937,6 +2937,7 @@ extern Lisp_Object Qinhibit_quit, Qclosure;
 extern Lisp_Object Qand_rest;
 extern Lisp_Object Vautoload_queue;
 extern Lisp_Object Vsignaling_function;
+extern Lisp_Object inhibit_lisp_code;
 extern int handling_signal;
 #if BYTE_MARK_STACK
 extern struct catchtag *catchlist;
index be40e53f6b9ee01a7296c0bdb975db40c0ff08af..bcbf0ad2bdec589f447639a917002277c693d184 100644 (file)
@@ -122,9 +122,6 @@ static int window_initialized;
 /* Hook to run when window config changes.  */
 static Lisp_Object Qwindow_configuration_change_hook;
 
-/* If non-nil, run_window_configuration_change_hook does nothing.  */
-Lisp_Object inhibit_window_configuration_change_hook;
-
 /* Used by the function window_scroll_pixel_based */
 static int window_scroll_pixel_based_preserve_x;
 static int window_scroll_pixel_based_preserve_y;
@@ -2897,7 +2894,7 @@ run_window_configuration_change_hook (struct frame *f)
     = Fdefault_value (Qwindow_configuration_change_hook);
   XSETFRAME (frame, f);
 
-  if (NILP (Vrun_hooks) || !NILP (inhibit_window_configuration_change_hook))
+  if (NILP (Vrun_hooks) || !NILP (inhibit_lisp_code))
     return;
 
   /* Use the right buffer.  Matters when running the local hooks.  */
@@ -6527,8 +6524,6 @@ syms_of_window (void)
   window_scroll_preserve_hpos = -1;
   window_scroll_preserve_vpos = -1;
 
-  inhibit_window_configuration_change_hook = Qnil;
-
   DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
               doc: /* Non-nil means call as function to display a help buffer.
 The function is called with one argument, the buffer to be displayed.
index f4a5f52b9a58c0bd592a62ea97579108ef6335a9..ea127ca95a80ed51f2713cdde1129f5037b4b731 100644 (file)
@@ -810,10 +810,6 @@ extern Lisp_Object Vmouse_window;
 
 extern Lisp_Object Vmouse_event;
 
-/* If non-nil, run_window_configuration_change_hook does nothing.  */
-
-extern Lisp_Object inhibit_window_configuration_change_hook;
-
 EXFUN (Fnext_window, 3);
 EXFUN (Fselect_window, 2);
 EXFUN (Fset_window_buffer, 3);
index 6fcd129e4a4ccefb912a3e08518d0d9986ba1431..6f08ada1bb92a163b5bab992f1e149c5322cbaec 100644 (file)
@@ -2952,7 +2952,7 @@ unwind_create_frame (Lisp_Object frame)
 static Lisp_Object
 unwind_create_frame_1 (Lisp_Object val)
 {
-  inhibit_window_configuration_change_hook = val;
+  inhibit_lisp_code = val;
   return Qnil;
 }
 
@@ -3337,9 +3337,8 @@ This function is an internal primitive--use `make-frame' instead.  */)
      Vframe_list.  */
   {
     int count2 = SPECPDL_INDEX ();
-    record_unwind_protect (unwind_create_frame_1,
-                          inhibit_window_configuration_change_hook);
-    inhibit_window_configuration_change_hook = Qt;
+    record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code);
+    inhibit_lisp_code = Qt;
 
     x_default_parameter (f, parms, Qmenu_bar_lines,
                         NILP (Vmenu_bar_mode)