Commit 3a45383a authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

Use INTERNAL_FIELD for windows.

* src/window.h (WVAR): New macro.
(struct window): Change Lisp_Object members to INTERNAL_FIELD.
* src/alloc.c, src/buffer.c, src/composite.c, src/dispextern.h:
* src/dispnew.c, src/editfns.c, src/fileio.c, src/font.c, src/fontset.c:
* src/frame.c, src/frame.h, src/fringe.c, src/indent.c, src/insdel.c:
* src/keyboard.c, src/keymap.c, src/lisp.h, src/minibuf.c, src/nsterm.m:
* src/print.c, src/textprop.c, src/w32fns.c, src/w32menu.c, src/w32term.c:
* src/window.c, src/xdisp.c, src/xfaces.c, src/xfns.c, src/xmenu.c:
* src/xterm.c: Users changed.
* admin/coccinelle/window.cocci: Semantic patch to replace direct
access to Lisp_Object members of struct window to WVAR.
parent c1dbc63c
2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
* coccinelle/window.cocci: Semantic patch to replace direct
access to Lisp_Object members of struct window to WVAR.
2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
* coccinelle/frame.cocci: Semantic patch to replace direct
......
// Change direct access to Lisp_Object fields of struct window to WVAR.
@@
struct window *W;
Lisp_Object O;
@@
(
- W->frame
+ WVAR (W, frame)
|
- W->next
+ WVAR (W, next)
|
- W->prev
+ WVAR (W, prev)
|
- W->hchild
+ WVAR (W, hchild)
|
- W->vchild
+ WVAR (W, vchild)
|
- W->parent
+ WVAR (W, parent)
|
- W->left_col
+ WVAR (W, left_col)
|
- W->top_line
+ WVAR (W, top_line)
|
- W->total_lines
+ WVAR (W, total_lines)
|
- W->total_cols
+ WVAR (W, total_cols)
|
- W->normal_lines
+ WVAR (W, normal_lines)
|
- W->normal_cols
+ WVAR (W, normal_cols)
|
- W->new_total
+ WVAR (W, new_total)
|
- W->new_normal
+ WVAR (W, new_normal)
|
- W->buffer
+ WVAR (W, buffer)
|
- W->start
+ WVAR (W, start)
|
- W->pointm
+ WVAR (W, pointm)
|
- W->temslot
+ WVAR (W, temslot)
|
- W->vertical_scroll_bar
+ WVAR (W, vertical_scroll_bar)
|
- W->left_margin_cols
+ WVAR (W, left_margin_cols)
|
- W->right_margin_cols
+ WVAR (W, right_margin_cols)
|
- W->left_fringe_width
+ WVAR (W, left_fringe_width)
|
- W->right_fringe_width
+ WVAR (W, right_fringe_width)
|
- W->scroll_bar_width
+ WVAR (W, scroll_bar_width)
|
- W->vertical_scroll_bar_type
+ WVAR (W, vertical_scroll_bar_type)
|
- W->window_end_pos
+ WVAR (W, window_end_pos)
|
- W->window_end_vpos
+ WVAR (W, window_end_vpos)
|
- W->window_end_valid
+ WVAR (W, window_end_valid)
|
- W->display_table
+ WVAR (W, display_table)
|
- W->dedicated
+ WVAR (W, dedicated)
|
- W->base_line_number
+ WVAR (W, base_line_number)
|
- W->base_line_pos
+ WVAR (W, base_line_pos)
|
- W->region_showing
+ WVAR (W, region_showing)
|
- W->column_number_displayed
+ WVAR (W, column_number_displayed)
|
- W->redisplay_end_trigger
+ WVAR (W, redisplay_end_trigger)
|
- W->combination_limit
+ WVAR (W, combination_limit)
|
- W->prev_buffers
+ WVAR (W, prev_buffers)
|
- W->next_buffers
+ WVAR (W, next_buffers)
|
- W->window_parameters
+ WVAR (W, window_parameters)
|
- XWINDOW (O)->frame
+ WVAR (XWINDOW (O), frame)
|
- XWINDOW (O)->next
+ WVAR (XWINDOW (O), next)
|
- XWINDOW (O)->prev
+ WVAR (XWINDOW (O), prev)
|
- XWINDOW (O)->hchild
+ WVAR (XWINDOW (O), hchild)
|
- XWINDOW (O)->vchild
+ WVAR (XWINDOW (O), vchild)
|
- XWINDOW (O)->parent
+ WVAR (XWINDOW (O), parent)
|
- XWINDOW (O)->left_col
+ WVAR (XWINDOW (O), left_col)
|
- XWINDOW (O)->top_line
+ WVAR (XWINDOW (O), top_line)
|
- XWINDOW (O)->total_lines
+ WVAR (XWINDOW (O), total_lines)
|
- XWINDOW (O)->total_cols
+ WVAR (XWINDOW (O), total_cols)
|
- XWINDOW (O)->normal_lines
+ WVAR (XWINDOW (O), normal_lines)
|
- XWINDOW (O)->normal_cols
+ WVAR (XWINDOW (O), normal_cols)
|
- XWINDOW (O)->new_total
+ WVAR (XWINDOW (O), new_total)
|
- XWINDOW (O)->new_normal
+ WVAR (XWINDOW (O), new_normal)
|
- XWINDOW (O)->buffer
+ WVAR (XWINDOW (O), buffer)
|
- XWINDOW (O)->start
+ WVAR (XWINDOW (O), start)
|
- XWINDOW (O)->pointm
+ WVAR (XWINDOW (O), pointm)
|
- XWINDOW (O)->temslot
+ WVAR (XWINDOW (O), temslot)
|
- XWINDOW (O)->vertical_scroll_bar
+ WVAR (XWINDOW (O), vertical_scroll_bar)
|
- XWINDOW (O)->left_margin_cols
+ WVAR (XWINDOW (O), left_margin_cols)
|
- XWINDOW (O)->right_margin_cols
+ WVAR (XWINDOW (O), right_margin_cols)
|
- XWINDOW (O)->left_fringe_width
+ WVAR (XWINDOW (O), left_fringe_width)
|
- XWINDOW (O)->right_fringe_width
+ WVAR (XWINDOW (O), right_fringe_width)
|
- XWINDOW (O)->scroll_bar_width
+ WVAR (XWINDOW (O), scroll_bar_width)
|
- XWINDOW (O)->vertical_scroll_bar_type
+ WVAR (XWINDOW (O), vertical_scroll_bar_type)
|
- XWINDOW (O)->window_end_pos
+ WVAR (XWINDOW (O), window_end_pos)
|
- XWINDOW (O)->window_end_vpos
+ WVAR (XWINDOW (O), window_end_vpos)
|
- XWINDOW (O)->window_end_valid
+ WVAR (XWINDOW (O), window_end_valid)
|
- XWINDOW (O)->display_table
+ WVAR (XWINDOW (O), display_table)
|
- XWINDOW (O)->dedicated
+ WVAR (XWINDOW (O), dedicated)
|
- XWINDOW (O)->base_line_number
+ WVAR (XWINDOW (O), base_line_number)
|
- XWINDOW (O)->base_line_pos
+ WVAR (XWINDOW (O), base_line_pos)
|
- XWINDOW (O)->region_showing
+ WVAR (XWINDOW (O), region_showing)
|
- XWINDOW (O)->column_number_displayed
+ WVAR (XWINDOW (O), column_number_displayed)
|
- XWINDOW (O)->redisplay_end_trigger
+ WVAR (XWINDOW (O), redisplay_end_trigger)
|
- XWINDOW (O)->combination_limit
+ WVAR (XWINDOW (O), combination_limit)
|
- XWINDOW (O)->prev_buffers
+ WVAR (XWINDOW (O), prev_buffers)
|
- XWINDOW (O)->next_buffers
+ WVAR (XWINDOW (O), next_buffers)
|
- XWINDOW (O)->window_parameters
+ WVAR (XWINDOW (O), window_parameters)
)
2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
Use INTERNAL_FIELD for windows.
* window.h (WVAR): New macro.
(struct window): Change Lisp_Object members to INTERNAL_FIELD.
* alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
* fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
* insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
* textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
* xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
 
* coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
......@@ -63,9 +74,9 @@
(KVAR): Change to use INTERNAL_FIELD.
* frame.h (FVAR): New macro.
(struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
* alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c
* fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c
* term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h,
* alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
* fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
* term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
* xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
 
2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
......
......@@ -6020,7 +6020,8 @@ mark_object (Lisp_Object arg)
/* Mark glyphs for leaf windows. Marking window
matrices is sufficient because frame matrices
use the same glyph memory. */
if (NILP (w->hchild) && NILP (w->vchild) && w->current_matrix)
if (NILP (WVAR (w, hchild)) && NILP (WVAR (w, vchild))
&& w->current_matrix)
{
mark_glyph_matrix (w->current_matrix);
mark_glyph_matrix (w->desired_matrix);
......
......@@ -1557,7 +1557,7 @@ cleaning up all windows currently displaying the buffer to be killed. */)
since anything can happen within do_yes_or_no_p. */
/* Don't kill the minibuffer now current. */
if (EQ (buffer, XWINDOW (minibuf_window)->buffer))
if (EQ (buffer, WVAR (XWINDOW (minibuf_window), buffer)))
return Qnil;
/* When we kill an ordinary buffer which shares it's buffer text
......@@ -1608,7 +1608,7 @@ cleaning up all windows currently displaying the buffer to be killed. */)
/* If the buffer now current is shown in the minibuffer and our buffer
is the sole other buffer give up. */
XSETBUFFER (tem, current_buffer);
if (EQ (tem, XWINDOW (minibuf_window)->buffer)
if (EQ (tem, WVAR (XWINDOW (minibuf_window), buffer))
&& EQ (buffer, Fother_buffer (buffer, Qnil, Qnil)))
return Qnil;
......@@ -2190,12 +2190,13 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
while (NILP (Fmemq (w, ws)))
{
ws = Fcons (w, ws);
if (MARKERP (XWINDOW (w)->pointm)
&& (EQ (XWINDOW (w)->buffer, buf1)
|| EQ (XWINDOW (w)->buffer, buf2)))
Fset_marker (XWINDOW (w)->pointm,
make_number (BUF_BEGV (XBUFFER (XWINDOW (w)->buffer))),
XWINDOW (w)->buffer);
if (MARKERP (WVAR (XWINDOW (w), pointm))
&& (EQ (WVAR (XWINDOW (w), buffer), buf1)
|| EQ (WVAR (XWINDOW (w), buffer), buf2)))
Fset_marker (WVAR (XWINDOW (w), pointm),
make_number
(BUF_BEGV (XBUFFER (WVAR (XWINDOW (w), buffer)))),
WVAR (XWINDOW (w), buffer));
w = Fnext_window (w, Qt, Qt);
}
}
......@@ -3671,7 +3672,7 @@ modify_overlay (struct buffer *buf, ptrdiff_t start, ptrdiff_t end)
/* If this is a buffer not in the selected window,
we must do other windows. */
if (buf != XBUFFER (XWINDOW (selected_window)->buffer))
if (buf != XBUFFER (WVAR (XWINDOW (selected_window), buffer)))
windows_or_buffers_changed = 1;
/* If multiple windows show this buffer, we must do other windows. */
else if (buffer_shared > 1)
......
......@@ -906,7 +906,7 @@ static Lisp_Object
autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t limit, struct window *win, struct face *face, Lisp_Object string)
{
ptrdiff_t count = SPECPDL_INDEX ();
FRAME_PTR f = XFRAME (win->frame);
FRAME_PTR f = XFRAME (WVAR (win, frame));
Lisp_Object pos = make_number (charpos);
ptrdiff_t to;
ptrdiff_t pt = PT, pt_byte = PT_BYTE;
......@@ -942,7 +942,7 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t
}
else
#endif /* not HAVE_WINDOW_SYSTEM */
font_object = win->frame;
font_object = WVAR (win, frame);
lgstring = Fcomposition_get_gstring (pos, make_number (to), font_object,
string);
if (NILP (LGSTRING_ID (lgstring)))
......
......@@ -1374,7 +1374,7 @@ struct glyph_string
? current_mode_line_height \
: (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
: estimate_mode_line_height (XFRAME ((W)->frame), \
: estimate_mode_line_height (XFRAME (WVAR (W, frame)), \
CURRENT_MODE_LINE_FACE_ID (W))))
/* Return the current height of the header line of window W. If not
......@@ -1387,7 +1387,7 @@ struct glyph_string
? current_header_line_height \
: (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
: estimate_mode_line_height (XFRAME ((W)->frame), \
: estimate_mode_line_height (XFRAME (WVAR (W, frame)),\
HEADER_LINE_FACE_ID)))
/* Return the height of the desired mode line of window W. */
......@@ -1406,8 +1406,8 @@ struct glyph_string
(!MINI_WINDOW_P ((W)) \
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
&& BUFFERP ((W)->buffer) \
&& !NILP (BVAR (XBUFFER ((W)->buffer), mode_line_format)) \
&& BUFFERP (WVAR (W, buffer)) \
&& !NILP (BVAR (XBUFFER (WVAR (W, buffer)), mode_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1)
/* Value is non-zero if window W wants a header line. */
......@@ -1416,9 +1416,10 @@ struct glyph_string
(!MINI_WINDOW_P ((W)) \
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
&& BUFFERP ((W)->buffer) \
&& !NILP (BVAR (XBUFFER ((W)->buffer), header_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1 + !NILP (BVAR (XBUFFER ((W)->buffer), mode_line_format)))
&& BUFFERP (WVAR (W, buffer)) \
&& !NILP (BVAR (XBUFFER (WVAR (W, buffer)), header_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1 \
+ !NILP (BVAR (XBUFFER (WVAR (W, buffer)), mode_line_format)))
/* Return proper value to be used as baseline offset of font that has
......
This diff is collapsed.
......@@ -366,7 +366,7 @@ get_pos_property (Lisp_Object position, register Lisp_Object prop, Lisp_Object o
if (NILP (object))
XSETBUFFER (object, current_buffer);
else if (WINDOWP (object))
object = XWINDOW (object)->buffer;
object = WVAR (XWINDOW (object), buffer);
if (!BUFFERP (object))
/* pos-property only makes sense in buffers right now, since strings
......@@ -821,7 +821,7 @@ This function does not move point. */)
Lisp_Object
save_excursion_save (void)
{
int visible = (XBUFFER (XWINDOW (selected_window)->buffer)
int visible = (XBUFFER (WVAR (XWINDOW (selected_window), buffer))
== current_buffer);
return Fcons (Fpoint_marker (),
......@@ -874,7 +874,7 @@ save_excursion_restore (Lisp_Object info)
and cleaner never to alter the window/buffer connections. */
tem1 = Fcar (tem);
if (!NILP (tem1)
&& current_buffer != XBUFFER (XWINDOW (selected_window)->buffer))
&& current_buffer != XBUFFER (WVAR (XWINDOW (selected_window), buffer)))
Fswitch_to_buffer (Fcurrent_buffer (), Qnil);
#endif /* 0 */
......@@ -907,7 +907,7 @@ save_excursion_restore (Lisp_Object info)
tem = XCDR (info);
if (visible_p
&& !EQ (tem, selected_window)
&& (tem1 = XWINDOW (tem)->buffer,
&& (tem1 = WVAR (XWINDOW (tem), buffer),
(/* Window is live... */
BUFFERP (tem1)
/* ...and it shows the current buffer. */
......
......@@ -3731,7 +3731,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
/* If display currently starts at beginning of line,
keep it that way. */
if (XBUFFER (XWINDOW (selected_window)->buffer) == current_buffer)
if (XBUFFER (WVAR (XWINDOW (selected_window), buffer)) == current_buffer)
XWINDOW (selected_window)->start_at_line_beg = !NILP (Fbolp ());
replace_handled = 1;
......@@ -3888,7 +3888,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
/* If display currently starts at beginning of line,
keep it that way. */
if (XBUFFER (XWINDOW (selected_window)->buffer) == current_buffer)
if (XBUFFER (WVAR (XWINDOW (selected_window), buffer)) == current_buffer)
XWINDOW (selected_window)->start_at_line_beg = !NILP (Fbolp ());
/* Replace the chars that we need to replace,
......
......@@ -3665,7 +3665,7 @@ font_at (int c, ptrdiff_t pos, struct face *face, struct window *w,
}
}
f = XFRAME (w->frame);
f = XFRAME (WVAR (w, frame));
if (! FRAME_WINDOW_P (f))
return Qnil;
if (! face)
......@@ -3723,7 +3723,7 @@ font_range (ptrdiff_t pos, ptrdiff_t *limit, struct window *w, struct face *face
face_id = face_at_buffer_position (w, pos, 0, 0, &ignore,
*limit, 0, -1);
face = FACE_FROM_ID (XFRAME (w->frame), face_id);
face = FACE_FROM_ID (XFRAME (WVAR (w, frame)), face_id);
}
}
else
......
......@@ -1841,7 +1841,7 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0,
if (NILP (window))
return Qnil;
w = XWINDOW (window);
f = XFRAME (w->frame);
f = XFRAME (WVAR (w, frame));
face_id = face_at_buffer_position (w, pos, -1, -1, &dummy,
pos + 100, 0, -1);
}
......
......@@ -132,15 +132,15 @@ set_menu_bar_lines_1 (Lisp_Object window, int n)
struct window *w = XWINDOW (window);
w->last_modified = 0;
XSETFASTINT (w->top_line, XFASTINT (w->top_line) + n);
XSETFASTINT (w->total_lines, XFASTINT (w->total_lines) - n);
XSETFASTINT (WVAR (w, top_line), XFASTINT (WVAR (w, top_line)) + n);
XSETFASTINT (WVAR (w, total_lines), XFASTINT (WVAR (w, total_lines)) - n);
/* Handle just the top child in a vertical split. */
if (!NILP (w->vchild))
set_menu_bar_lines_1 (w->vchild, n);
if (!NILP (WVAR (w, vchild)))
set_menu_bar_lines_1 (WVAR (w, vchild), n);
/* Adjust all children in a horizontal split. */
for (window = w->hchild; !NILP (window); window = w->next)
for (window = WVAR (w, hchild); !NILP (window); window = WVAR (w, next))
{
w = XWINDOW (window);
set_menu_bar_lines_1 (window, n);
......@@ -289,20 +289,20 @@ make_frame (int mini_p)
if (mini_p)
{
mini_window = make_window ();
XWINDOW (root_window)->next = mini_window;
XWINDOW (mini_window)->prev = root_window;
WVAR (XWINDOW (root_window), next) = mini_window;
WVAR (XWINDOW (mini_window), prev) = root_window;
XWINDOW (mini_window)->mini = 1;
XWINDOW (mini_window)->frame = frame;
WVAR (XWINDOW (mini_window), frame) = frame;
FVAR (f, minibuffer_window) = mini_window;
}
else
{
mini_window = Qnil;
XWINDOW (root_window)->next = Qnil;
WVAR (XWINDOW (root_window), next) = Qnil;
FVAR (f, minibuffer_window) = Qnil;
}
XWINDOW (root_window)->frame = frame;
WVAR (XWINDOW (root_window), frame) = frame;
/* 10 is arbitrary,
just so that there is "something there."
......@@ -311,21 +311,21 @@ make_frame (int mini_p)
SET_FRAME_COLS (f, 10);
FRAME_LINES (f) = 10;
XSETFASTINT (XWINDOW (root_window)->total_cols, 10);
XSETFASTINT (XWINDOW (root_window)->total_lines, (mini_p ? 9 : 10));
XSETFASTINT (WVAR (XWINDOW (root_window), total_cols), 10);
XSETFASTINT (WVAR (XWINDOW (root_window), total_lines), (mini_p ? 9 : 10));
if (mini_p)
{
XSETFASTINT (XWINDOW (mini_window)->total_cols, 10);
XSETFASTINT (XWINDOW (mini_window)->top_line, 9);
XSETFASTINT (XWINDOW (mini_window)->total_lines, 1);
XSETFASTINT (WVAR (XWINDOW (mini_window), total_cols), 10);
XSETFASTINT (WVAR (XWINDOW (mini_window), top_line), 9);
XSETFASTINT (WVAR (XWINDOW (mini_window), total_lines), 1);
}
/* Choose a buffer for the frame's root window. */
{
Lisp_Object buf;
XWINDOW (root_window)->buffer = Qt;
WVAR (XWINDOW (root_window), buffer) = Qt;
buf = Fcurrent_buffer ();
/* If buf is a 'hidden' buffer (i.e. one whose name starts with
a space), try to find another one. */
......@@ -344,7 +344,7 @@ make_frame (int mini_p)
if (mini_p)
{
XWINDOW (mini_window)->buffer = Qt;
WVAR (XWINDOW (mini_window), buffer) = Qt;
set_window_buffer (mini_window,
(NILP (Vminibuffer_list)
? get_minibuffer (0)
......@@ -376,7 +376,7 @@ make_frame_without_minibuffer (register Lisp_Object mini_window, KBOARD *kb, Lis
CHECK_LIVE_WINDOW (mini_window);
if (!NILP (mini_window)
&& FRAME_KBOARD (XFRAME (XWINDOW (mini_window)->frame)) != kb)
&& FRAME_KBOARD (XFRAME (WVAR (XWINDOW (mini_window), frame))) != kb)
error ("Frame and minibuffer must be on the same terminal");
/* Make a frame containing just a root window. */
......@@ -406,7 +406,7 @@ make_frame_without_minibuffer (register Lisp_Object mini_window, KBOARD *kb, Lis
/* Make the chosen minibuffer window display the proper minibuffer,
unless it is already showing a minibuffer. */
if (NILP (Fmemq (XWINDOW (mini_window)->buffer, Vminibuffer_list)))
if (NILP (Fmemq (WVAR (XWINDOW (mini_window), buffer), Vminibuffer_list)))
Fset_window_buffer (mini_window,
(NILP (Vminibuffer_list)
? get_minibuffer (0)
......@@ -439,9 +439,9 @@ make_minibuffer_frame (void)
mini_window = FVAR (f, minibuffer_window) = FVAR (f, root_window);
XWINDOW (mini_window)->mini = 1;
XWINDOW (mini_window)->next = Qnil;
XWINDOW (mini_window)->prev = Qnil;
XWINDOW (mini_window)->frame = frame;
WVAR (XWINDOW (mini_window), next) = Qnil;
WVAR (XWINDOW (mini_window), prev) = Qnil;
WVAR (XWINDOW (mini_window), frame) = frame;
/* Put the proper buffer in that window. */
......@@ -1241,7 +1241,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
if (EQ (FVAR (f, minibuffer_window), minibuf_window))
{
Fset_window_buffer (FVAR (sf, minibuffer_window),
XWINDOW (minibuf_window)->buffer, Qnil);
WVAR (XWINDOW (minibuf_window), buffer), Qnil);
minibuf_window = FVAR (sf, minibuffer_window);
/* If the dying minibuffer window was selected,
......@@ -1672,17 +1672,17 @@ make_frame_visible_1 (Lisp_Object window)
{
struct window *w;
for (;!NILP (window); window = w->next)
for (;!NILP (window); window = WVAR (w, next))
{
w = XWINDOW (window);
if (!NILP (w->buffer))
BVAR (XBUFFER (w->buffer), display_time) = Fcurrent_time ();
if (!NILP (WVAR (w, buffer)))
BVAR (XBUFFER (WVAR (w, buffer)), display_time) = Fcurrent_time ();
if (!NILP (w->vchild))
make_frame_visible_1 (w->vchild);
if (!NILP (w->hchild))
make_frame_visible_1 (w->hchild);
if (!NILP (WVAR (w, vchild)))
make_frame_visible_1 (WVAR (w, vchild));
if (!NILP (WVAR (w, hchild)))
make_frame_visible_1 (WVAR (w, hchild));
}
}
......@@ -1714,7 +1714,7 @@ displayed in the terminal. */)
{
struct frame *sf = XFRAME (selected_frame);
Fset_window_buffer (FVAR (sf, minibuffer_window),
XWINDOW (minibuf_window)->buffer, Qnil);
WVAR (XWINDOW (minibuf_window), buffer), Qnil);
minibuf_window = FVAR (sf, minibuffer_window);
}
......@@ -1752,7 +1752,7 @@ If omitted, FRAME defaults to the currently selected frame. */)
{
struct frame *sf = XFRAME (selected_frame);
Fset_window_buffer (FVAR (sf, minibuffer_window),
XWINDOW (minibuf_window)->buffer, Qnil);
WVAR (XWINDOW (minibuf_window), buffer), Qnil);
minibuf_window = FVAR (sf, minibuffer_window);
}
......