diff options
| author | Chong Yidong | 2012-03-12 14:34:32 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-03-12 14:34:32 +0800 |
| commit | d1f55f1668a70cc196509d11c7c92d22b1aa5ee7 (patch) | |
| tree | 2567fe42029508f35af68d6254be163d6f5e81f5 /src | |
| parent | dbbc2e69e4fb3b8278a33fb3f5256786b18e8180 (diff) | |
| download | emacs-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/ChangeLog | 9 | ||||
| -rw-r--r-- | src/eval.c | 8 | ||||
| -rw-r--r-- | src/lisp.h | 1 | ||||
| -rw-r--r-- | src/window.c | 7 | ||||
| -rw-r--r-- | src/window.h | 4 | ||||
| -rw-r--r-- | src/xfns.c | 7 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-03-11 Chong Yidong <cyd@gnu.org> | 10 | 2012-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 | ||
| 125 | int handling_signal; | 125 | int 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. */ | ||
| 131 | Lisp_Object inhibit_lisp_code; | ||
| 132 | |||
| 127 | static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); | 133 | static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); |
| 128 | static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; | 134 | static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; |
| 129 | static int interactive_p (int); | 135 | static 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; | |||
| 2937 | extern Lisp_Object Qand_rest; | 2937 | extern Lisp_Object Qand_rest; |
| 2938 | extern Lisp_Object Vautoload_queue; | 2938 | extern Lisp_Object Vautoload_queue; |
| 2939 | extern Lisp_Object Vsignaling_function; | 2939 | extern Lisp_Object Vsignaling_function; |
| 2940 | extern Lisp_Object inhibit_lisp_code; | ||
| 2940 | extern int handling_signal; | 2941 | extern int handling_signal; |
| 2941 | #if BYTE_MARK_STACK | 2942 | #if BYTE_MARK_STACK |
| 2942 | extern struct catchtag *catchlist; | 2943 | extern 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. */ |
| 123 | static Lisp_Object Qwindow_configuration_change_hook; | 123 | static Lisp_Object Qwindow_configuration_change_hook; |
| 124 | 124 | ||
| 125 | /* If non-nil, run_window_configuration_change_hook does nothing. */ | ||
| 126 | Lisp_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 */ |
| 129 | static int window_scroll_pixel_based_preserve_x; | 126 | static int window_scroll_pixel_based_preserve_x; |
| 130 | static int window_scroll_pixel_based_preserve_y; | 127 | static 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. |
| 6534 | The function is called with one argument, the buffer to be displayed. | 6529 | The 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 | ||
| 811 | extern Lisp_Object Vmouse_event; | 811 | extern Lisp_Object Vmouse_event; |
| 812 | 812 | ||
| 813 | /* If non-nil, run_window_configuration_change_hook does nothing. */ | ||
| 814 | |||
| 815 | extern Lisp_Object inhibit_window_configuration_change_hook; | ||
| 816 | |||
| 817 | EXFUN (Fnext_window, 3); | 813 | EXFUN (Fnext_window, 3); |
| 818 | EXFUN (Fselect_window, 2); | 814 | EXFUN (Fselect_window, 2); |
| 819 | EXFUN (Fset_window_buffer, 3); | 815 | EXFUN (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) | |||
| 2952 | static Lisp_Object | 2952 | static Lisp_Object |
| 2953 | unwind_create_frame_1 (Lisp_Object val) | 2953 | unwind_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) |