mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-02 08:22:22 +00:00
Drop WGET and revert read access to Lisp_Objects slots of struct window.
* window.h (WGET): Remove. (struct window): Do not use 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, msdos.c, nsfns.m: * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c: * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
This commit is contained in:
parent
d10a51dcdf
commit
d3d50620ed
@ -1,3 +1,15 @@
|
||||
2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
Drop WGET and revert read access to Lisp_Objects slots of struct window.
|
||||
* window.h (WGET): Remove.
|
||||
(struct window): Do not use 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, msdos.c, nsfns.m:
|
||||
* nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
|
||||
* w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
|
||||
Adjust users.
|
||||
|
||||
2012-08-07 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* window.c (Fwindow_edges, Fwindow_pixel_edges)
|
||||
|
@ -6014,7 +6014,7 @@ 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 (WGET (w, hchild)) && NILP (WGET (w, vchild))
|
||||
if (NILP (w->hchild) && NILP (w->vchild)
|
||||
&& w->current_matrix)
|
||||
{
|
||||
mark_glyph_matrix (w->current_matrix);
|
||||
|
18
src/buffer.c
18
src/buffer.c
@ -1560,7 +1560,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, WGET (XWINDOW (minibuf_window), buffer)))
|
||||
if (EQ (buffer, XWINDOW (minibuf_window)->buffer))
|
||||
return Qnil;
|
||||
|
||||
/* When we kill an ordinary buffer which shares it's buffer text
|
||||
@ -1611,7 +1611,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, WGET (XWINDOW (minibuf_window), buffer))
|
||||
if (EQ (tem, XWINDOW (minibuf_window)->buffer)
|
||||
&& EQ (buffer, Fother_buffer (buffer, Qnil, Qnil)))
|
||||
return Qnil;
|
||||
|
||||
@ -2193,13 +2193,13 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
|
||||
while (NILP (Fmemq (w, ws)))
|
||||
{
|
||||
ws = Fcons (w, ws);
|
||||
if (MARKERP (WGET (XWINDOW (w), pointm))
|
||||
&& (EQ (WGET (XWINDOW (w), buffer), buf1)
|
||||
|| EQ (WGET (XWINDOW (w), buffer), buf2)))
|
||||
Fset_marker (WGET (XWINDOW (w), pointm),
|
||||
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 (WGET (XWINDOW (w), buffer)))),
|
||||
WGET (XWINDOW (w), buffer));
|
||||
(BUF_BEGV (XBUFFER (XWINDOW (w)->buffer))),
|
||||
XWINDOW (w)->buffer);
|
||||
w = Fnext_window (w, Qt, Qt);
|
||||
}
|
||||
}
|
||||
@ -3675,7 +3675,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 (WGET (XWINDOW (selected_window), buffer)))
|
||||
if (buf != XBUFFER (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)
|
||||
|
@ -909,7 +909,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 (WGET (win, frame));
|
||||
FRAME_PTR f = XFRAME (win->frame);
|
||||
Lisp_Object pos = make_number (charpos);
|
||||
ptrdiff_t to;
|
||||
ptrdiff_t pt = PT, pt_byte = PT_BYTE;
|
||||
@ -945,7 +945,7 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t
|
||||
}
|
||||
else
|
||||
#endif /* not HAVE_WINDOW_SYSTEM */
|
||||
font_object = WGET (win, frame);
|
||||
font_object = win->frame;
|
||||
lgstring = Fcomposition_get_gstring (pos, make_number (to), font_object,
|
||||
string);
|
||||
if (NILP (LGSTRING_ID (lgstring)))
|
||||
|
@ -1379,7 +1379,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 (WGET (W, frame)), \
|
||||
: estimate_mode_line_height (XFRAME (W->frame), \
|
||||
CURRENT_MODE_LINE_FACE_ID (W))))
|
||||
|
||||
/* Return the current height of the header line of window W. If not
|
||||
@ -1392,7 +1392,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 (WGET (W, frame)),\
|
||||
: estimate_mode_line_height (XFRAME (W->frame),\
|
||||
HEADER_LINE_FACE_ID)))
|
||||
|
||||
/* Return the height of the desired mode line of window W. */
|
||||
@ -1411,8 +1411,8 @@ struct glyph_string
|
||||
(!MINI_WINDOW_P ((W)) \
|
||||
&& !(W)->pseudo_window_p \
|
||||
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
|
||||
&& BUFFERP (WGET (W, buffer)) \
|
||||
&& !NILP (BVAR (XBUFFER (WGET (W, buffer)), mode_line_format)) \
|
||||
&& BUFFERP (W->buffer) \
|
||||
&& !NILP (BVAR (XBUFFER (W->buffer), mode_line_format)) \
|
||||
&& WINDOW_TOTAL_LINES (W) > 1)
|
||||
|
||||
/* Value is non-zero if window W wants a header line. */
|
||||
@ -1421,10 +1421,10 @@ struct glyph_string
|
||||
(!MINI_WINDOW_P ((W)) \
|
||||
&& !(W)->pseudo_window_p \
|
||||
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
|
||||
&& BUFFERP (WGET (W, buffer)) \
|
||||
&& !NILP (BVAR (XBUFFER (WGET (W, buffer)), header_line_format)) \
|
||||
&& BUFFERP (W->buffer) \
|
||||
&& !NILP (BVAR (XBUFFER (W->buffer), header_line_format)) \
|
||||
&& WINDOW_TOTAL_LINES (W) > 1 \
|
||||
+ !NILP (BVAR (XBUFFER (WGET (W, buffer)), mode_line_format)))
|
||||
+ !NILP (BVAR (XBUFFER (W->buffer), mode_line_format)))
|
||||
|
||||
|
||||
/* Return proper value to be used as baseline offset of font that has
|
||||
|
225
src/dispnew.c
225
src/dispnew.c
@ -245,9 +245,9 @@ add_window_display_history (struct window *w, const char *msg, int paused_p)
|
||||
"%"pMu": window %p (`%s')%s\n%s",
|
||||
history_tick++,
|
||||
w,
|
||||
((BUFFERP (WGET (w, buffer))
|
||||
&& STRINGP (BVAR (XBUFFER (WGET (w, buffer)), name)))
|
||||
? SSDATA (BVAR (XBUFFER (WGET (w, buffer)), name))
|
||||
((BUFFERP (w->buffer)
|
||||
&& STRINGP (BVAR (XBUFFER (w->buffer), name)))
|
||||
? SSDATA (BVAR (XBUFFER (w->buffer), name))
|
||||
: "???"),
|
||||
paused_p ? " ***paused***" : "",
|
||||
msg);
|
||||
@ -385,7 +385,7 @@ margin_glyphs_to_reserve (struct window *w, int total_glyphs, Lisp_Object margin
|
||||
|
||||
if (NUMBERP (margin))
|
||||
{
|
||||
int width = XFASTINT (WGET (w, total_cols));
|
||||
int width = XFASTINT (w->total_cols);
|
||||
double d = max (0, XFLOATINT (margin));
|
||||
d = min (width / 2 - 1, d);
|
||||
n = (int) ((double) total_glyphs / width * d);
|
||||
@ -455,8 +455,8 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
|
||||
the matrix means preventing redisplay. */
|
||||
if (matrix->pool == NULL)
|
||||
{
|
||||
left = margin_glyphs_to_reserve (w, dim.width, WGET (w, left_margin_cols));
|
||||
right = margin_glyphs_to_reserve (w, dim.width, WGET (w, right_margin_cols));
|
||||
left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_cols);
|
||||
right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_cols);
|
||||
eassert (left >= 0 && right >= 0);
|
||||
marginal_areas_changed_p = (left != matrix->left_margin_glyphs
|
||||
|| right != matrix->right_margin_glyphs);
|
||||
@ -495,9 +495,9 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
|
||||
if (w)
|
||||
{
|
||||
left = margin_glyphs_to_reserve (w, dim.width,
|
||||
WGET (w, left_margin_cols));
|
||||
w->left_margin_cols);
|
||||
right = margin_glyphs_to_reserve (w, dim.width,
|
||||
WGET (w, right_margin_cols));
|
||||
w->right_margin_cols);
|
||||
}
|
||||
else
|
||||
left = right = 0;
|
||||
@ -620,8 +620,8 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
|
||||
|
||||
/* Window end is invalid, if inside of the rows that
|
||||
are invalidated below. */
|
||||
if (INTEGERP (WGET (w, window_end_vpos))
|
||||
&& XFASTINT (WGET (w, window_end_vpos)) >= i)
|
||||
if (INTEGERP (w->window_end_vpos)
|
||||
&& XFASTINT (w->window_end_vpos) >= i)
|
||||
WSET (w, window_end_valid, Qnil);
|
||||
|
||||
while (i < matrix->nrows)
|
||||
@ -862,15 +862,15 @@ clear_window_matrices (struct window *w, int desired_p)
|
||||
{
|
||||
while (w)
|
||||
{
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
if (!NILP (w->hchild))
|
||||
{
|
||||
eassert (WINDOWP (WGET (w, hchild)));
|
||||
clear_window_matrices (XWINDOW (WGET (w, hchild)), desired_p);
|
||||
eassert (WINDOWP (w->hchild));
|
||||
clear_window_matrices (XWINDOW (w->hchild), desired_p);
|
||||
}
|
||||
else if (!NILP (WGET (w, vchild)))
|
||||
else if (!NILP (w->vchild))
|
||||
{
|
||||
eassert (WINDOWP (WGET (w, vchild)));
|
||||
clear_window_matrices (XWINDOW (WGET (w, vchild)), desired_p);
|
||||
eassert (WINDOWP (w->vchild));
|
||||
clear_window_matrices (XWINDOW (w->vchild), desired_p);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -883,7 +883,7 @@ clear_window_matrices (struct window *w, int desired_p)
|
||||
}
|
||||
}
|
||||
|
||||
w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
|
||||
w = NILP (w->next) ? 0 : XWINDOW (w->next);
|
||||
}
|
||||
}
|
||||
|
||||
@ -947,7 +947,7 @@ blank_row (struct window *w, struct glyph_row *row, int y)
|
||||
clear_glyph_row (row);
|
||||
row->y = y;
|
||||
row->ascent = row->phys_ascent = 0;
|
||||
row->height = row->phys_height = FRAME_LINE_HEIGHT (XFRAME (WGET (w, frame)));
|
||||
row->height = row->phys_height = FRAME_LINE_HEIGHT (XFRAME (w->frame));
|
||||
row->visible_height = row->height;
|
||||
|
||||
if (row->y < min_y)
|
||||
@ -1493,7 +1493,7 @@ check_matrix_invariants (struct window *w)
|
||||
struct glyph_row *row = matrix->rows;
|
||||
struct glyph_row *last_text_row = NULL;
|
||||
struct buffer *saved = current_buffer;
|
||||
struct buffer *buffer = XBUFFER (WGET (w, buffer));
|
||||
struct buffer *buffer = XBUFFER (w->buffer);
|
||||
int c;
|
||||
|
||||
/* This can sometimes happen for a fresh window. */
|
||||
@ -1656,8 +1656,8 @@ allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y,
|
||||
points to the mini-buffer window, if any, which is arranged
|
||||
vertically below other windows. */
|
||||
in_horz_combination_p
|
||||
= (!NILP (WGET (XWINDOW (window), parent))
|
||||
&& !NILP (WGET (XWINDOW (WGET (XWINDOW (window), parent)), hchild)));
|
||||
= (!NILP (XWINDOW (window)->parent)
|
||||
&& !NILP (XWINDOW (XWINDOW (window)->parent)->hchild));
|
||||
|
||||
/* For WINDOW and all windows on the same level. */
|
||||
do
|
||||
@ -1666,12 +1666,12 @@ allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y,
|
||||
|
||||
/* Get the dimension of the window sub-matrix for W, depending
|
||||
on whether this is a combination or a leaf window. */
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
dim = allocate_matrices_for_frame_redisplay (WGET (w, hchild), x, y,
|
||||
if (!NILP (w->hchild))
|
||||
dim = allocate_matrices_for_frame_redisplay (w->hchild, x, y,
|
||||
dim_only_p,
|
||||
window_change_flags);
|
||||
else if (!NILP (WGET (w, vchild)))
|
||||
dim = allocate_matrices_for_frame_redisplay (WGET (w, vchild), x, y,
|
||||
else if (!NILP (w->vchild))
|
||||
dim = allocate_matrices_for_frame_redisplay (w->vchild, x, y,
|
||||
dim_only_p,
|
||||
window_change_flags);
|
||||
else
|
||||
@ -1695,10 +1695,10 @@ allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y,
|
||||
|| dim.width != w->desired_matrix->matrix_w
|
||||
|| dim.height != w->desired_matrix->matrix_h
|
||||
|| (margin_glyphs_to_reserve (w, dim.width,
|
||||
WGET (w, left_margin_cols))
|
||||
w->left_margin_cols)
|
||||
!= w->desired_matrix->left_margin_glyphs)
|
||||
|| (margin_glyphs_to_reserve (w, dim.width,
|
||||
WGET (w, right_margin_cols))
|
||||
w->right_margin_cols)
|
||||
!= w->desired_matrix->right_margin_glyphs))
|
||||
*window_change_flags |= CHANGED_LEAF_MATRIX;
|
||||
|
||||
@ -1727,7 +1727,7 @@ allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y,
|
||||
hmax = max (hmax, dim.height);
|
||||
|
||||
/* Next window on same level. */
|
||||
window = WGET (w, next);
|
||||
window = w->next;
|
||||
}
|
||||
while (!NILP (window));
|
||||
|
||||
@ -1758,7 +1758,7 @@ static int
|
||||
required_matrix_height (struct window *w)
|
||||
{
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
|
||||
if (FRAME_WINDOW_P (f))
|
||||
{
|
||||
@ -1784,7 +1784,7 @@ static int
|
||||
required_matrix_width (struct window *w)
|
||||
{
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
if (FRAME_WINDOW_P (f))
|
||||
{
|
||||
int ch_width = FRAME_SMALLEST_CHAR_WIDTH (f);
|
||||
@ -1801,7 +1801,7 @@ required_matrix_width (struct window *w)
|
||||
}
|
||||
#endif /* HAVE_WINDOW_SYSTEM */
|
||||
|
||||
return XINT (WGET (w, total_cols));
|
||||
return XINT (w->total_cols);
|
||||
}
|
||||
|
||||
|
||||
@ -1813,10 +1813,10 @@ allocate_matrices_for_window_redisplay (struct window *w)
|
||||
{
|
||||
while (w)
|
||||
{
|
||||
if (!NILP (WGET (w, vchild)))
|
||||
allocate_matrices_for_window_redisplay (XWINDOW (WGET (w, vchild)));
|
||||
else if (!NILP (WGET (w, hchild)))
|
||||
allocate_matrices_for_window_redisplay (XWINDOW (WGET (w, hchild)));
|
||||
if (!NILP (w->vchild))
|
||||
allocate_matrices_for_window_redisplay (XWINDOW (w->vchild));
|
||||
else if (!NILP (w->hchild))
|
||||
allocate_matrices_for_window_redisplay (XWINDOW (w->hchild));
|
||||
else
|
||||
{
|
||||
/* W is a leaf window. */
|
||||
@ -1835,7 +1835,7 @@ allocate_matrices_for_window_redisplay (struct window *w)
|
||||
adjust_glyph_matrix (w, w->current_matrix, 0, 0, dim);
|
||||
}
|
||||
|
||||
w = NILP (WGET (w, next)) ? NULL : XWINDOW (WGET (w, next));
|
||||
w = NILP (w->next) ? NULL : XWINDOW (w->next);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1882,7 +1882,7 @@ adjust_frame_glyphs_initially (void)
|
||||
{
|
||||
struct frame *sf = SELECTED_FRAME ();
|
||||
struct window *root = XWINDOW (sf->root_window);
|
||||
struct window *mini = XWINDOW (WGET (root, next));
|
||||
struct window *mini = XWINDOW (root->next);
|
||||
int frame_lines = FRAME_LINES (sf);
|
||||
int frame_cols = FRAME_COLS (sf);
|
||||
int top_margin = FRAME_TOP_MARGIN (sf);
|
||||
@ -1927,21 +1927,21 @@ showing_window_margins_p (struct window *w)
|
||||
{
|
||||
while (w)
|
||||
{
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
if (!NILP (w->hchild))
|
||||
{
|
||||
if (showing_window_margins_p (XWINDOW (WGET (w, hchild))))
|
||||
if (showing_window_margins_p (XWINDOW (w->hchild)))
|
||||
return 1;
|
||||
}
|
||||
else if (!NILP (WGET (w, vchild)))
|
||||
else if (!NILP (w->vchild))
|
||||
{
|
||||
if (showing_window_margins_p (XWINDOW (WGET (w, vchild))))
|
||||
if (showing_window_margins_p (XWINDOW (w->vchild)))
|
||||
return 1;
|
||||
}
|
||||
else if (!NILP (WGET (w, left_margin_cols))
|
||||
|| !NILP (WGET (w, right_margin_cols)))
|
||||
else if (!NILP (w->left_margin_cols)
|
||||
|| !NILP (w->right_margin_cols))
|
||||
return 1;
|
||||
|
||||
w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
|
||||
w = NILP (w->next) ? 0 : XWINDOW (w->next);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -1955,18 +1955,18 @@ fake_current_matrices (Lisp_Object window)
|
||||
{
|
||||
struct window *w;
|
||||
|
||||
for (; !NILP (window); window = WGET (w, next))
|
||||
for (; !NILP (window); window = w->next)
|
||||
{
|
||||
w = XWINDOW (window);
|
||||
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
fake_current_matrices (WGET (w, hchild));
|
||||
else if (!NILP (WGET (w, vchild)))
|
||||
fake_current_matrices (WGET (w, vchild));
|
||||
if (!NILP (w->hchild))
|
||||
fake_current_matrices (w->hchild);
|
||||
else if (!NILP (w->vchild))
|
||||
fake_current_matrices (w->vchild);
|
||||
else
|
||||
{
|
||||
int i;
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
struct glyph_matrix *m = w->current_matrix;
|
||||
struct glyph_matrix *fm = f->current_matrix;
|
||||
|
||||
@ -2317,10 +2317,10 @@ free_window_matrices (struct window *w)
|
||||
{
|
||||
while (w)
|
||||
{
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
free_window_matrices (XWINDOW (WGET (w, hchild)));
|
||||
else if (!NILP (WGET (w, vchild)))
|
||||
free_window_matrices (XWINDOW (WGET (w, vchild)));
|
||||
if (!NILP (w->hchild))
|
||||
free_window_matrices (XWINDOW (w->hchild));
|
||||
else if (!NILP (w->vchild))
|
||||
free_window_matrices (XWINDOW (w->vchild));
|
||||
else
|
||||
{
|
||||
/* This is a leaf window. Free its memory and reset fields
|
||||
@ -2332,7 +2332,7 @@ free_window_matrices (struct window *w)
|
||||
}
|
||||
|
||||
/* Next window on same level. */
|
||||
w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
|
||||
w = NILP (w->next) ? 0 : XWINDOW (w->next);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2453,14 +2453,14 @@ build_frame_matrix_from_window_tree (struct glyph_matrix *matrix, struct window
|
||||
{
|
||||
while (w)
|
||||
{
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
build_frame_matrix_from_window_tree (matrix, XWINDOW (WGET (w, hchild)));
|
||||
else if (!NILP (WGET (w, vchild)))
|
||||
build_frame_matrix_from_window_tree (matrix, XWINDOW (WGET (w, vchild)));
|
||||
if (!NILP (w->hchild))
|
||||
build_frame_matrix_from_window_tree (matrix, XWINDOW (w->hchild));
|
||||
else if (!NILP (w->vchild))
|
||||
build_frame_matrix_from_window_tree (matrix, XWINDOW (w->vchild));
|
||||
else
|
||||
build_frame_matrix_from_leaf_window (matrix, w);
|
||||
|
||||
w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
|
||||
w = NILP (w->next) ? 0 : XWINDOW (w->next);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2599,7 +2599,7 @@ spec_glyph_lookup_face (struct window *w, GLYPH *glyph)
|
||||
/* Convert the glyph's specified face to a realized (cache) face. */
|
||||
if (lface_id > 0)
|
||||
{
|
||||
int face_id = merge_faces (XFRAME (WGET (w, frame)),
|
||||
int face_id = merge_faces (XFRAME (w->frame),
|
||||
Qt, lface_id, DEFAULT_FACE_ID);
|
||||
SET_GLYPH_FACE (*glyph, face_id);
|
||||
}
|
||||
@ -2720,10 +2720,10 @@ mirror_make_current (struct window *w, int frame_row)
|
||||
{
|
||||
while (w)
|
||||
{
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
mirror_make_current (XWINDOW (WGET (w, hchild)), frame_row);
|
||||
else if (!NILP (WGET (w, vchild)))
|
||||
mirror_make_current (XWINDOW (WGET (w, vchild)), frame_row);
|
||||
if (!NILP (w->hchild))
|
||||
mirror_make_current (XWINDOW (w->hchild), frame_row);
|
||||
else if (!NILP (w->vchild))
|
||||
mirror_make_current (XWINDOW (w->vchild), frame_row);
|
||||
else
|
||||
{
|
||||
/* Row relative to window W. Don't use FRAME_TO_WINDOW_VPOS
|
||||
@ -2756,7 +2756,7 @@ mirror_make_current (struct window *w, int frame_row)
|
||||
}
|
||||
}
|
||||
|
||||
w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
|
||||
w = NILP (w->next) ? 0 : XWINDOW (w->next);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2815,16 +2815,16 @@ mirrored_line_dance (struct glyph_matrix *matrix, int unchanged_at_top, int nlin
|
||||
static void
|
||||
sync_window_with_frame_matrix_rows (struct window *w)
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
struct glyph_row *window_row, *window_row_end, *frame_row;
|
||||
int left, right, x, width;
|
||||
|
||||
/* Preconditions: W must be a leaf window on a tty frame. */
|
||||
eassert (NILP (WGET (w, hchild)) && NILP (WGET (w, vchild)));
|
||||
eassert (NILP (w->hchild) && NILP (w->vchild));
|
||||
eassert (!FRAME_WINDOW_P (f));
|
||||
|
||||
left = margin_glyphs_to_reserve (w, 1, WGET (w, left_margin_cols));
|
||||
right = margin_glyphs_to_reserve (w, 1, WGET (w, right_margin_cols));
|
||||
left = margin_glyphs_to_reserve (w, 1, w->left_margin_cols);
|
||||
right = margin_glyphs_to_reserve (w, 1, w->right_margin_cols);
|
||||
x = w->current_matrix->matrix_x;
|
||||
width = w->current_matrix->matrix_w;
|
||||
|
||||
@ -2856,15 +2856,15 @@ frame_row_to_window (struct window *w, int row)
|
||||
|
||||
while (w && !found)
|
||||
{
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
found = frame_row_to_window (XWINDOW (WGET (w, hchild)), row);
|
||||
else if (!NILP (WGET (w, vchild)))
|
||||
found = frame_row_to_window (XWINDOW (WGET (w, vchild)), row);
|
||||
if (!NILP (w->hchild))
|
||||
found = frame_row_to_window (XWINDOW (w->hchild), row);
|
||||
else if (!NILP (w->vchild))
|
||||
found = frame_row_to_window (XWINDOW (w->vchild), row);
|
||||
else if (row >= WINDOW_TOP_EDGE_LINE (w)
|
||||
&& row < WINDOW_BOTTOM_EDGE_LINE (w))
|
||||
found = w;
|
||||
|
||||
w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
|
||||
w = NILP (w->next) ? 0 : XWINDOW (w->next);
|
||||
}
|
||||
|
||||
return found;
|
||||
@ -2887,11 +2887,11 @@ mirror_line_dance (struct window *w, int unchanged_at_top, int nlines, int *copy
|
||||
{
|
||||
while (w)
|
||||
{
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
mirror_line_dance (XWINDOW (WGET (w, hchild)), unchanged_at_top,
|
||||
if (!NILP (w->hchild))
|
||||
mirror_line_dance (XWINDOW (w->hchild), unchanged_at_top,
|
||||
nlines, copy_from, retained_p);
|
||||
else if (!NILP (WGET (w, vchild)))
|
||||
mirror_line_dance (XWINDOW (WGET (w, vchild)), unchanged_at_top,
|
||||
else if (!NILP (w->vchild))
|
||||
mirror_line_dance (XWINDOW (w->vchild), unchanged_at_top,
|
||||
nlines, copy_from, retained_p);
|
||||
else
|
||||
{
|
||||
@ -2947,7 +2947,7 @@ mirror_line_dance (struct window *w, int unchanged_at_top, int nlines, int *copy
|
||||
{
|
||||
/* A copy between windows. This is an infrequent
|
||||
case not worth optimizing. */
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
struct window *root = XWINDOW (FRAME_ROOT_WINDOW (f));
|
||||
struct window *w2;
|
||||
struct glyph_matrix *m2;
|
||||
@ -2984,7 +2984,7 @@ mirror_line_dance (struct window *w, int unchanged_at_top, int nlines, int *copy
|
||||
}
|
||||
|
||||
/* Next window on same level. */
|
||||
w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
|
||||
w = NILP (w->next) ? 0 : XWINDOW (w->next);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3002,18 +3002,18 @@ check_window_matrix_pointers (struct window *w)
|
||||
{
|
||||
while (w)
|
||||
{
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
check_window_matrix_pointers (XWINDOW (WGET (w, hchild)));
|
||||
else if (!NILP (WGET (w, vchild)))
|
||||
check_window_matrix_pointers (XWINDOW (WGET (w, vchild)));
|
||||
if (!NILP (w->hchild))
|
||||
check_window_matrix_pointers (XWINDOW (w->hchild));
|
||||
else if (!NILP (w->vchild))
|
||||
check_window_matrix_pointers (XWINDOW (w->vchild));
|
||||
else
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
check_matrix_pointers (w->desired_matrix, f->desired_matrix);
|
||||
check_matrix_pointers (w->current_matrix, f->current_matrix);
|
||||
}
|
||||
|
||||
w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
|
||||
w = NILP (w->next) ? 0 : XWINDOW (w->next);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3061,10 +3061,10 @@ check_matrix_pointers (struct glyph_matrix *window_matrix,
|
||||
static int
|
||||
window_to_frame_vpos (struct window *w, int vpos)
|
||||
{
|
||||
eassert (!FRAME_WINDOW_P (XFRAME (WGET (w, frame))));
|
||||
eassert (!FRAME_WINDOW_P (XFRAME (w->frame)));
|
||||
eassert (vpos >= 0 && vpos <= w->desired_matrix->nrows);
|
||||
vpos += WINDOW_TOP_EDGE_LINE (w);
|
||||
eassert (vpos >= 0 && vpos <= FRAME_LINES (XFRAME (WGET (w, frame))));
|
||||
eassert (vpos >= 0 && vpos <= FRAME_LINES (XFRAME (w->frame)));
|
||||
return vpos;
|
||||
}
|
||||
|
||||
@ -3075,7 +3075,7 @@ window_to_frame_vpos (struct window *w, int vpos)
|
||||
static int
|
||||
window_to_frame_hpos (struct window *w, int hpos)
|
||||
{
|
||||
eassert (!FRAME_WINDOW_P (XFRAME (WGET (w, frame))));
|
||||
eassert (!FRAME_WINDOW_P (XFRAME (w->frame)));
|
||||
hpos += WINDOW_LEFT_EDGE_COL (w);
|
||||
return hpos;
|
||||
}
|
||||
@ -3294,14 +3294,14 @@ update_window_tree (struct window *w, int force_p)
|
||||
|
||||
while (w && !paused_p)
|
||||
{
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
paused_p |= update_window_tree (XWINDOW (WGET (w, hchild)), force_p);
|
||||
else if (!NILP (WGET (w, vchild)))
|
||||
paused_p |= update_window_tree (XWINDOW (WGET (w, vchild)), force_p);
|
||||
if (!NILP (w->hchild))
|
||||
paused_p |= update_window_tree (XWINDOW (w->hchild), force_p);
|
||||
else if (!NILP (w->vchild))
|
||||
paused_p |= update_window_tree (XWINDOW (w->vchild), force_p);
|
||||
else if (w->must_be_updated_p)
|
||||
paused_p |= update_window (w, force_p);
|
||||
|
||||
w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
|
||||
w = NILP (w->next) ? 0 : XWINDOW (w->next);
|
||||
}
|
||||
|
||||
return paused_p;
|
||||
@ -3789,7 +3789,7 @@ update_text_area (struct window *w, int vpos)
|
||||
struct glyph *glyph = ¤t_row->glyphs[TEXT_AREA][i - 1];
|
||||
int left, right;
|
||||
|
||||
rif->get_glyph_overhangs (glyph, XFRAME (WGET (w, frame)),
|
||||
rif->get_glyph_overhangs (glyph, XFRAME (w->frame),
|
||||
&left, &right);
|
||||
can_skip_p = (right == 0 && !abort_skipping);
|
||||
}
|
||||
@ -3822,7 +3822,7 @@ update_text_area (struct window *w, int vpos)
|
||||
int left, right;
|
||||
|
||||
rif->get_glyph_overhangs (current_glyph,
|
||||
XFRAME (WGET (w, frame)),
|
||||
XFRAME (w->frame),
|
||||
&left, &right);
|
||||
while (left > 0 && i > 0)
|
||||
{
|
||||
@ -3965,7 +3965,7 @@ update_window_line (struct window *w, int vpos, int *mouse_face_overwritten_p)
|
||||
|
||||
/* Update display of the left margin area, if there is one. */
|
||||
if (!desired_row->full_width_p
|
||||
&& !NILP (WGET (w, left_margin_cols)))
|
||||
&& !NILP (w->left_margin_cols))
|
||||
{
|
||||
changed_p = 1;
|
||||
update_marginal_area (w, LEFT_MARGIN_AREA, vpos);
|
||||
@ -3981,7 +3981,7 @@ update_window_line (struct window *w, int vpos, int *mouse_face_overwritten_p)
|
||||
|
||||
/* Update display of the right margin area, if there is one. */
|
||||
if (!desired_row->full_width_p
|
||||
&& !NILP (WGET (w, right_margin_cols)))
|
||||
&& !NILP (w->right_margin_cols))
|
||||
{
|
||||
changed_p = 1;
|
||||
update_marginal_area (w, RIGHT_MARGIN_AREA, vpos);
|
||||
@ -4014,7 +4014,7 @@ update_window_line (struct window *w, int vpos, int *mouse_face_overwritten_p)
|
||||
static void
|
||||
set_window_cursor_after_update (struct window *w)
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
struct redisplay_interface *rif = FRAME_RIF (f);
|
||||
int cx, cy, vpos, hpos;
|
||||
|
||||
@ -4100,14 +4100,14 @@ set_window_update_flags (struct window *w, int on_p)
|
||||
{
|
||||
while (w)
|
||||
{
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
set_window_update_flags (XWINDOW (WGET (w, hchild)), on_p);
|
||||
else if (!NILP (WGET (w, vchild)))
|
||||
set_window_update_flags (XWINDOW (WGET (w, vchild)), on_p);
|
||||
if (!NILP (w->hchild))
|
||||
set_window_update_flags (XWINDOW (w->hchild), on_p);
|
||||
else if (!NILP (w->vchild))
|
||||
set_window_update_flags (XWINDOW (w->vchild), on_p);
|
||||
else
|
||||
w->must_be_updated_p = on_p;
|
||||
|
||||
w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
|
||||
w = NILP (w->next) ? 0 : XWINDOW (w->next);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4790,8 +4790,8 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
|
||||
int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos);
|
||||
int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
|
||||
|
||||
if (INTEGERP (WGET (w, left_margin_cols)))
|
||||
x += XFASTINT (WGET (w, left_margin_cols));
|
||||
if (INTEGERP (w->left_margin_cols))
|
||||
x += XFASTINT (w->left_margin_cols);
|
||||
|
||||
/* x = max (min (x, FRAME_TOTAL_COLS (f) - 1), 0); */
|
||||
cursor_to (f, y, x);
|
||||
@ -5281,9 +5281,9 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
|
||||
|
||||
/* We used to set current_buffer directly here, but that does the
|
||||
wrong thing with `face-remapping-alist' (bug#2044). */
|
||||
Fset_buffer (WGET (w, buffer));
|
||||
Fset_buffer (w->buffer);
|
||||
itdata = bidi_shelve_cache ();
|
||||
SET_TEXT_POS_FROM_MARKER (startp, WGET (w, start));
|
||||
SET_TEXT_POS_FROM_MARKER (startp, w->start);
|
||||
CHARPOS (startp) = min (ZV, max (BEGV, CHARPOS (startp)));
|
||||
BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp)));
|
||||
start_display (&it, w, startp);
|
||||
@ -5327,7 +5327,7 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
|
||||
*dx = x0 + it.first_visible_x - it.current_x;
|
||||
*dy = *y - it.current_y;
|
||||
|
||||
string = WGET (w, buffer);
|
||||
string = w->buffer;
|
||||
if (STRINGP (it.string))
|
||||
string = it.string;
|
||||
*pos = it.current;
|
||||
@ -5345,7 +5345,7 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
|
||||
if (STRINGP (it.string))
|
||||
BYTEPOS (pos->pos) = string_char_to_byte (string, CHARPOS (pos->pos));
|
||||
else
|
||||
BYTEPOS (pos->pos) = buf_charpos_to_bytepos (XBUFFER (WGET (w, buffer)),
|
||||
BYTEPOS (pos->pos) = buf_charpos_to_bytepos (XBUFFER (w->buffer),
|
||||
CHARPOS (pos->pos));
|
||||
}
|
||||
|
||||
@ -5745,8 +5745,7 @@ change_frame_size_1 (register struct frame *f, int newheight, int newwidth, int
|
||||
FrameCols (FRAME_TTY (f)) = newwidth;
|
||||
|
||||
if (WINDOWP (f->tool_bar_window))
|
||||
WSET (XWINDOW (f->tool_bar_window),
|
||||
total_cols, make_number (newwidth));
|
||||
WSET (XWINDOW (f->tool_bar_window), total_cols, make_number (newwidth));
|
||||
}
|
||||
|
||||
FRAME_LINES (f) = newheight;
|
||||
|
@ -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 = WGET (XWINDOW (object), buffer);
|
||||
object = 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 (WGET (XWINDOW (selected_window), buffer))
|
||||
int visible = (XBUFFER (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 (WGET (XWINDOW (selected_window), buffer)))
|
||||
&& current_buffer != XBUFFER (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 = WGET (XWINDOW (tem), buffer),
|
||||
&& (tem1 = 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 (WGET (XWINDOW (selected_window), buffer)) == current_buffer)
|
||||
if (XBUFFER (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 (WGET (XWINDOW (selected_window), buffer)) == current_buffer)
|
||||
if (XBUFFER (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 (WGET (w, frame));
|
||||
f = XFRAME (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 (WGET (w, frame)), face_id);
|
||||
face = FACE_FROM_ID (XFRAME (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 (WGET (w, frame));
|
||||
f = XFRAME (w->frame);
|
||||
face_id = face_at_buffer_position (w, pos, -1, -1, &dummy,
|
||||
pos + 100, 0, -1);
|
||||
}
|
||||
|
34
src/frame.c
34
src/frame.c
@ -132,15 +132,15 @@ set_menu_bar_lines_1 (Lisp_Object window, int n)
|
||||
struct window *w = XWINDOW (window);
|
||||
|
||||
w->last_modified = 0;
|
||||
WSET (w, top_line, make_number (XFASTINT (WGET (w, top_line)) + n));
|
||||
WSET (w, total_lines, make_number (XFASTINT (WGET (w, total_lines)) - n));
|
||||
WSET (w, top_line, make_number (XFASTINT (w->top_line) + n));
|
||||
WSET (w, total_lines, make_number (XFASTINT (w->total_lines) - n));
|
||||
|
||||
/* Handle just the top child in a vertical split. */
|
||||
if (!NILP (WGET (w, vchild)))
|
||||
set_menu_bar_lines_1 (WGET (w, vchild), n);
|
||||
if (!NILP (w->vchild))
|
||||
set_menu_bar_lines_1 (w->vchild, n);
|
||||
|
||||
/* Adjust all children in a horizontal split. */
|
||||
for (window = WGET (w, hchild); !NILP (window); window = WGET (w, next))
|
||||
for (window = w->hchild; !NILP (window); window = w->next)
|
||||
{
|
||||
w = XWINDOW (window);
|
||||
set_menu_bar_lines_1 (window, n);
|
||||
@ -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 (WGET (XWINDOW (mini_window), frame))) != kb)
|
||||
&& FRAME_KBOARD (XFRAME (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 (WGET (XWINDOW (mini_window), buffer), Vminibuffer_list)))
|
||||
if (NILP (Fmemq (XWINDOW (mini_window)->buffer, Vminibuffer_list)))
|
||||
Fset_window_buffer (mini_window,
|
||||
(NILP (Vminibuffer_list)
|
||||
? get_minibuffer (0)
|
||||
@ -1241,7 +1241,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
|
||||
if (EQ (f->minibuffer_window, minibuf_window))
|
||||
{
|
||||
Fset_window_buffer (sf->minibuffer_window,
|
||||
WGET (XWINDOW (minibuf_window), buffer), Qnil);
|
||||
XWINDOW (minibuf_window)->buffer, Qnil);
|
||||
minibuf_window = 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 = WGET (w, next))
|
||||
for (;!NILP (window); window = w->next)
|
||||
{
|
||||
w = XWINDOW (window);
|
||||
|
||||
if (!NILP (WGET (w, buffer)))
|
||||
BVAR (XBUFFER (WGET (w, buffer)), display_time) = Fcurrent_time ();
|
||||
if (!NILP (w->buffer))
|
||||
BVAR (XBUFFER (w->buffer), display_time) = Fcurrent_time ();
|
||||
|
||||
if (!NILP (WGET (w, vchild)))
|
||||
make_frame_visible_1 (WGET (w, vchild));
|
||||
if (!NILP (WGET (w, hchild)))
|
||||
make_frame_visible_1 (WGET (w, hchild));
|
||||
if (!NILP (w->vchild))
|
||||
make_frame_visible_1 (w->vchild);
|
||||
if (!NILP (w->hchild))
|
||||
make_frame_visible_1 (w->hchild);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1714,7 +1714,7 @@ displayed in the terminal. */)
|
||||
{
|
||||
struct frame *sf = XFRAME (selected_frame);
|
||||
Fset_window_buffer (sf->minibuffer_window,
|
||||
WGET (XWINDOW (minibuf_window), buffer), Qnil);
|
||||
XWINDOW (minibuf_window)->buffer, Qnil);
|
||||
minibuf_window = 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 (sf->minibuffer_window,
|
||||
WGET (XWINDOW (minibuf_window), buffer), Qnil);
|
||||
XWINDOW (minibuf_window)->buffer, Qnil);
|
||||
minibuf_window = sf->minibuffer_window;
|
||||
}
|
||||
|
||||
|
@ -511,7 +511,7 @@ typedef struct frame *FRAME_PTR;
|
||||
#define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
|
||||
|
||||
/* Given a window, return its frame as a Lisp_Object. */
|
||||
#define WINDOW_FRAME(w) WGET (w, frame)
|
||||
#define WINDOW_FRAME(w) w->frame
|
||||
|
||||
/* Test a frame for particular kinds of display methods. */
|
||||
#define FRAME_INITIAL_P(f) ((f)->output_method == output_initial)
|
||||
|
14
src/fringe.c
14
src/fringe.c
@ -692,7 +692,7 @@ get_logical_cursor_bitmap (struct window *w, Lisp_Object cursor)
|
||||
{
|
||||
Lisp_Object cmap, bm = Qnil;
|
||||
|
||||
if ((cmap = BVAR (XBUFFER (WGET (w, buffer)), fringe_cursor_alist)), !NILP (cmap))
|
||||
if ((cmap = BVAR (XBUFFER (w->buffer), fringe_cursor_alist)), !NILP (cmap))
|
||||
{
|
||||
bm = Fassq (cursor, cmap);
|
||||
if (CONSP (bm))
|
||||
@ -729,7 +729,7 @@ get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, in
|
||||
If partial, lookup partial bitmap in default value if not found here.
|
||||
If not partial, or no partial spec is present, use non-partial bitmap. */
|
||||
|
||||
if ((cmap = BVAR (XBUFFER (WGET (w, buffer)), fringe_indicator_alist)), !NILP (cmap))
|
||||
if ((cmap = BVAR (XBUFFER (w->buffer), fringe_indicator_alist)), !NILP (cmap))
|
||||
{
|
||||
bm1 = Fassq (bitmap, cmap);
|
||||
if (CONSP (bm1))
|
||||
@ -956,7 +956,7 @@ update_window_fringes (struct window *w, int keep_current_p)
|
||||
return 0;
|
||||
|
||||
if (!MINI_WINDOW_P (w)
|
||||
&& (ind = BVAR (XBUFFER (WGET (w, buffer)), indicate_buffer_boundaries), !NILP (ind)))
|
||||
&& (ind = BVAR (XBUFFER (w->buffer), indicate_buffer_boundaries), !NILP (ind)))
|
||||
{
|
||||
if (EQ (ind, Qleft) || EQ (ind, Qright))
|
||||
boundary_top = boundary_bot = arrow_top = arrow_bot = ind;
|
||||
@ -997,7 +997,7 @@ update_window_fringes (struct window *w, int keep_current_p)
|
||||
{
|
||||
if (top_ind_rn < 0 && row->visible_height > 0)
|
||||
{
|
||||
if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (WGET (w, buffer)))
|
||||
if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer))
|
||||
&& !MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row))
|
||||
row->indicate_bob_p = !NILP (boundary_top);
|
||||
else
|
||||
@ -1007,7 +1007,7 @@ update_window_fringes (struct window *w, int keep_current_p)
|
||||
|
||||
if (bot_ind_rn < 0)
|
||||
{
|
||||
if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (WGET (w, buffer)))
|
||||
if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer))
|
||||
&& !MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P (w, row))
|
||||
row->indicate_eob_p = !NILP (boundary_bot), bot_ind_rn = rn;
|
||||
else if (y + row->height >= yb)
|
||||
@ -1017,7 +1017,7 @@ update_window_fringes (struct window *w, int keep_current_p)
|
||||
}
|
||||
}
|
||||
|
||||
empty_pos = BVAR (XBUFFER (WGET (w, buffer)), indicate_empty_lines);
|
||||
empty_pos = BVAR (XBUFFER (w->buffer), indicate_empty_lines);
|
||||
if (!NILP (empty_pos) && !EQ (empty_pos, Qright))
|
||||
empty_pos = WINDOW_LEFT_FRINGE_WIDTH (w) == 0 ? Qright : Qleft;
|
||||
|
||||
@ -1740,7 +1740,7 @@ Return nil if POS is not visible in WINDOW. */)
|
||||
else if (w == XWINDOW (selected_window))
|
||||
textpos = PT;
|
||||
else
|
||||
textpos = XMARKER (WGET (w, pointm))->charpos;
|
||||
textpos = XMARKER (w->pointm)->charpos;
|
||||
|
||||
row = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
|
||||
row = row_containing_pos (w, textpos, row, NULL, 0);
|
||||
|
24
src/indent.c
24
src/indent.c
@ -258,7 +258,7 @@ skip_invisible (ptrdiff_t pos, ptrdiff_t *next_boundary_p, ptrdiff_t to, Lisp_Ob
|
||||
the next property change */
|
||||
prop = Fget_char_property (position, Qinvisible,
|
||||
(!NILP (window)
|
||||
&& EQ (WGET (XWINDOW (window), buffer), buffer))
|
||||
&& EQ (XWINDOW (window)->buffer, buffer))
|
||||
? window : buffer);
|
||||
inv_p = TEXT_PROP_MEANS_INVISIBLE (prop);
|
||||
/* When counting columns (window == nil), don't skip over ellipsis text. */
|
||||
@ -1173,14 +1173,14 @@ compute_motion (ptrdiff_t from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_
|
||||
width = window_body_cols (win);
|
||||
/* We must make room for continuation marks if we don't have fringes. */
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
if (!FRAME_WINDOW_P (XFRAME (WGET (win, frame))))
|
||||
if (!FRAME_WINDOW_P (XFRAME (win->frame)))
|
||||
#endif
|
||||
width -= 1;
|
||||
}
|
||||
|
||||
continuation_glyph_width = 1;
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
if (FRAME_WINDOW_P (XFRAME (WGET (win, frame))))
|
||||
if (FRAME_WINDOW_P (XFRAME (win->frame)))
|
||||
continuation_glyph_width = 0; /* In the fringe. */
|
||||
#endif
|
||||
|
||||
@ -1787,7 +1787,7 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
|
||||
? (window_body_cols (w)
|
||||
- (
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
FRAME_WINDOW_P (XFRAME (WGET (w, frame))) ? 0 :
|
||||
FRAME_WINDOW_P (XFRAME (w->frame)) ? 0 :
|
||||
#endif
|
||||
1))
|
||||
: XINT (XCAR (topos))),
|
||||
@ -1837,7 +1837,7 @@ vmotion (register ptrdiff_t from, register EMACS_INT vtarget, struct window *w)
|
||||
|
||||
/* If the window contains this buffer, use it for getting text properties.
|
||||
Otherwise use the current buffer as arg for doing that. */
|
||||
if (EQ (WGET (w, buffer), Fcurrent_buffer ()))
|
||||
if (EQ (w->buffer, Fcurrent_buffer ()))
|
||||
text_prop_object = window;
|
||||
else
|
||||
text_prop_object = Fcurrent_buffer ();
|
||||
@ -1998,14 +1998,14 @@ whether or not it is currently displayed in some window. */)
|
||||
|
||||
old_buffer = Qnil;
|
||||
GCPRO3 (old_buffer, old_charpos, old_bytepos);
|
||||
if (XBUFFER (WGET (w, buffer)) != current_buffer)
|
||||
if (XBUFFER (w->buffer) != current_buffer)
|
||||
{
|
||||
/* Set the window's buffer temporarily to the current buffer. */
|
||||
old_buffer = WGET (w, buffer);
|
||||
old_charpos = XMARKER (WGET (w, pointm))->charpos;
|
||||
old_bytepos = XMARKER (WGET (w, pointm))->bytepos;
|
||||
old_buffer = w->buffer;
|
||||
old_charpos = XMARKER (w->pointm)->charpos;
|
||||
old_bytepos = XMARKER (w->pointm)->bytepos;
|
||||
WSET (w, buffer, Fcurrent_buffer ());
|
||||
set_marker_both (WGET (w, pointm), WGET (w, buffer),
|
||||
set_marker_both (w->pointm, w->buffer,
|
||||
BUF_PT (current_buffer), BUF_PT_BYTE (current_buffer));
|
||||
}
|
||||
|
||||
@ -2137,7 +2137,7 @@ whether or not it is currently displayed in some window. */)
|
||||
}
|
||||
move_it_in_display_line
|
||||
(&it, ZV,
|
||||
(int)(cols * FRAME_COLUMN_WIDTH (XFRAME (WGET (w, frame))) + 0.5),
|
||||
(int)(cols * FRAME_COLUMN_WIDTH (XFRAME (w->frame)) + 0.5),
|
||||
MOVE_TO_X);
|
||||
}
|
||||
|
||||
@ -2148,7 +2148,7 @@ whether or not it is currently displayed in some window. */)
|
||||
if (BUFFERP (old_buffer))
|
||||
{
|
||||
WSET (w, buffer, old_buffer);
|
||||
set_marker_both (WGET (w, pointm), WGET (w, buffer),
|
||||
set_marker_both (w->pointm, w->buffer,
|
||||
old_charpos, old_bytepos);
|
||||
}
|
||||
|
||||
|
@ -1820,7 +1820,7 @@ prepare_to_modify_buffer (ptrdiff_t start, ptrdiff_t end,
|
||||
|
||||
/* Let redisplay consider other windows than selected_window
|
||||
if modifying another buffer. */
|
||||
if (XBUFFER (WGET (XWINDOW (selected_window), buffer)) != current_buffer)
|
||||
if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer)
|
||||
++windows_or_buffers_changed;
|
||||
|
||||
if (BUF_INTERVALS (current_buffer) != 0)
|
||||
|
@ -800,7 +800,7 @@ This function is called by the editor initialization to begin editing. */)
|
||||
update_mode_lines = 1;
|
||||
|
||||
if (command_loop_level
|
||||
&& current_buffer != XBUFFER (WGET (XWINDOW (selected_window), buffer)))
|
||||
&& current_buffer != XBUFFER (XWINDOW (selected_window)->buffer))
|
||||
buffer = Fcurrent_buffer ();
|
||||
else
|
||||
buffer = Qnil;
|
||||
@ -1382,8 +1382,8 @@ command_loop_1 (void)
|
||||
Fkill_emacs (Qnil);
|
||||
|
||||
/* Make sure the current window's buffer is selected. */
|
||||
if (XBUFFER (WGET (XWINDOW (selected_window), buffer)) != current_buffer)
|
||||
set_buffer_internal (XBUFFER (WGET (XWINDOW (selected_window), buffer)));
|
||||
if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer)
|
||||
set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer));
|
||||
|
||||
/* Display any malloc warning that just came out. Use while because
|
||||
displaying one warning can cause another. */
|
||||
@ -1452,8 +1452,8 @@ command_loop_1 (void)
|
||||
/* A filter may have run while we were reading the input. */
|
||||
if (! FRAME_LIVE_P (XFRAME (selected_frame)))
|
||||
Fkill_emacs (Qnil);
|
||||
if (XBUFFER (WGET (XWINDOW (selected_window), buffer)) != current_buffer)
|
||||
set_buffer_internal (XBUFFER (WGET (XWINDOW (selected_window), buffer)));
|
||||
if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer)
|
||||
set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer));
|
||||
|
||||
++num_input_keys;
|
||||
|
||||
@ -1484,7 +1484,7 @@ command_loop_1 (void)
|
||||
{
|
||||
struct buffer *b;
|
||||
XWINDOW (selected_window)->force_start = 0;
|
||||
b = XBUFFER (WGET (XWINDOW (selected_window), buffer));
|
||||
b = XBUFFER (XWINDOW (selected_window)->buffer);
|
||||
BUF_BEG_UNCHANGED (b) = BUF_END_UNCHANGED (b) = 0;
|
||||
}
|
||||
|
||||
@ -5175,8 +5175,8 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
|
||||
if (STRINGP (string))
|
||||
string_info = Fcons (string, make_number (charpos));
|
||||
textpos = (w == XWINDOW (selected_window)
|
||||
&& current_buffer == XBUFFER (WGET (w, buffer)))
|
||||
? PT : XMARKER (WGET (w, pointm))->charpos;
|
||||
&& current_buffer == XBUFFER (w->buffer))
|
||||
? PT : XMARKER (w->pointm)->charpos;
|
||||
|
||||
xret = wx;
|
||||
yret = wy;
|
||||
@ -5564,7 +5564,7 @@ make_lispy_event (struct input_event *event)
|
||||
int fuzz;
|
||||
|
||||
if (WINDOWP (event->frame_or_window))
|
||||
f = XFRAME (WGET (XWINDOW (event->frame_or_window), frame));
|
||||
f = XFRAME (XWINDOW (event->frame_or_window)->frame);
|
||||
else if (FRAMEP (event->frame_or_window))
|
||||
f = XFRAME (event->frame_or_window);
|
||||
else
|
||||
@ -5732,7 +5732,7 @@ make_lispy_event (struct input_event *event)
|
||||
int is_double;
|
||||
|
||||
if (WINDOWP (event->frame_or_window))
|
||||
fr = XFRAME (WGET (XWINDOW (event->frame_or_window), frame));
|
||||
fr = XFRAME (XWINDOW (event->frame_or_window)->frame);
|
||||
else if (FRAMEP (event->frame_or_window))
|
||||
fr = XFRAME (event->frame_or_window);
|
||||
else
|
||||
@ -9402,8 +9402,8 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
|
||||
{
|
||||
if (! FRAME_LIVE_P (XFRAME (selected_frame)))
|
||||
Fkill_emacs (Qnil);
|
||||
if (XBUFFER (WGET (XWINDOW (selected_window), buffer)) != current_buffer)
|
||||
Fset_buffer (WGET (XWINDOW (selected_window), buffer));
|
||||
if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer)
|
||||
Fset_buffer (XWINDOW (selected_window)->buffer);
|
||||
}
|
||||
|
||||
orig_local_map = get_local_map (PT, current_buffer, Qlocal_map);
|
||||
@ -9495,8 +9495,8 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
|
||||
not the current buffer. If we're at the
|
||||
beginning of a key sequence, switch buffers. */
|
||||
if (WINDOWP (window)
|
||||
&& BUFFERP (WGET (XWINDOW (window), buffer))
|
||||
&& XBUFFER (WGET (XWINDOW (window), buffer)) != current_buffer)
|
||||
&& BUFFERP (XWINDOW (window)->buffer)
|
||||
&& XBUFFER (XWINDOW (window)->buffer) != current_buffer)
|
||||
{
|
||||
ASET (raw_keybuf, raw_keybuf_count, key);
|
||||
raw_keybuf_count++;
|
||||
@ -9517,7 +9517,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
|
||||
|
||||
if (! FRAME_LIVE_P (XFRAME (selected_frame)))
|
||||
Fkill_emacs (Qnil);
|
||||
set_buffer_internal (XBUFFER (WGET (XWINDOW (window), buffer)));
|
||||
set_buffer_internal (XBUFFER (XWINDOW (window)->buffer));
|
||||
orig_local_map = get_local_map (PT, current_buffer,
|
||||
Qlocal_map);
|
||||
orig_keymap = get_local_map (PT, current_buffer,
|
||||
@ -11201,7 +11201,7 @@ The `posn-' functions access elements of such lists. */)
|
||||
? window_box_left_offset (w, TEXT_AREA)
|
||||
: 0)));
|
||||
XSETINT (y, WINDOW_TO_FRAME_PIXEL_Y (w, XINT (y)));
|
||||
frame_or_window = WGET (w, frame);
|
||||
frame_or_window = w->frame;
|
||||
}
|
||||
|
||||
CHECK_LIVE_FRAME (frame_or_window);
|
||||
|
@ -1560,8 +1560,8 @@ like in the respective argument of `key-binding'. */)
|
||||
window = POSN_WINDOW (position);
|
||||
|
||||
if (WINDOWP (window)
|
||||
&& BUFFERP (WGET (XWINDOW (window), buffer))
|
||||
&& XBUFFER (WGET (XWINDOW (window), buffer)) != current_buffer)
|
||||
&& BUFFERP (XWINDOW (window)->buffer)
|
||||
&& XBUFFER (XWINDOW (window)->buffer) != current_buffer)
|
||||
{
|
||||
/* Arrange to go back to the original buffer once we're done
|
||||
processing the key sequence. We don't use
|
||||
@ -1573,7 +1573,7 @@ like in the respective argument of `key-binding'. */)
|
||||
|
||||
record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
|
||||
|
||||
set_buffer_internal (XBUFFER (WGET (XWINDOW (window), buffer)));
|
||||
set_buffer_internal (XBUFFER (XWINDOW (window)->buffer));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1787,7 +1787,7 @@ typedef struct {
|
||||
vchild, and hchild members are all nil. */
|
||||
|
||||
#define CHECK_LIVE_WINDOW(x) \
|
||||
CHECK_TYPE (WINDOWP (x) && !NILP (WGET (XWINDOW (x), buffer)), \
|
||||
CHECK_TYPE (WINDOWP (x) && !NILP (XWINDOW (x)->buffer), \
|
||||
Qwindow_live_p, x)
|
||||
|
||||
#define CHECK_PROCESS(x) \
|
||||
|
@ -115,7 +115,7 @@ choose_minibuf_frame (void)
|
||||
/* Under X, we come here with minibuf_window being the
|
||||
minibuffer window of the unused termcap window created in
|
||||
init_window_once. That window doesn't have a buffer. */
|
||||
buffer = WGET (XWINDOW (minibuf_window), buffer);
|
||||
buffer = XWINDOW (minibuf_window)->buffer;
|
||||
if (BUFFERP (buffer))
|
||||
Fset_window_buffer (sf->minibuffer_window, buffer, Qnil);
|
||||
minibuf_window = sf->minibuffer_window;
|
||||
@ -612,7 +612,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
|
||||
FOR_EACH_FRAME (dummy, frame)
|
||||
{
|
||||
Lisp_Object root_window = Fframe_root_window (frame);
|
||||
Lisp_Object mini_window = WGET (XWINDOW (root_window), next);
|
||||
Lisp_Object mini_window = XWINDOW (root_window)->next;
|
||||
|
||||
if (! NILP (mini_window) && ! EQ (mini_window, minibuf_window)
|
||||
&& !NILP (Fwindow_minibuffer_p (mini_window)))
|
||||
@ -687,7 +687,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
|
||||
XWINDOW (minibuf_window)->must_be_updated_p = 1;
|
||||
update_frame (XFRAME (selected_frame), 1, 1);
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (XWINDOW (minibuf_window), frame));
|
||||
struct frame *f = XFRAME (XWINDOW (minibuf_window)->frame);
|
||||
struct redisplay_interface *rif = FRAME_RIF (f);
|
||||
if (rif && rif->flush_display)
|
||||
rif->flush_display (f);
|
||||
@ -844,7 +844,7 @@ read_minibuf_unwind (Lisp_Object data)
|
||||
window = minibuf_window;
|
||||
/* To keep things predictable, in case it matters, let's be in the
|
||||
minibuffer when we reset the relevant variables. */
|
||||
Fset_buffer (WGET (XWINDOW (window), buffer));
|
||||
Fset_buffer (XWINDOW (window)->buffer);
|
||||
|
||||
/* Restore prompt, etc, from outer minibuffer level. */
|
||||
minibuf_prompt = Fcar (minibuf_save_list);
|
||||
|
@ -594,7 +594,7 @@ dos_set_window_size (int *rows, int *cols)
|
||||
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
|
||||
Lisp_Object window = hlinfo->mouse_face_window;
|
||||
|
||||
if (! NILP (window) && XFRAME (WGET (XWINDOW (window), frame)) == f)
|
||||
if (! NILP (window) && XFRAME (XWINDOW (window)->frame) == f)
|
||||
{
|
||||
hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
|
||||
hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
|
||||
@ -1255,7 +1255,7 @@ IT_update_begin (struct frame *f)
|
||||
/* If the mouse highlight is in the window that was deleted
|
||||
(e.g., if it was popped by completion), clear highlight
|
||||
unconditionally. */
|
||||
if (NILP (WGET (w, buffer)))
|
||||
if (NILP (w->buffer))
|
||||
hlinfo->mouse_face_window = Qnil;
|
||||
else
|
||||
{
|
||||
@ -1265,7 +1265,7 @@ IT_update_begin (struct frame *f)
|
||||
break;
|
||||
}
|
||||
|
||||
if (NILP (WGET (w, buffer)) || i < w->desired_matrix->nrows)
|
||||
if (NILP (w->buffer) || i < w->desired_matrix->nrows)
|
||||
clear_mouse_face (hlinfo);
|
||||
}
|
||||
}
|
||||
@ -1327,7 +1327,7 @@ IT_frame_up_to_date (struct frame *f)
|
||||
new_cursor = frame_desired_cursor;
|
||||
else
|
||||
{
|
||||
struct buffer *b = XBUFFER (WGET (sw, buffer));
|
||||
struct buffer *b = XBUFFER (sw->buffer);
|
||||
|
||||
if (EQ (BVAR (b,cursor_type), Qt))
|
||||
new_cursor = frame_desired_cursor;
|
||||
|
@ -607,7 +607,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
||||
{
|
||||
NSView *view;
|
||||
Lisp_Object name, filename;
|
||||
Lisp_Object buf = WGET (XWINDOW (f->selected_window), buffer);
|
||||
Lisp_Object buf = XWINDOW (f->selected_window)->buffer;
|
||||
const char *title;
|
||||
NSAutoreleasePool *pool;
|
||||
struct gcpro gcpro1;
|
||||
|
@ -193,7 +193,7 @@
|
||||
= alloca (previous_menu_items_used * sizeof *previous_items);
|
||||
|
||||
/* lisp preliminaries */
|
||||
buffer = WGET (XWINDOW (FRAME_SELECTED_WINDOW (f)), buffer);
|
||||
buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer;
|
||||
specbind (Qinhibit_quit, Qt);
|
||||
specbind (Qdebug_on_next_call, Qnil);
|
||||
record_unwind_save_match_data ();
|
||||
|
27
src/nsterm.m
27
src/nsterm.m
@ -667,7 +667,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
||||
external (RIF) call; for one window called before update_end
|
||||
-------------------------------------------------------------------------- */
|
||||
{
|
||||
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WGET (w, frame)));
|
||||
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
|
||||
|
||||
/* note: this fn is nearly identical in all terms */
|
||||
if (!w->pseudo_window_p)
|
||||
@ -2035,7 +2035,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
||||
External (RIF): Insert or delete n lines at line vpos
|
||||
-------------------------------------------------------------------------- */
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
int x, y, width, height, from_y, to_y, bottom_y;
|
||||
|
||||
NSTRACE (ns_scroll_run);
|
||||
@ -2114,7 +2114,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
||||
full-width rows stays visible in the internal border.
|
||||
Under NS this is drawn inside the fringes. */
|
||||
if (windows_or_buffers_changed
|
||||
&& (f = XFRAME (WGET (w, frame)),
|
||||
&& (f = XFRAME (w->frame),
|
||||
width = FRAME_INTERNAL_BORDER_WIDTH (f),
|
||||
width != 0)
|
||||
&& (height = desired_row->visible_height,
|
||||
@ -3622,9 +3622,9 @@ We tell read_avail_input() that input is "expected" because we do expect
|
||||
EmacsScroller *bar;
|
||||
|
||||
/* optimization; display engine sends WAY too many of these.. */
|
||||
if (!NILP (WGET (window, vertical_scroll_bar)))
|
||||
if (!NILP (window->vertical_scroll_bar))
|
||||
{
|
||||
bar = XNS_SCROLL_BAR (WGET (window, vertical_scroll_bar));
|
||||
bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
|
||||
if ([bar checkSamePosition: position portion: portion whole: whole])
|
||||
{
|
||||
if (view->scrollbarsNeedingUpdate == 0)
|
||||
@ -3672,9 +3672,9 @@ We tell read_avail_input() that input is "expected" because we do expect
|
||||
/* we want at least 5 lines to display a scrollbar */
|
||||
if (WINDOW_TOTAL_LINES (window) < 5)
|
||||
{
|
||||
if (!NILP (WGET (window, vertical_scroll_bar)))
|
||||
if (!NILP (window->vertical_scroll_bar))
|
||||
{
|
||||
bar = XNS_SCROLL_BAR (WGET (window, vertical_scroll_bar));
|
||||
bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
|
||||
[bar removeFromSuperview];
|
||||
WSET (window, vertical_scroll_bar, Qnil);
|
||||
}
|
||||
@ -3683,7 +3683,7 @@ We tell read_avail_input() that input is "expected" because we do expect
|
||||
return;
|
||||
}
|
||||
|
||||
if (NILP (WGET (window, vertical_scroll_bar)))
|
||||
if (NILP (window->vertical_scroll_bar))
|
||||
{
|
||||
ns_clear_frame_area (f, sb_left, top, width, height);
|
||||
bar = [[EmacsScroller alloc] initFrame: r window: win];
|
||||
@ -3692,7 +3692,7 @@ We tell read_avail_input() that input is "expected" because we do expect
|
||||
else
|
||||
{
|
||||
NSRect oldRect;
|
||||
bar = XNS_SCROLL_BAR (WGET (window, vertical_scroll_bar));
|
||||
bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
|
||||
oldRect = [bar frame];
|
||||
r.size.width = oldRect.size.width;
|
||||
if (FRAME_LIVE_P (f) && !NSEqualRects (oldRect, r))
|
||||
@ -3739,9 +3739,9 @@ We tell read_avail_input() that input is "expected" because we do expect
|
||||
{
|
||||
id bar;
|
||||
NSTRACE (ns_redeem_scroll_bar);
|
||||
if (!NILP (WGET (window, vertical_scroll_bar)))
|
||||
if (!NILP (window->vertical_scroll_bar))
|
||||
{
|
||||
bar = XNS_SCROLL_BAR (WGET (window, vertical_scroll_bar));
|
||||
bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
|
||||
[bar reprieve];
|
||||
}
|
||||
}
|
||||
@ -6061,8 +6061,7 @@ - (id)accessibilityAttributeValue:(NSString *)attribute
|
||||
{
|
||||
Lisp_Object str = Qnil;
|
||||
struct frame *f = SELECTED_FRAME ();
|
||||
struct buffer *curbuf
|
||||
= XBUFFER (WGET (XWINDOW (f->selected_window), buffer));
|
||||
struct buffer *curbuf = XBUFFER (XWINDOW (f->selected_window)->buffer);
|
||||
|
||||
if ([attribute isEqualToString:NSAccessibilityRoleAttribute])
|
||||
return NSAccessibilityTextFieldRole;
|
||||
@ -6237,7 +6236,7 @@ + (CGFloat) scrollerWidth
|
||||
if (pixel_height == 0) pixel_height = 1;
|
||||
min_portion = 20 / pixel_height;
|
||||
|
||||
frame = XFRAME (WGET (XWINDOW (win), frame));
|
||||
frame = XFRAME (XWINDOW (win)->frame);
|
||||
if (FRAME_LIVE_P (frame))
|
||||
{
|
||||
int i;
|
||||
|
@ -1773,10 +1773,10 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
|
||||
strout ("#<window ", -1, -1, printcharfun);
|
||||
len = sprintf (buf, "%d", XWINDOW (obj)->sequence_number);
|
||||
strout (buf, len, len, printcharfun);
|
||||
if (!NILP (WGET (XWINDOW (obj), buffer)))
|
||||
if (!NILP (XWINDOW (obj)->buffer))
|
||||
{
|
||||
strout (" on ", -1, -1, printcharfun);
|
||||
print_string (BVAR (XBUFFER (WGET (XWINDOW (obj), buffer)), name),
|
||||
print_string (BVAR (XBUFFER (XWINDOW (obj)->buffer), name),
|
||||
printcharfun);
|
||||
}
|
||||
PRINTCHAR ('>');
|
||||
|
@ -587,7 +587,7 @@ get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop,
|
||||
if (WINDOWP (object))
|
||||
{
|
||||
w = XWINDOW (object);
|
||||
object = WGET (w, buffer);
|
||||
object = w->buffer;
|
||||
}
|
||||
if (BUFFERP (object))
|
||||
{
|
||||
|
@ -5635,13 +5635,13 @@ Text larger than the specified size is clipped. */)
|
||||
WSET (w, total_lines, make_number (40));
|
||||
}
|
||||
|
||||
FRAME_TOTAL_COLS (f) = XINT (WGET (w, total_cols));
|
||||
FRAME_TOTAL_COLS (f) = XINT (w->total_cols);
|
||||
adjust_glyphs (f);
|
||||
w->pseudo_window_p = 1;
|
||||
|
||||
/* Display the tooltip text in a temporary buffer. */
|
||||
old_buffer = current_buffer;
|
||||
set_buffer_internal_1 (XBUFFER (WGET (XWINDOW (FRAME_ROOT_WINDOW (f)), buffer)));
|
||||
set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->buffer));
|
||||
BVAR (current_buffer, truncate_lines) = Qnil;
|
||||
clear_glyph_matrix (w->desired_matrix);
|
||||
clear_glyph_matrix (w->current_matrix);
|
||||
|
@ -394,7 +394,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
|
||||
if (! menubar_widget)
|
||||
previous_menu_items_used = 0;
|
||||
|
||||
buffer = WGET (XWINDOW (FRAME_SELECTED_WINDOW (f)), buffer);
|
||||
buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer;
|
||||
specbind (Qinhibit_quit, Qt);
|
||||
/* Don't let the debugger step into this code
|
||||
because it is not reentrant. */
|
||||
|
@ -649,7 +649,7 @@ static void
|
||||
x_update_window_end (struct window *w, int cursor_on_p,
|
||||
int mouse_face_overwritten_p)
|
||||
{
|
||||
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WGET (w, frame)));
|
||||
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
|
||||
|
||||
if (!w->pseudo_window_p)
|
||||
{
|
||||
@ -754,7 +754,7 @@ x_after_update_window_line (struct glyph_row *desired_row)
|
||||
overhead is very small. */
|
||||
if (windows_or_buffers_changed
|
||||
&& desired_row->full_width_p
|
||||
&& (f = XFRAME (WGET (w, frame)),
|
||||
&& (f = XFRAME (w->frame),
|
||||
width = FRAME_INTERNAL_BORDER_WIDTH (f),
|
||||
width != 0)
|
||||
&& (height = desired_row->visible_height,
|
||||
@ -2718,7 +2718,7 @@ x_ins_del_lines (struct frame *f, int vpos, int n)
|
||||
static void
|
||||
x_scroll_run (struct window *w, struct run *run)
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
int x, y, width, height, from_y, to_y, bottom_y;
|
||||
HWND hwnd = FRAME_W32_WINDOW (f);
|
||||
HRGN expect_dirty;
|
||||
@ -3683,7 +3683,7 @@ static void
|
||||
w32_set_vertical_scroll_bar (struct window *w,
|
||||
int portion, int whole, int position)
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
Lisp_Object barobj;
|
||||
struct scroll_bar *bar;
|
||||
int top, height, left, sb_left, width, sb_width;
|
||||
@ -3724,7 +3724,7 @@ w32_set_vertical_scroll_bar (struct window *w,
|
||||
|| WINDOW_RIGHT_MARGIN_COLS (w) == 0));
|
||||
|
||||
/* Does the scroll bar exist yet? */
|
||||
if (NILP (WGET (w, vertical_scroll_bar)))
|
||||
if (NILP (w->vertical_scroll_bar))
|
||||
{
|
||||
HDC hdc;
|
||||
BLOCK_INPUT;
|
||||
@ -3746,7 +3746,7 @@ w32_set_vertical_scroll_bar (struct window *w,
|
||||
/* It may just need to be moved and resized. */
|
||||
HWND hwnd;
|
||||
|
||||
bar = XSCROLL_BAR (WGET (w, vertical_scroll_bar));
|
||||
bar = XSCROLL_BAR (w->vertical_scroll_bar);
|
||||
hwnd = SCROLL_BAR_W32_WINDOW (bar);
|
||||
|
||||
/* If already correctly positioned, do nothing. */
|
||||
@ -3853,10 +3853,10 @@ w32_redeem_scroll_bar (struct window *window)
|
||||
struct frame *f;
|
||||
|
||||
/* We can't redeem this window's scroll bar if it doesn't have one. */
|
||||
if (NILP (WGET (window, vertical_scroll_bar)))
|
||||
if (NILP (window->vertical_scroll_bar))
|
||||
abort ();
|
||||
|
||||
bar = XSCROLL_BAR (WGET (window, vertical_scroll_bar));
|
||||
bar = XSCROLL_BAR (window->vertical_scroll_bar);
|
||||
|
||||
/* Unlink it from the condemned list. */
|
||||
f = XFRAME (WINDOW_FRAME (window));
|
||||
@ -3864,11 +3864,11 @@ w32_redeem_scroll_bar (struct window *window)
|
||||
{
|
||||
/* If the prev pointer is nil, it must be the first in one of
|
||||
the lists. */
|
||||
if (EQ (FRAME_SCROLL_BARS (f), WGET (window, vertical_scroll_bar)))
|
||||
if (EQ (FRAME_SCROLL_BARS (f), window->vertical_scroll_bar))
|
||||
/* It's not condemned. Everything's fine. */
|
||||
return;
|
||||
else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
|
||||
WGET (window, vertical_scroll_bar)))
|
||||
window->vertical_scroll_bar))
|
||||
FSET (f, condemned_scroll_bars, bar->next);
|
||||
else
|
||||
/* If its prev pointer is nil, it must be at the front of
|
||||
@ -4427,8 +4427,8 @@ w32_read_socket (struct terminal *terminal, int expected,
|
||||
create event iff we don't leave the
|
||||
selected frame. */
|
||||
&& (focus_follows_mouse
|
||||
|| (EQ (WGET (XWINDOW (window), frame),
|
||||
WGET (XWINDOW (selected_window), frame)))))
|
||||
|| (EQ (XWINDOW (window)->frame,
|
||||
XWINDOW (selected_window)->frame))))
|
||||
{
|
||||
inev.kind = SELECT_WINDOW_EVENT;
|
||||
inev.frame_or_window = window;
|
||||
@ -5043,7 +5043,7 @@ static void
|
||||
x_draw_bar_cursor (struct window *w, struct glyph_row *row,
|
||||
int width, enum text_cursor_kinds kind)
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
struct glyph *cursor_glyph;
|
||||
|
||||
/* If cursor is out of bounds, don't draw garbage. This can happen
|
||||
|
935
src/window.c
935
src/window.c
File diff suppressed because it is too large
Load Diff
224
src/window.h
224
src/window.h
@ -86,15 +86,9 @@ struct cursor_pos
|
||||
int hpos, vpos;
|
||||
};
|
||||
|
||||
/* Most code should use these macros to access Lisp fields
|
||||
in struct window. WGET should not be used as lvalue. */
|
||||
/* Most code should use this macro to set Lisp fields in struct window. */
|
||||
|
||||
#define WGET(f, field) \
|
||||
(eassert (offsetof (struct window, field ## _) \
|
||||
< offsetof (struct window, current_matrix)), \
|
||||
((f)->INTERNAL_FIELD (field)))
|
||||
|
||||
#define WSET(w, field, value) ((w)->INTERNAL_FIELD (field) = (value))
|
||||
#define WSET(w, field, value) ((w)->field = (value))
|
||||
|
||||
struct window
|
||||
{
|
||||
@ -102,140 +96,140 @@ struct window
|
||||
struct vectorlike_header header;
|
||||
|
||||
/* The frame this window is on. */
|
||||
Lisp_Object INTERNAL_FIELD (frame);
|
||||
Lisp_Object frame;
|
||||
|
||||
/* Following (to right or down) and preceding (to left or up) child
|
||||
at same level of tree. */
|
||||
Lisp_Object INTERNAL_FIELD (next);
|
||||
Lisp_Object INTERNAL_FIELD (prev);
|
||||
Lisp_Object next;
|
||||
Lisp_Object prev;
|
||||
|
||||
/* First child of this window: vchild is used if this is a vertical
|
||||
combination, hchild if this is a horizontal combination. Of the
|
||||
fields vchild, hchild and buffer, one and only one is non-nil
|
||||
unless the window is dead. */
|
||||
Lisp_Object INTERNAL_FIELD (hchild);
|
||||
Lisp_Object INTERNAL_FIELD (vchild);
|
||||
Lisp_Object hchild;
|
||||
Lisp_Object vchild;
|
||||
|
||||
/* The window this one is a child of. */
|
||||
Lisp_Object INTERNAL_FIELD (parent);
|
||||
Lisp_Object parent;
|
||||
|
||||
/* The upper left corner coordinates of this window, as integers
|
||||
relative to upper left corner of frame = 0, 0. */
|
||||
Lisp_Object INTERNAL_FIELD (left_col);
|
||||
Lisp_Object INTERNAL_FIELD (top_line);
|
||||
Lisp_Object left_col;
|
||||
Lisp_Object top_line;
|
||||
|
||||
/* The size of the window. */
|
||||
Lisp_Object INTERNAL_FIELD (total_lines);
|
||||
Lisp_Object INTERNAL_FIELD (total_cols);
|
||||
Lisp_Object total_lines;
|
||||
Lisp_Object total_cols;
|
||||
|
||||
/* The normal size of the window. */
|
||||
Lisp_Object INTERNAL_FIELD (normal_lines);
|
||||
Lisp_Object INTERNAL_FIELD (normal_cols);
|
||||
Lisp_Object normal_lines;
|
||||
Lisp_Object normal_cols;
|
||||
|
||||
/* New sizes of the window. */
|
||||
Lisp_Object INTERNAL_FIELD (new_total);
|
||||
Lisp_Object INTERNAL_FIELD (new_normal);
|
||||
Lisp_Object new_total;
|
||||
Lisp_Object new_normal;
|
||||
|
||||
/* The buffer displayed in this window. Of the fields vchild,
|
||||
hchild and buffer, one and only one is non-nil unless the window
|
||||
is dead. */
|
||||
Lisp_Object INTERNAL_FIELD (buffer);
|
||||
Lisp_Object buffer;
|
||||
|
||||
/* A marker pointing to where in the text to start displaying.
|
||||
BIDI Note: This is the _logical-order_ start, i.e. the smallest
|
||||
buffer position visible in the window, not necessarily the
|
||||
character displayed in the top left corner of the window. */
|
||||
Lisp_Object INTERNAL_FIELD (start);
|
||||
Lisp_Object start;
|
||||
|
||||
/* A marker pointing to where in the text point is in this window,
|
||||
used only when the window is not selected.
|
||||
This exists so that when multiple windows show one buffer
|
||||
each one can have its own value of point. */
|
||||
Lisp_Object INTERNAL_FIELD (pointm);
|
||||
Lisp_Object pointm;
|
||||
|
||||
/* No permanent meaning; used by save-window-excursion's
|
||||
bookkeeping. */
|
||||
Lisp_Object INTERNAL_FIELD (temslot);
|
||||
Lisp_Object temslot;
|
||||
|
||||
/* This window's vertical scroll bar. This field is only for use
|
||||
by the window-system-dependent code which implements the
|
||||
scroll bars; it can store anything it likes here. If this
|
||||
window is newly created and we haven't displayed a scroll bar in
|
||||
it yet, or if the frame doesn't have any scroll bars, this is nil. */
|
||||
Lisp_Object INTERNAL_FIELD (vertical_scroll_bar);
|
||||
Lisp_Object vertical_scroll_bar;
|
||||
|
||||
/* Width of left and right marginal areas. A value of nil means
|
||||
no margin. */
|
||||
Lisp_Object INTERNAL_FIELD (left_margin_cols);
|
||||
Lisp_Object INTERNAL_FIELD (right_margin_cols);
|
||||
Lisp_Object left_margin_cols;
|
||||
Lisp_Object right_margin_cols;
|
||||
|
||||
/* Width of left and right fringes.
|
||||
A value of nil or t means use frame values. */
|
||||
Lisp_Object INTERNAL_FIELD (left_fringe_width);
|
||||
Lisp_Object INTERNAL_FIELD (right_fringe_width);
|
||||
Lisp_Object left_fringe_width;
|
||||
Lisp_Object right_fringe_width;
|
||||
|
||||
/* Pixel width of scroll bars.
|
||||
A value of nil or t means use frame values. */
|
||||
Lisp_Object INTERNAL_FIELD (scroll_bar_width);
|
||||
Lisp_Object scroll_bar_width;
|
||||
|
||||
/* Type of vertical scroll bar. A value of nil means
|
||||
no scroll bar. A value of t means use frame value. */
|
||||
Lisp_Object INTERNAL_FIELD (vertical_scroll_bar_type);
|
||||
Lisp_Object vertical_scroll_bar_type;
|
||||
|
||||
/* Z - the buffer position of the last glyph in the current matrix
|
||||
of W. Only valid if WINDOW_END_VALID is not nil. */
|
||||
Lisp_Object INTERNAL_FIELD (window_end_pos);
|
||||
Lisp_Object window_end_pos;
|
||||
/* Glyph matrix row of the last glyph in the current matrix
|
||||
of W. Only valid if WINDOW_END_VALID is not nil. */
|
||||
Lisp_Object INTERNAL_FIELD (window_end_vpos);
|
||||
Lisp_Object window_end_vpos;
|
||||
/* t if window_end_pos is truly valid.
|
||||
This is nil if nontrivial redisplay is preempted
|
||||
since in that case the frame image that window_end_pos
|
||||
did not get onto the frame. */
|
||||
Lisp_Object INTERNAL_FIELD (window_end_valid);
|
||||
Lisp_Object window_end_valid;
|
||||
|
||||
/* Display-table to use for displaying chars in this window.
|
||||
Nil means use the buffer's own display-table. */
|
||||
Lisp_Object INTERNAL_FIELD (display_table);
|
||||
Lisp_Object display_table;
|
||||
|
||||
/* Non-nil usually means window is marked as dedicated.
|
||||
Note Lisp code may set this to something beyond Qnil
|
||||
and Qt, so bitfield can't be used here. */
|
||||
Lisp_Object INTERNAL_FIELD (dedicated);
|
||||
Lisp_Object dedicated;
|
||||
|
||||
/* Line number and position of a line somewhere above the top of the
|
||||
screen. If this field is nil, it means we don't have a base
|
||||
line. */
|
||||
Lisp_Object INTERNAL_FIELD (base_line_number);
|
||||
Lisp_Object base_line_number;
|
||||
/* If this field is nil, it means we don't have a base line.
|
||||
If it is a buffer, it means don't display the line number
|
||||
as long as the window shows that buffer. */
|
||||
Lisp_Object INTERNAL_FIELD (base_line_pos);
|
||||
Lisp_Object base_line_pos;
|
||||
|
||||
/* If we have highlighted the region (or any part of it),
|
||||
this is the mark position that we used, as an integer. */
|
||||
Lisp_Object INTERNAL_FIELD (region_showing);
|
||||
Lisp_Object region_showing;
|
||||
|
||||
/* The column number currently displayed in this window's mode line,
|
||||
or nil if column numbers are not being displayed. */
|
||||
Lisp_Object INTERNAL_FIELD (column_number_displayed);
|
||||
Lisp_Object column_number_displayed;
|
||||
|
||||
/* If redisplay in this window goes beyond this buffer position,
|
||||
must run the redisplay-end-trigger-hook. */
|
||||
Lisp_Object INTERNAL_FIELD (redisplay_end_trigger);
|
||||
Lisp_Object redisplay_end_trigger;
|
||||
|
||||
/* t means this window's child windows are not (re-)combined. */
|
||||
Lisp_Object INTERNAL_FIELD (combination_limit);
|
||||
Lisp_Object combination_limit;
|
||||
|
||||
/* Alist of <buffer, window-start, window-point> triples listing
|
||||
buffers previously shown in this window. */
|
||||
Lisp_Object INTERNAL_FIELD (prev_buffers);
|
||||
Lisp_Object prev_buffers;
|
||||
|
||||
/* List of buffers re-shown in this window. */
|
||||
Lisp_Object INTERNAL_FIELD (next_buffers);
|
||||
Lisp_Object next_buffers;
|
||||
|
||||
/* An alist with parameters. */
|
||||
Lisp_Object INTERNAL_FIELD (window_parameters);
|
||||
Lisp_Object window_parameters;
|
||||
|
||||
/* No Lisp data may follow below this point without changing
|
||||
mark_object in alloc.c. The member current_matrix must be the
|
||||
@ -402,13 +396,13 @@ struct window
|
||||
This includes scroll bars and fringes. */
|
||||
|
||||
#define WINDOW_TOTAL_COLS(W) \
|
||||
(XFASTINT (WGET (W, total_cols)))
|
||||
(XFASTINT (W->total_cols))
|
||||
|
||||
/* Return the height of window W in canonical line units.
|
||||
This includes header and mode lines, if any. */
|
||||
|
||||
#define WINDOW_TOTAL_LINES(W) \
|
||||
(XFASTINT (WGET (W, total_lines)))
|
||||
(XFASTINT (W->total_lines))
|
||||
|
||||
/* Return the total pixel width of window W. */
|
||||
|
||||
@ -436,7 +430,7 @@ struct window
|
||||
This includes a left-hand scroll bar, if any. */
|
||||
|
||||
#define WINDOW_LEFT_EDGE_COL(W) \
|
||||
(XFASTINT (WGET (W, left_col)))
|
||||
(XFASTINT (W->left_col))
|
||||
|
||||
/* Return the canonical frame column before which window W ends.
|
||||
This includes a right-hand scroll bar, if any. */
|
||||
@ -448,7 +442,7 @@ struct window
|
||||
This includes a header line, if any. */
|
||||
|
||||
#define WINDOW_TOP_EDGE_LINE(W) \
|
||||
(XFASTINT (WGET (W, top_line)))
|
||||
(XFASTINT (W->top_line))
|
||||
|
||||
/* Return the canonical frame line before which window W ends.
|
||||
This includes a mode line, if any. */
|
||||
@ -552,32 +546,32 @@ struct window
|
||||
|
||||
/* Width of left margin area in columns. */
|
||||
|
||||
#define WINDOW_LEFT_MARGIN_COLS(W) \
|
||||
(NILP (WGET (W, left_margin_cols)) \
|
||||
? 0 \
|
||||
: XINT (WGET (W, left_margin_cols)))
|
||||
#define WINDOW_LEFT_MARGIN_COLS(W) \
|
||||
(NILP (W->left_margin_cols) \
|
||||
? 0 \
|
||||
: XINT (W->left_margin_cols))
|
||||
|
||||
/* Width of right marginal area in columns. */
|
||||
|
||||
#define WINDOW_RIGHT_MARGIN_COLS(W) \
|
||||
(NILP (WGET (W, right_margin_cols)) \
|
||||
? 0 \
|
||||
: XINT (WGET (W, right_margin_cols)))
|
||||
#define WINDOW_RIGHT_MARGIN_COLS(W) \
|
||||
(NILP (W->right_margin_cols) \
|
||||
? 0 \
|
||||
: XINT (W->right_margin_cols))
|
||||
|
||||
/* Width of left margin area in pixels. */
|
||||
|
||||
#define WINDOW_LEFT_MARGIN_WIDTH(W) \
|
||||
(NILP (WGET (W, left_margin_cols)) \
|
||||
? 0 \
|
||||
: (XINT (WGET (W, left_margin_cols)) \
|
||||
#define WINDOW_LEFT_MARGIN_WIDTH(W) \
|
||||
(NILP (W->left_margin_cols) \
|
||||
? 0 \
|
||||
: (XINT (W->left_margin_cols) \
|
||||
* WINDOW_FRAME_COLUMN_WIDTH (W)))
|
||||
|
||||
/* Width of right marginal area in pixels. */
|
||||
|
||||
#define WINDOW_RIGHT_MARGIN_WIDTH(W) \
|
||||
(NILP (WGET (W, right_margin_cols)) \
|
||||
? 0 \
|
||||
: (XINT (WGET (W, right_margin_cols)) \
|
||||
#define WINDOW_RIGHT_MARGIN_WIDTH(W) \
|
||||
(NILP (W->right_margin_cols) \
|
||||
? 0 \
|
||||
: (XINT (W->right_margin_cols) \
|
||||
* WINDOW_FRAME_COLUMN_WIDTH (W)))
|
||||
|
||||
/* Total width of fringes reserved for drawing truncation bitmaps,
|
||||
@ -586,37 +580,37 @@ struct window
|
||||
sizes aren't pixel values. If it weren't the case, we wouldn't be
|
||||
able to split windows horizontally nicely. */
|
||||
|
||||
#define WINDOW_FRINGE_COLS(W) \
|
||||
((INTEGERP (WGET (W, left_fringe_width)) \
|
||||
|| INTEGERP (WGET (W, right_fringe_width))) \
|
||||
? ((WINDOW_LEFT_FRINGE_WIDTH (W) \
|
||||
+ WINDOW_RIGHT_FRINGE_WIDTH (W) \
|
||||
+ WINDOW_FRAME_COLUMN_WIDTH (W) - 1) \
|
||||
/ WINDOW_FRAME_COLUMN_WIDTH (W)) \
|
||||
#define WINDOW_FRINGE_COLS(W) \
|
||||
((INTEGERP (W->left_fringe_width) \
|
||||
|| INTEGERP (W->right_fringe_width)) \
|
||||
? ((WINDOW_LEFT_FRINGE_WIDTH (W) \
|
||||
+ WINDOW_RIGHT_FRINGE_WIDTH (W) \
|
||||
+ WINDOW_FRAME_COLUMN_WIDTH (W) - 1) \
|
||||
/ WINDOW_FRAME_COLUMN_WIDTH (W)) \
|
||||
: FRAME_FRINGE_COLS (WINDOW_XFRAME (W)))
|
||||
|
||||
/* Column-width of the left and right fringe. */
|
||||
|
||||
#define WINDOW_LEFT_FRINGE_COLS(W) \
|
||||
((WINDOW_LEFT_FRINGE_WIDTH ((W)) \
|
||||
+ WINDOW_FRAME_COLUMN_WIDTH (W) - 1) \
|
||||
#define WINDOW_LEFT_FRINGE_COLS(W) \
|
||||
((WINDOW_LEFT_FRINGE_WIDTH ((W)) \
|
||||
+ WINDOW_FRAME_COLUMN_WIDTH (W) - 1) \
|
||||
/ WINDOW_FRAME_COLUMN_WIDTH (W))
|
||||
|
||||
#define WINDOW_RIGHT_FRINGE_COLS(W) \
|
||||
((WINDOW_RIGHT_FRINGE_WIDTH ((W)) \
|
||||
+ WINDOW_FRAME_COLUMN_WIDTH (W) - 1) \
|
||||
#define WINDOW_RIGHT_FRINGE_COLS(W) \
|
||||
((WINDOW_RIGHT_FRINGE_WIDTH ((W)) \
|
||||
+ WINDOW_FRAME_COLUMN_WIDTH (W) - 1) \
|
||||
/ WINDOW_FRAME_COLUMN_WIDTH (W))
|
||||
|
||||
/* Pixel-width of the left and right fringe. */
|
||||
|
||||
#define WINDOW_LEFT_FRINGE_WIDTH(W) \
|
||||
(INTEGERP (WGET (W, left_fringe_width)) \
|
||||
? XFASTINT (WGET (W, left_fringe_width)) \
|
||||
(INTEGERP (W->left_fringe_width) \
|
||||
? XFASTINT (W->left_fringe_width) \
|
||||
: FRAME_LEFT_FRINGE_WIDTH (WINDOW_XFRAME (W)))
|
||||
|
||||
#define WINDOW_RIGHT_FRINGE_WIDTH(W) \
|
||||
(INTEGERP (WGET (W, right_fringe_width)) \
|
||||
? XFASTINT (WGET (W, right_fringe_width)) \
|
||||
(INTEGERP (W->right_fringe_width) \
|
||||
? XFASTINT (W->right_fringe_width) \
|
||||
: FRAME_RIGHT_FRINGE_WIDTH (WINDOW_XFRAME (W)))
|
||||
|
||||
/* Total width of fringes in pixels. */
|
||||
@ -633,36 +627,36 @@ struct window
|
||||
and which side they are on. */
|
||||
|
||||
#define WINDOW_VERTICAL_SCROLL_BAR_TYPE(w) \
|
||||
(EQ (WGET (w, vertical_scroll_bar_type), Qt) \
|
||||
(EQ (w->vertical_scroll_bar_type, Qt) \
|
||||
? FRAME_VERTICAL_SCROLL_BAR_TYPE (WINDOW_XFRAME (w)) \
|
||||
: EQ (WGET (w, vertical_scroll_bar_type), Qleft) \
|
||||
: EQ (w->vertical_scroll_bar_type, Qleft) \
|
||||
? vertical_scroll_bar_left \
|
||||
: EQ (WGET (w, vertical_scroll_bar_type), Qright) \
|
||||
: EQ (w->vertical_scroll_bar_type, Qright) \
|
||||
? vertical_scroll_bar_right \
|
||||
: vertical_scroll_bar_none) \
|
||||
|
||||
#define WINDOW_HAS_VERTICAL_SCROLL_BAR(w) \
|
||||
(EQ (WGET (w, vertical_scroll_bar_type), Qt) \
|
||||
(EQ (w->vertical_scroll_bar_type, Qt) \
|
||||
? FRAME_HAS_VERTICAL_SCROLL_BARS (WINDOW_XFRAME (w)) \
|
||||
: !NILP (WGET (w, vertical_scroll_bar_type)))
|
||||
: !NILP (w->vertical_scroll_bar_type))
|
||||
|
||||
#define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT(w) \
|
||||
(EQ (WGET (w, vertical_scroll_bar_type), Qt) \
|
||||
(EQ (w->vertical_scroll_bar_type, Qt) \
|
||||
? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (WINDOW_XFRAME (w)) \
|
||||
: EQ (WGET (w, vertical_scroll_bar_type), Qleft))
|
||||
: EQ (w->vertical_scroll_bar_type, Qleft))
|
||||
|
||||
#define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT(w) \
|
||||
(EQ (WGET (w, vertical_scroll_bar_type), Qt) \
|
||||
? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (WINDOW_XFRAME (w))\
|
||||
: EQ (WGET (w, vertical_scroll_bar_type), Qright))
|
||||
#define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT(w) \
|
||||
(EQ (w->vertical_scroll_bar_type, Qt) \
|
||||
? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (WINDOW_XFRAME (w)) \
|
||||
: EQ (w->vertical_scroll_bar_type, Qright))
|
||||
|
||||
/* Width that a scroll bar in window W should have, if there is one.
|
||||
Measured in pixels. If scroll bars are turned off, this is still
|
||||
nonzero. */
|
||||
|
||||
#define WINDOW_CONFIG_SCROLL_BAR_WIDTH(w) \
|
||||
(INTEGERP (WGET (w, scroll_bar_width)) \
|
||||
? XFASTINT (WGET (w, scroll_bar_width)) \
|
||||
(INTEGERP (w->scroll_bar_width) \
|
||||
? XFASTINT (w->scroll_bar_width) \
|
||||
: FRAME_CONFIG_SCROLL_BAR_WIDTH (WINDOW_XFRAME (w)))
|
||||
|
||||
/* Width that a scroll bar in window W should have, if there is one.
|
||||
@ -670,8 +664,8 @@ struct window
|
||||
this is still nonzero. */
|
||||
|
||||
#define WINDOW_CONFIG_SCROLL_BAR_COLS(w) \
|
||||
(INTEGERP (WGET (w, scroll_bar_width)) \
|
||||
? ((XFASTINT (WGET (w, scroll_bar_width)) \
|
||||
(INTEGERP (w->scroll_bar_width) \
|
||||
? ((XFASTINT (w->scroll_bar_width) \
|
||||
+ WINDOW_FRAME_COLUMN_WIDTH (w) - 1) \
|
||||
/ WINDOW_FRAME_COLUMN_WIDTH (w)) \
|
||||
: FRAME_CONFIG_SCROLL_BAR_COLS (WINDOW_XFRAME (w)))
|
||||
@ -681,14 +675,14 @@ struct window
|
||||
the right in this frame, or there are no scroll bars, value is 0. */
|
||||
|
||||
#define WINDOW_LEFT_SCROLL_BAR_COLS(w) \
|
||||
(WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) \
|
||||
(WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) \
|
||||
? (WINDOW_CONFIG_SCROLL_BAR_COLS (w)) \
|
||||
: 0)
|
||||
|
||||
/* Width of a left scroll bar area in window W , measured in pixels. */
|
||||
|
||||
#define WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH(w) \
|
||||
(WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) \
|
||||
#define WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH(w) \
|
||||
(WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) \
|
||||
? (WINDOW_CONFIG_SCROLL_BAR_COLS (w) * WINDOW_FRAME_COLUMN_WIDTH (w)) \
|
||||
: 0)
|
||||
|
||||
@ -697,7 +691,7 @@ struct window
|
||||
the left in this frame, or there are no scroll bars, value is 0. */
|
||||
|
||||
#define WINDOW_RIGHT_SCROLL_BAR_COLS(w) \
|
||||
(WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w) \
|
||||
(WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w) \
|
||||
? WINDOW_CONFIG_SCROLL_BAR_COLS (w) \
|
||||
: 0)
|
||||
|
||||
@ -719,7 +713,7 @@ struct window
|
||||
/* Width of a left scroll bar area in window W , measured in pixels. */
|
||||
|
||||
#define WINDOW_SCROLL_BAR_AREA_WIDTH(w) \
|
||||
(WINDOW_HAS_VERTICAL_SCROLL_BAR (w) \
|
||||
(WINDOW_HAS_VERTICAL_SCROLL_BAR (w) \
|
||||
? (WINDOW_CONFIG_SCROLL_BAR_COLS (w) * WINDOW_FRAME_COLUMN_WIDTH (w)) \
|
||||
: 0)
|
||||
|
||||
@ -740,7 +734,7 @@ struct window
|
||||
? CURRENT_MODE_LINE_HEIGHT (W) \
|
||||
: 0)
|
||||
|
||||
#define WINDOW_MODE_LINE_LINES(W) \
|
||||
#define WINDOW_MODE_LINE_LINES(W) \
|
||||
(!! WINDOW_WANTS_MODELINE_P ((W)))
|
||||
|
||||
/* Height in pixels, and in lines, of the header line.
|
||||
@ -751,7 +745,7 @@ struct window
|
||||
? CURRENT_HEADER_LINE_HEIGHT (W) \
|
||||
: 0)
|
||||
|
||||
#define WINDOW_HEADER_LINE_LINES(W) \
|
||||
#define WINDOW_HEADER_LINE_LINES(W) \
|
||||
(!! WINDOW_WANTS_HEADER_LINE_P ((W)))
|
||||
|
||||
/* Pixel height of window W without mode line. */
|
||||
@ -762,36 +756,36 @@ struct window
|
||||
|
||||
/* Pixel height of window W without mode and header line. */
|
||||
|
||||
#define WINDOW_BOX_TEXT_HEIGHT(W) \
|
||||
(WINDOW_TOTAL_HEIGHT ((W)) \
|
||||
- WINDOW_MODE_LINE_HEIGHT ((W)) \
|
||||
#define WINDOW_BOX_TEXT_HEIGHT(W) \
|
||||
(WINDOW_TOTAL_HEIGHT ((W)) \
|
||||
- WINDOW_MODE_LINE_HEIGHT ((W)) \
|
||||
- WINDOW_HEADER_LINE_HEIGHT ((W)))
|
||||
|
||||
|
||||
/* Convert window W relative pixel X to frame pixel coordinates. */
|
||||
|
||||
#define WINDOW_TO_FRAME_PIXEL_X(W, X) \
|
||||
#define WINDOW_TO_FRAME_PIXEL_X(W, X) \
|
||||
((X) + WINDOW_BOX_LEFT_EDGE_X ((W)))
|
||||
|
||||
/* Convert window W relative pixel Y to frame pixel coordinates. */
|
||||
|
||||
#define WINDOW_TO_FRAME_PIXEL_Y(W, Y) \
|
||||
#define WINDOW_TO_FRAME_PIXEL_Y(W, Y) \
|
||||
((Y) + WINDOW_TOP_EDGE_Y ((W)))
|
||||
|
||||
/* Convert frame relative pixel X to window relative pixel X. */
|
||||
|
||||
#define FRAME_TO_WINDOW_PIXEL_X(W, X) \
|
||||
#define FRAME_TO_WINDOW_PIXEL_X(W, X) \
|
||||
((X) - WINDOW_BOX_LEFT_EDGE_X ((W)))
|
||||
|
||||
/* Convert frame relative pixel Y to window relative pixel Y. */
|
||||
|
||||
#define FRAME_TO_WINDOW_PIXEL_Y(W, Y) \
|
||||
#define FRAME_TO_WINDOW_PIXEL_Y(W, Y) \
|
||||
((Y) - WINDOW_TOP_EDGE_Y ((W)))
|
||||
|
||||
/* Convert a text area relative x-position in window W to frame X
|
||||
pixel coordinates. */
|
||||
|
||||
#define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X) \
|
||||
#define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X) \
|
||||
(window_box_left ((W), TEXT_AREA) + (X))
|
||||
|
||||
/* This is the window in which the terminal's cursor should
|
||||
@ -894,7 +888,7 @@ struct glyph *get_phys_cursor_glyph (struct window *w);
|
||||
/* Value is non-zero if WINDOW is a live window. */
|
||||
|
||||
#define WINDOW_LIVE_P(WINDOW) \
|
||||
(WINDOWP (WINDOW) && !NILP (WGET (XWINDOW (WINDOW), buffer)))
|
||||
(WINDOWP (WINDOW) && !NILP (XWINDOW (WINDOW)->buffer))
|
||||
|
||||
/* These used to be in lisp.h. */
|
||||
|
||||
|
557
src/xdisp.c
557
src/xdisp.c
File diff suppressed because it is too large
Load Diff
12
src/xfaces.c
12
src/xfaces.c
@ -6032,7 +6032,7 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
|
||||
ptrdiff_t *endptr, ptrdiff_t limit,
|
||||
int mouse, int base_face_id)
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
Lisp_Object attrs[LFACE_VECTOR_SIZE];
|
||||
Lisp_Object prop, position;
|
||||
ptrdiff_t i, noverlays;
|
||||
@ -6054,9 +6054,9 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
|
||||
|
||||
/* Get the `face' or `mouse_face' text property at POS, and
|
||||
determine the next position at which the property changes. */
|
||||
prop = Fget_text_property (position, propname, WGET (w, buffer));
|
||||
prop = Fget_text_property (position, propname, w->buffer);
|
||||
XSETFASTINT (limit1, (limit < endpos ? limit : endpos));
|
||||
end = Fnext_single_property_change (position, propname, WGET (w, buffer), limit1);
|
||||
end = Fnext_single_property_change (position, propname, w->buffer, limit1);
|
||||
if (INTEGERP (end))
|
||||
endpos = XINT (end);
|
||||
|
||||
@ -6142,7 +6142,7 @@ face_for_overlay_string (struct window *w, ptrdiff_t pos,
|
||||
ptrdiff_t *endptr, ptrdiff_t limit,
|
||||
int mouse, Lisp_Object overlay)
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
Lisp_Object attrs[LFACE_VECTOR_SIZE];
|
||||
Lisp_Object prop, position;
|
||||
ptrdiff_t endpos;
|
||||
@ -6162,9 +6162,9 @@ face_for_overlay_string (struct window *w, ptrdiff_t pos,
|
||||
|
||||
/* Get the `face' or `mouse_face' text property at POS, and
|
||||
determine the next position at which the property changes. */
|
||||
prop = Fget_text_property (position, propname, WGET (w, buffer));
|
||||
prop = Fget_text_property (position, propname, w->buffer);
|
||||
XSETFASTINT (limit1, (limit < endpos ? limit : endpos));
|
||||
end = Fnext_single_property_change (position, propname, WGET (w, buffer), limit1);
|
||||
end = Fnext_single_property_change (position, propname, w->buffer, limit1);
|
||||
if (INTEGERP (end))
|
||||
endpos = XINT (end);
|
||||
|
||||
|
@ -2260,7 +2260,7 @@ free_frame_xic (struct frame *f)
|
||||
void
|
||||
xic_set_preeditarea (struct window *w, int x, int y)
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
XVaNestedList attr;
|
||||
XPoint spot;
|
||||
|
||||
@ -5085,13 +5085,13 @@ Text larger than the specified size is clipped. */)
|
||||
WSET (w, total_lines, make_number (40));
|
||||
}
|
||||
|
||||
FRAME_TOTAL_COLS (f) = XINT (WGET (w, total_cols));
|
||||
FRAME_TOTAL_COLS (f) = XINT (w->total_cols);
|
||||
adjust_glyphs (f);
|
||||
w->pseudo_window_p = 1;
|
||||
|
||||
/* Display the tooltip text in a temporary buffer. */
|
||||
old_buffer = current_buffer;
|
||||
set_buffer_internal_1 (XBUFFER (WGET (XWINDOW (FRAME_ROOT_WINDOW (f)), buffer)));
|
||||
set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->buffer));
|
||||
BVAR (current_buffer, truncate_lines) = Qnil;
|
||||
clear_glyph_matrix (w->desired_matrix);
|
||||
clear_glyph_matrix (w->current_matrix);
|
||||
|
@ -985,7 +985,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
|
||||
if (! menubar_widget)
|
||||
previous_menu_items_used = 0;
|
||||
|
||||
buffer = WGET (XWINDOW (FRAME_SELECTED_WINDOW (f)), buffer);
|
||||
buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer;
|
||||
specbind (Qinhibit_quit, Qt);
|
||||
/* Don't let the debugger step into this code
|
||||
because it is not reentrant. */
|
||||
|
38
src/xterm.c
38
src/xterm.c
@ -628,7 +628,7 @@ x_draw_vertical_window_border (struct window *w, int x, int y0, int y1)
|
||||
static void
|
||||
x_update_window_end (struct window *w, int cursor_on_p, int mouse_face_overwritten_p)
|
||||
{
|
||||
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WGET (w, frame)));
|
||||
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
|
||||
|
||||
if (!w->pseudo_window_p)
|
||||
{
|
||||
@ -728,7 +728,7 @@ x_after_update_window_line (struct glyph_row *desired_row)
|
||||
overhead is very small. */
|
||||
if (windows_or_buffers_changed
|
||||
&& desired_row->full_width_p
|
||||
&& (f = XFRAME (WGET (w, frame)),
|
||||
&& (f = XFRAME (w->frame),
|
||||
width = FRAME_INTERNAL_BORDER_WIDTH (f),
|
||||
width != 0)
|
||||
&& (height = desired_row->visible_height,
|
||||
@ -3295,7 +3295,7 @@ x_ins_del_lines (struct frame *f, int vpos, int n)
|
||||
static void
|
||||
x_scroll_run (struct window *w, struct run *run)
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
int x, y, width, height, from_y, to_y, bottom_y;
|
||||
|
||||
/* Get frame-relative bounding box of the text display area of W,
|
||||
@ -4244,9 +4244,9 @@ xt_action_hook (Widget widget, XtPointer client_data, String action_name,
|
||||
scroll_bar_end_scroll, 0, 0);
|
||||
w = XWINDOW (window_being_scrolled);
|
||||
|
||||
if (!NILP (XSCROLL_BAR (WGET (w, vertical_scroll_bar))->dragging))
|
||||
if (!NILP (XSCROLL_BAR (w->vertical_scroll_bar)->dragging))
|
||||
{
|
||||
XSCROLL_BAR (WGET (w, vertical_scroll_bar))->dragging = Qnil;
|
||||
XSCROLL_BAR (w->vertical_scroll_bar)->dragging = Qnil;
|
||||
/* The thumb size is incorrect while dragging: fix it. */
|
||||
set_vertical_scroll_bar (w);
|
||||
}
|
||||
@ -4277,7 +4277,7 @@ x_send_scroll_bar_event (Lisp_Object window, int part, int portion, int whole)
|
||||
XEvent event;
|
||||
XClientMessageEvent *ev = (XClientMessageEvent *) &event;
|
||||
struct window *w = XWINDOW (window);
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
ptrdiff_t i;
|
||||
|
||||
BLOCK_INPUT;
|
||||
@ -4353,7 +4353,7 @@ x_scroll_bar_to_input_event (XEvent *event, struct input_event *ievent)
|
||||
ievent->timestamp = CurrentTime;
|
||||
#else
|
||||
ievent->timestamp =
|
||||
XtLastTimestampProcessed (FRAME_X_DISPLAY (XFRAME (WGET (w, frame))));
|
||||
XtLastTimestampProcessed (FRAME_X_DISPLAY (XFRAME (w->frame)));
|
||||
#endif
|
||||
ievent->part = ev->data.l[1];
|
||||
ievent->code = ev->data.l[2];
|
||||
@ -4954,7 +4954,7 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio
|
||||
static struct scroll_bar *
|
||||
x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
struct scroll_bar *bar
|
||||
= ALLOCATE_PSEUDOVECTOR (struct scroll_bar, x_window, PVEC_OTHER);
|
||||
Lisp_Object barobj;
|
||||
@ -5196,7 +5196,7 @@ x_scroll_bar_remove (struct scroll_bar *bar)
|
||||
static void
|
||||
XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int position)
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
Lisp_Object barobj;
|
||||
struct scroll_bar *bar;
|
||||
int top, height, left, sb_left, width, sb_width;
|
||||
@ -5248,7 +5248,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
|
||||
#endif
|
||||
|
||||
/* Does the scroll bar exist yet? */
|
||||
if (NILP (WGET (w, vertical_scroll_bar)))
|
||||
if (NILP (w->vertical_scroll_bar))
|
||||
{
|
||||
if (width > 0 && height > 0)
|
||||
{
|
||||
@ -5271,7 +5271,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
|
||||
/* It may just need to be moved and resized. */
|
||||
unsigned int mask = 0;
|
||||
|
||||
bar = XSCROLL_BAR (WGET (w, vertical_scroll_bar));
|
||||
bar = XSCROLL_BAR (w->vertical_scroll_bar);
|
||||
|
||||
BLOCK_INPUT;
|
||||
|
||||
@ -5441,10 +5441,10 @@ XTredeem_scroll_bar (struct window *window)
|
||||
Lisp_Object barobj;
|
||||
|
||||
/* We can't redeem this window's scroll bar if it doesn't have one. */
|
||||
if (NILP (WGET (window, vertical_scroll_bar)))
|
||||
if (NILP (window->vertical_scroll_bar))
|
||||
abort ();
|
||||
|
||||
bar = XSCROLL_BAR (WGET (window, vertical_scroll_bar));
|
||||
bar = XSCROLL_BAR (window->vertical_scroll_bar);
|
||||
|
||||
/* Unlink it from the condemned list. */
|
||||
f = XFRAME (WINDOW_FRAME (window));
|
||||
@ -5452,11 +5452,11 @@ XTredeem_scroll_bar (struct window *window)
|
||||
{
|
||||
/* If the prev pointer is nil, it must be the first in one of
|
||||
the lists. */
|
||||
if (EQ (FRAME_SCROLL_BARS (f), WGET (window, vertical_scroll_bar)))
|
||||
if (EQ (FRAME_SCROLL_BARS (f), window->vertical_scroll_bar))
|
||||
/* It's not condemned. Everything's fine. */
|
||||
return;
|
||||
else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
|
||||
WGET (window, vertical_scroll_bar)))
|
||||
window->vertical_scroll_bar))
|
||||
FSET (f, condemned_scroll_bars, bar->next);
|
||||
else
|
||||
/* If its prev pointer is nil, it must be at the front of
|
||||
@ -5616,7 +5616,7 @@ x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_e
|
||||
static void
|
||||
x_scroll_bar_note_movement (struct scroll_bar *bar, XEvent *event)
|
||||
{
|
||||
FRAME_PTR f = XFRAME (WGET (XWINDOW (bar->window), frame));
|
||||
FRAME_PTR f = XFRAME (XWINDOW (bar->window)->frame);
|
||||
|
||||
last_mouse_movement_time = event->xmotion.time;
|
||||
|
||||
@ -6790,8 +6790,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
|
||||
create event iff we don't leave the
|
||||
selected frame. */
|
||||
&& (focus_follows_mouse
|
||||
|| (EQ (WGET (XWINDOW (window), frame),
|
||||
WGET (XWINDOW (selected_window), frame)))))
|
||||
|| (EQ (XWINDOW (window)->frame,
|
||||
XWINDOW (selected_window)->frame))))
|
||||
{
|
||||
inev.ie.kind = SELECT_WINDOW_EVENT;
|
||||
inev.ie.frame_or_window = window;
|
||||
@ -7340,7 +7340,7 @@ x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
|
||||
static void
|
||||
x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text_cursor_kinds kind)
|
||||
{
|
||||
struct frame *f = XFRAME (WGET (w, frame));
|
||||
struct frame *f = XFRAME (w->frame);
|
||||
struct glyph *cursor_glyph;
|
||||
|
||||
/* If cursor is out of bounds, don't draw garbage. This can happen
|
||||
|
Loading…
Reference in New Issue
Block a user