Commit 422ff52b authored by Dmitry Antipov's avatar Dmitry Antipov

* window.h (struct window): Convert base_line_number, base_line_pos

and column_number_displayed members from Lisp_Object to ptrdiff_t.
Convert region_showing member from Lisp_Object to bitfield.
Remove sequence_number member.  Adjust comments.
* window.c (sequence_number): Remove.
(make_window): Initialize column_number_displayed.
* print.c (print_object): Follow the printed representation of
frames and print window pointer to distinguish between windows.
(adjust_window_count): Invalidate base_line_pos.  Adjust comment.
* xdisp.c (wset_base_line_number, wset_base_line_pos)
(wset_column_number_displayed, wset_region_showing): Remove.
(window_buffer_changed, mode_line_update_needed, redisplay_internal)
(try_scrolling, try_cursor_movement, redisplay_window)
(try_window_reusing_current_matrix, try_window_id, display_line)
(display_mode_lines, decode_mode_spec): Adjust users.
* .gdbinit (pwinx): Do not print sequence_number.
parent 8654f9d7
......@@ -358,7 +358,6 @@ end
define pwinx
set $w = $arg0
xgetint $w->sequence_number
if ($w->mini_p != Qnil)
printf "Mini "
end
......
2013-02-01 Dmitry Antipov <dmantipov@yandex.ru>
* window.h (struct window): Convert base_line_number, base_line_pos
and column_number_displayed members from Lisp_Object to ptrdiff_t.
Convert region_showing member from Lisp_Object to bitfield.
Remove sequence_number member. Adjust comments.
* window.c (sequence_number): Remove.
(make_window): Initialize column_number_displayed.
* print.c (print_object): Follow the printed representation of
frames and print window pointer to distinguish between windows.
(adjust_window_count): Invalidate base_line_pos. Adjust comment.
* xdisp.c (wset_base_line_number, wset_base_line_pos)
(wset_column_number_displayed, wset_region_showing): Remove.
(window_buffer_changed, mode_line_update_needed, redisplay_internal)
(try_scrolling, try_cursor_movement, redisplay_window)
(try_window_reusing_current_matrix, try_window_id, display_line)
(display_mode_lines, decode_mode_spec): Adjust users.
* .gdbinit (pwinx): Do not print sequence_number.
2013-02-01 Paul Eggert <eggert@cs.ucla.edu>
Use fdopendir, fstatat and readlinkat, for efficiency (Bug#13539).
......
......@@ -1766,7 +1766,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
{
int len;
strout ("#<window ", -1, -1, printcharfun);
len = sprintf (buf, "%d", XWINDOW (obj)->sequence_number);
len = sprintf (buf, "%p", XWINDOW (obj));
strout (buf, len, len, printcharfun);
if (!NILP (XWINDOW (obj)->buffer))
{
......
......@@ -116,9 +116,6 @@ Lisp_Object minibuf_selected_window;
/* Hook run at end of temp_output_buffer_show. */
static Lisp_Object Qtemp_buffer_show_hook;
/* Incremented for each window created. */
static int sequence_number;
/* Nonzero after init_window_once has finished. */
static int window_initialized;
......@@ -286,8 +283,9 @@ adjust_window_count (struct window *w, int arg)
b = b->base_buffer;
b->window_count += arg;
eassert (b->window_count >= 0);
/* Catch redisplay's attention. */
/* These should be recalculated by redisplay code. */
w->window_end_valid = 0;
w->base_line_pos = 0;
}
}
......@@ -3429,8 +3427,6 @@ make_parent_window (Lisp_Object window, int horflag)
adjust_window_count (p, 1);
XSETWINDOW (parent, p);
p->sequence_number = ++sequence_number;
replace_window (window, parent, 1);
wset_next (o, Qnil);
......@@ -3479,7 +3475,7 @@ make_window (void)
w->nrows_scale_factor = w->ncols_scale_factor = 1;
w->phys_cursor_type = -1;
w->phys_cursor_width = -1;
w->sequence_number = ++sequence_number;
w->column_number_displayed = -1;
/* Reset window_list. */
Vwindow_list = Qnil;
......
......@@ -192,23 +192,6 @@ struct window
and Qt, so bitfield can't be used here. */
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 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 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 region_showing;
/* The column number currently displayed in this window's mode line,
or nil if column numbers are not being 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 redisplay_end_trigger;
......@@ -238,9 +221,6 @@ struct window
/* Number saying how recently window was selected. */
int use_time;
/* Unique number of window assigned when it was created. */
int sequence_number;
/* Number of columns display within the window is scrolled to the left. */
ptrdiff_t hscroll;
......@@ -260,6 +240,19 @@ struct window
it should be positive. */
ptrdiff_t last_point;
/* Line number and position of a line somewhere above the top of the
screen. If this field is zero, it means we don't have a base line. */
ptrdiff_t base_line_number;
/* If this field is zero, it means we don't have a base line.
If it is -1, it means don't display the line number as long
as the window shows its buffer. */
ptrdiff_t base_line_pos;
/* The column number currently displayed in this window's mode
line, or -1 if column numbers are not being displayed. */
ptrdiff_t column_number_displayed;
/* Scaling factor for the glyph_matrix size calculation in this window.
Used if window contains many small images or uses proportional fonts,
as the normal may yield a matrix which is too small. */
......@@ -340,6 +333,9 @@ struct window
the frame image that window_end_pos did not get onto the frame. */
unsigned window_end_valid : 1;
/* Nonzero if we have highlighted the region (or any part of it). */
unsigned region_showing : 1;
/* Amount by which lines of this window are scrolled in
y-direction (smooth scrolling). */
int vscroll;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment