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.
+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).
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);
staticpro (&Vsignaling_function);
Vsignaling_function = Qnil;
+ inhibit_lisp_code = Qnil;
+
defsubr (&Sor);
defsubr (&Sand);
defsubr (&Sif);
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;
/* 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;
= 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. */
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.
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);
static Lisp_Object
unwind_create_frame_1 (Lisp_Object val)
{
- inhibit_window_configuration_change_hook = val;
+ inhibit_lisp_code = val;
return Qnil;
}
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)