- /* Initialize all Lisp data. */
- w->frame = w->mini_p = Qnil;
- w->next = w->prev = w->hchild = w->vchild = w->parent = Qnil;
- XSETFASTINT (w->left_col, 0);
- XSETFASTINT (w->top_line, 0);
- XSETFASTINT (w->total_lines, 0);
- XSETFASTINT (w->total_cols, 0);
- w->normal_lines = make_float (1.0);
- w->normal_cols = make_float (1.0);
- XSETFASTINT (w->new_total, 0);
- XSETFASTINT (w->new_normal, 0);
- w->buffer = Qnil;
- w->start = Fmake_marker ();
- w->pointm = Fmake_marker ();
- w->force_start = w->optional_new_start = Qnil;
- XSETFASTINT (w->hscroll, 0);
- XSETFASTINT (w->min_hscroll, 0);
- XSETFASTINT (w->use_time, 0);
- ++sequence_number;
- XSETFASTINT (w->sequence_number, sequence_number);
- w->temslot = w->last_modified = w->last_overlay_modified = Qnil;
- XSETFASTINT (w->last_point, 0);
- w->last_had_star = w->vertical_scroll_bar = Qnil;
- w->left_margin_cols = w->right_margin_cols = Qnil;
- w->left_fringe_width = w->right_fringe_width = Qnil;
- w->fringes_outside_margins = Qnil;
- w->scroll_bar_width = Qnil;
- w->vertical_scroll_bar_type = Qt;
- w->last_mark_x = w->last_mark_y = Qnil;
- XSETFASTINT (w->window_end_pos, 0);
- XSETFASTINT (w->window_end_vpos, 0);
- w->window_end_valid = w->update_mode_line = Qnil;
- w->start_at_line_beg = w->display_table = w->dedicated = Qnil;
- w->base_line_number = w->base_line_pos = w->region_showing = Qnil;
- w->column_number_displayed = w->redisplay_end_trigger = Qnil;
- w->combination_limit = w->window_parameters = Qnil;
- w->prev_buffers = w->next_buffers = Qnil;
- /* Initialize non-Lisp data. */
- w->desired_matrix = w->current_matrix = 0;
+ /* Initialize Lisp data. Note that allocate_window initializes all
+ Lisp data to nil, so do it only for slots which should not be nil. */
+ wset_left_col (w, make_number (0));
+ wset_top_line (w, make_number (0));
+ wset_total_lines (w, make_number (0));
+ wset_total_cols (w, make_number (0));
+ wset_normal_lines (w, make_float (1.0));
+ wset_normal_cols (w, make_float (1.0));
+ wset_new_total (w, make_number (0));
+ wset_new_normal (w, make_number (0));
+ wset_start (w, Fmake_marker ());
+ wset_pointm (w, Fmake_marker ());
+ wset_vertical_scroll_bar_type (w, Qt);
+ wset_window_end_pos (w, make_number (0));
+ wset_window_end_vpos (w, make_number (0));
+ /* These Lisp fields are marked specially so they're not set to nil by
+ allocate_window. */
+ wset_prev_buffers (w, Qnil);
+ wset_next_buffers (w, Qnil);
+
+ /* Initialize non-Lisp data. Note that allocate_window zeroes out all
+ non-Lisp data, so do it only for slots which should not be zero. */