diff options
Diffstat (limited to 'src/xfns.c')
| -rw-r--r-- | src/xfns.c | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/src/xfns.c b/src/xfns.c index f00335b5d03..6fcd129e4a4 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2949,6 +2949,12 @@ unwind_create_frame (Lisp_Object frame) | |||
| 2949 | return Qnil; | 2949 | return Qnil; |
| 2950 | } | 2950 | } |
| 2951 | 2951 | ||
| 2952 | static Lisp_Object | ||
| 2953 | unwind_create_frame_1 (Lisp_Object val) | ||
| 2954 | { | ||
| 2955 | inhibit_window_configuration_change_hook = val; | ||
| 2956 | return Qnil; | ||
| 2957 | } | ||
| 2952 | 2958 | ||
| 2953 | static void | 2959 | static void |
| 2954 | x_default_font_parameter (struct frame *f, Lisp_Object parms) | 2960 | x_default_font_parameter (struct frame *f, Lisp_Object parms) |
| @@ -3321,17 +3327,31 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3321 | happen. */ | 3327 | happen. */ |
| 3322 | init_frame_faces (f); | 3328 | init_frame_faces (f); |
| 3323 | 3329 | ||
| 3324 | /* The X resources controlling the menu-bar and tool-bar are | 3330 | /* Set the menu-bar-lines and tool-bar-lines parameters. We don't |
| 3325 | processed specially at startup, and reflected in the mode | 3331 | look up the X resources controlling the menu-bar and tool-bar |
| 3326 | variables; ignore them here. */ | 3332 | here; they are processed specially at startup, and reflected in |
| 3327 | x_default_parameter (f, parms, Qmenu_bar_lines, | 3333 | the values of the mode variables. |
| 3328 | NILP (Vmenu_bar_mode) | 3334 | |
| 3329 | ? make_number (0) : make_number (1), | 3335 | Avoid calling window-configuration-change-hook; otherwise we |
| 3330 | NULL, NULL, RES_TYPE_NUMBER); | 3336 | could get an infloop in next_frame since the frame is not yet in |
| 3331 | x_default_parameter (f, parms, Qtool_bar_lines, | 3337 | Vframe_list. */ |
| 3332 | NILP (Vtool_bar_mode) | 3338 | { |
| 3333 | ? make_number (0) : make_number (1), | 3339 | int count2 = SPECPDL_INDEX (); |
| 3334 | NULL, NULL, RES_TYPE_NUMBER); | 3340 | record_unwind_protect (unwind_create_frame_1, |
| 3341 | inhibit_window_configuration_change_hook); | ||
| 3342 | inhibit_window_configuration_change_hook = Qt; | ||
| 3343 | |||
| 3344 | x_default_parameter (f, parms, Qmenu_bar_lines, | ||
| 3345 | NILP (Vmenu_bar_mode) | ||
| 3346 | ? make_number (0) : make_number (1), | ||
| 3347 | NULL, NULL, RES_TYPE_NUMBER); | ||
| 3348 | x_default_parameter (f, parms, Qtool_bar_lines, | ||
| 3349 | NILP (Vtool_bar_mode) | ||
| 3350 | ? make_number (0) : make_number (1), | ||
| 3351 | NULL, NULL, RES_TYPE_NUMBER); | ||
| 3352 | |||
| 3353 | unbind_to (count2, Qnil); | ||
| 3354 | } | ||
| 3335 | 3355 | ||
| 3336 | x_default_parameter (f, parms, Qbuffer_predicate, Qnil, | 3356 | x_default_parameter (f, parms, Qbuffer_predicate, Qnil, |
| 3337 | "bufferPredicate", "BufferPredicate", | 3357 | "bufferPredicate", "BufferPredicate", |