aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2012-03-12 14:34:32 +0800
committerChong Yidong2012-03-12 14:34:32 +0800
commitd1f55f1668a70cc196509d11c7c92d22b1aa5ee7 (patch)
tree2567fe42029508f35af68d6254be163d6f5e81f5 /src
parentdbbc2e69e4fb3b8278a33fb3f5256786b18e8180 (diff)
downloademacs-d1f55f1668a70cc196509d11c7c92d22b1aa5ee7.tar.gz
emacs-d1f55f1668a70cc196509d11c7c92d22b1aa5ee7.zip
Rename inhibit_window_configuration_change_hook to inhibit_lisp_code.
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/eval.c8
-rw-r--r--src/lisp.h1
-rw-r--r--src/window.c7
-rw-r--r--src/window.h4
-rw-r--r--src/xfns.c7
6 files changed, 22 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0bcbf4e269a..07cc8dac1b3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12012-03-12 Chong Yidong <cyd@gnu.org>
2
3 * eval.c (inhibit_lisp_code): Rename from
4 inhibit_window_configuration_change_hook; move from window.c.
5
6 * xfns.c (unwind_create_frame_1, Fx_create_frame):
7 * window.c (run_window_configuration_change_hook)
8 (syms_of_window): Callers changed.
9
12012-03-11 Chong Yidong <cyd@gnu.org> 102012-03-11 Chong Yidong <cyd@gnu.org>
2 11
3 * keymap.c (Fkey_description): Doc fix (Bug#9700). 12 * keymap.c (Fkey_description): Doc fix (Bug#9700).
diff --git a/src/eval.c b/src/eval.c
index 344228741cb..4a3f5083b3b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -124,6 +124,12 @@ Lisp_Object Vsignaling_function;
124 124
125int handling_signal; 125int handling_signal;
126 126
127/* If non-nil, Lisp code must not be run since some part of Emacs is
128 in an inconsistent state. Currently, x-create-frame uses this to
129 avoid triggering window-configuration-change-hook while the new
130 frame is half-initialized. */
131Lisp_Object inhibit_lisp_code;
132
127static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); 133static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *);
128static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; 134static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN;
129static int interactive_p (int); 135static int interactive_p (int);
@@ -3766,6 +3772,8 @@ alist of active lexical bindings. */);
3766 staticpro (&Vsignaling_function); 3772 staticpro (&Vsignaling_function);
3767 Vsignaling_function = Qnil; 3773 Vsignaling_function = Qnil;
3768 3774
3775 inhibit_lisp_code = Qnil;
3776
3769 defsubr (&Sor); 3777 defsubr (&Sor);
3770 defsubr (&Sand); 3778 defsubr (&Sand);
3771 defsubr (&Sif); 3779 defsubr (&Sif);
diff --git a/src/lisp.h b/src/lisp.h
index 36f58d05b42..bd19da55b2a 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2937,6 +2937,7 @@ extern Lisp_Object Qinhibit_quit, Qclosure;
2937extern Lisp_Object Qand_rest; 2937extern Lisp_Object Qand_rest;
2938extern Lisp_Object Vautoload_queue; 2938extern Lisp_Object Vautoload_queue;
2939extern Lisp_Object Vsignaling_function; 2939extern Lisp_Object Vsignaling_function;
2940extern Lisp_Object inhibit_lisp_code;
2940extern int handling_signal; 2941extern int handling_signal;
2941#if BYTE_MARK_STACK 2942#if BYTE_MARK_STACK
2942extern struct catchtag *catchlist; 2943extern struct catchtag *catchlist;
diff --git a/src/window.c b/src/window.c
index be40e53f6b9..bcbf0ad2bde 100644
--- a/src/window.c
+++ b/src/window.c
@@ -122,9 +122,6 @@ static int window_initialized;
122/* Hook to run when window config changes. */ 122/* Hook to run when window config changes. */
123static Lisp_Object Qwindow_configuration_change_hook; 123static Lisp_Object Qwindow_configuration_change_hook;
124 124
125/* If non-nil, run_window_configuration_change_hook does nothing. */
126Lisp_Object inhibit_window_configuration_change_hook;
127
128/* Used by the function window_scroll_pixel_based */ 125/* Used by the function window_scroll_pixel_based */
129static int window_scroll_pixel_based_preserve_x; 126static int window_scroll_pixel_based_preserve_x;
130static int window_scroll_pixel_based_preserve_y; 127static int window_scroll_pixel_based_preserve_y;
@@ -2897,7 +2894,7 @@ run_window_configuration_change_hook (struct frame *f)
2897 = Fdefault_value (Qwindow_configuration_change_hook); 2894 = Fdefault_value (Qwindow_configuration_change_hook);
2898 XSETFRAME (frame, f); 2895 XSETFRAME (frame, f);
2899 2896
2900 if (NILP (Vrun_hooks) || !NILP (inhibit_window_configuration_change_hook)) 2897 if (NILP (Vrun_hooks) || !NILP (inhibit_lisp_code))
2901 return; 2898 return;
2902 2899
2903 /* Use the right buffer. Matters when running the local hooks. */ 2900 /* Use the right buffer. Matters when running the local hooks. */
@@ -6527,8 +6524,6 @@ syms_of_window (void)
6527 window_scroll_preserve_hpos = -1; 6524 window_scroll_preserve_hpos = -1;
6528 window_scroll_preserve_vpos = -1; 6525 window_scroll_preserve_vpos = -1;
6529 6526
6530 inhibit_window_configuration_change_hook = Qnil;
6531
6532 DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function, 6527 DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
6533 doc: /* Non-nil means call as function to display a help buffer. 6528 doc: /* Non-nil means call as function to display a help buffer.
6534The function is called with one argument, the buffer to be displayed. 6529The function is called with one argument, the buffer to be displayed.
diff --git a/src/window.h b/src/window.h
index f4a5f52b9a5..ea127ca95a8 100644
--- a/src/window.h
+++ b/src/window.h
@@ -810,10 +810,6 @@ extern Lisp_Object Vmouse_window;
810 810
811extern Lisp_Object Vmouse_event; 811extern Lisp_Object Vmouse_event;
812 812
813/* If non-nil, run_window_configuration_change_hook does nothing. */
814
815extern Lisp_Object inhibit_window_configuration_change_hook;
816
817EXFUN (Fnext_window, 3); 813EXFUN (Fnext_window, 3);
818EXFUN (Fselect_window, 2); 814EXFUN (Fselect_window, 2);
819EXFUN (Fset_window_buffer, 3); 815EXFUN (Fset_window_buffer, 3);
diff --git a/src/xfns.c b/src/xfns.c
index 6fcd129e4a4..6f08ada1bb9 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2952,7 +2952,7 @@ unwind_create_frame (Lisp_Object frame)
2952static Lisp_Object 2952static Lisp_Object
2953unwind_create_frame_1 (Lisp_Object val) 2953unwind_create_frame_1 (Lisp_Object val)
2954{ 2954{
2955 inhibit_window_configuration_change_hook = val; 2955 inhibit_lisp_code = val;
2956 return Qnil; 2956 return Qnil;
2957} 2957}
2958 2958
@@ -3337,9 +3337,8 @@ This function is an internal primitive--use `make-frame' instead. */)
3337 Vframe_list. */ 3337 Vframe_list. */
3338 { 3338 {
3339 int count2 = SPECPDL_INDEX (); 3339 int count2 = SPECPDL_INDEX ();
3340 record_unwind_protect (unwind_create_frame_1, 3340 record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code);
3341 inhibit_window_configuration_change_hook); 3341 inhibit_lisp_code = Qt;
3342 inhibit_window_configuration_change_hook = Qt;
3343 3342
3344 x_default_parameter (f, parms, Qmenu_bar_lines, 3343 x_default_parameter (f, parms, Qmenu_bar_lines,
3345 NILP (Vmenu_bar_mode) 3344 NILP (Vmenu_bar_mode)