aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2012-06-28 15:11:48 +0400
committerDmitry Antipov2012-06-28 15:11:48 +0400
commit45942c7dd05bac26a06674e3d903a3b5d5d8e577 (patch)
treee4aeac11ac98fcbd3ed7caf67581c7f3f7523957 /src
parentae4969c2d69a74c896eb49c9a34aeb645ffed082 (diff)
downloademacs-45942c7dd05bac26a06674e3d903a3b5d5d8e577.tar.gz
emacs-45942c7dd05bac26a06674e3d903a3b5d5d8e577.zip
* window.h (struct window): Change type of 'use_time' and
'sequence_number' from Lisp_Object to int. * frame.c (make_frame): Adjust users accordingly. * print.c (print_object): Likewise. * window.c (select_window, Fwindow_use_time, make_parent_window) (make_window): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/frame.c3
-rw-r--r--src/print.c3
-rw-r--r--src/window.c12
-rw-r--r--src/window.h12
5 files changed, 21 insertions, 18 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fd1f17b8cde..7ebcd7b82d4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,14 @@
12012-06-28 Dmitry Antipov <dmantipov@yandex.ru> 12012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
2 2
3 * window.h (struct window): Change type of 'use_time' and
4 'sequence_number' from Lisp_Object to int.
5 * frame.c (make_frame): Adjust users accordingly.
6 * print.c (print_object): Likewise.
7 * window.c (select_window, Fwindow_use_time, make_parent_window)
8 (make_window): Likewise.
9
102012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11
3 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if 12 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
4 enabled with --enable-checking=[all,glyphs] configure option. 13 enabled with --enable-checking=[all,glyphs] configure option.
5 Fix GLYPH_DEBUG usage assuming that it may be undefined, 14 Fix GLYPH_DEBUG usage assuming that it may be undefined,
diff --git a/src/frame.c b/src/frame.c
index b048327abfb..f9a557f4424 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -356,8 +356,7 @@ make_frame (int mini_p)
356 f->selected_window = root_window; 356 f->selected_window = root_window;
357 /* Make sure this window seems more recently used than 357 /* Make sure this window seems more recently used than
358 a newly-created, never-selected window. */ 358 a newly-created, never-selected window. */
359 ++window_select_count; 359 XWINDOW (f->selected_window)->use_time = ++window_select_count;
360 XSETFASTINT (XWINDOW (f->selected_window)->use_time, window_select_count);
361 360
362 return f; 361 return f;
363} 362}
diff --git a/src/print.c b/src/print.c
index 68b9c30c564..e12313688f5 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1774,8 +1774,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1774 { 1774 {
1775 int len; 1775 int len;
1776 strout ("#<window ", -1, -1, printcharfun); 1776 strout ("#<window ", -1, -1, printcharfun);
1777 len = sprintf (buf, "%"pI"d", 1777 len = sprintf (buf, "%d", XWINDOW (obj)->sequence_number);
1778 XFASTINT (XWINDOW (obj)->sequence_number));
1779 strout (buf, len, len, printcharfun); 1778 strout (buf, len, len, printcharfun);
1780 if (!NILP (XWINDOW (obj)->buffer)) 1779 if (!NILP (XWINDOW (obj)->buffer))
1781 { 1780 {
diff --git a/src/window.c b/src/window.c
index f640a54b283..55d6ac7a6ee 100644
--- a/src/window.c
+++ b/src/window.c
@@ -331,8 +331,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
331 331
332 if (NILP (norecord)) 332 if (NILP (norecord))
333 { 333 {
334 ++window_select_count; 334 w->use_time = ++window_select_count;
335 XSETFASTINT (w->use_time, window_select_count);
336 record_buffer (w->buffer); 335 record_buffer (w->buffer);
337 } 336 }
338 337
@@ -499,7 +498,7 @@ one. The window with the lowest use time is the least recently
499selected one. */) 498selected one. */)
500 (Lisp_Object window) 499 (Lisp_Object window)
501{ 500{
502 return decode_window (window)->use_time; 501 return make_number (decode_window (window)->use_time);
503} 502}
504 503
505DEFUN ("window-total-height", Fwindow_total_height, Swindow_total_height, 0, 1, 0, 504DEFUN ("window-total-height", Fwindow_total_height, Swindow_total_height, 0, 1, 0,
@@ -3250,8 +3249,7 @@ make_parent_window (Lisp_Object window, int horflag)
3250 sizeof (Lisp_Object) * VECSIZE (struct window)); 3249 sizeof (Lisp_Object) * VECSIZE (struct window));
3251 XSETWINDOW (parent, p); 3250 XSETWINDOW (parent, p);
3252 3251
3253 ++sequence_number; 3252 p->sequence_number = ++sequence_number;
3254 XSETFASTINT (p->sequence_number, sequence_number);
3255 3253
3256 replace_window (window, parent, 1); 3254 replace_window (window, parent, 1);
3257 3255
@@ -3290,9 +3288,6 @@ make_window (void)
3290 w->pointm = Fmake_marker (); 3288 w->pointm = Fmake_marker ();
3291 XSETFASTINT (w->hscroll, 0); 3289 XSETFASTINT (w->hscroll, 0);
3292 XSETFASTINT (w->min_hscroll, 0); 3290 XSETFASTINT (w->min_hscroll, 0);
3293 XSETFASTINT (w->use_time, 0);
3294 ++sequence_number;
3295 XSETFASTINT (w->sequence_number, sequence_number);
3296 XSETFASTINT (w->last_point, 0); 3291 XSETFASTINT (w->last_point, 0);
3297 w->vertical_scroll_bar_type = Qt; 3292 w->vertical_scroll_bar_type = Qt;
3298 XSETFASTINT (w->window_end_pos, 0); 3293 XSETFASTINT (w->window_end_pos, 0);
@@ -3303,6 +3298,7 @@ make_window (void)
3303 w->nrows_scale_factor = w->ncols_scale_factor = 1; 3298 w->nrows_scale_factor = w->ncols_scale_factor = 1;
3304 w->phys_cursor_type = -1; 3299 w->phys_cursor_type = -1;
3305 w->phys_cursor_width = -1; 3300 w->phys_cursor_width = -1;
3301 w->sequence_number = ++sequence_number;
3306 3302
3307 /* Reset window_list. */ 3303 /* Reset window_list. */
3308 Vwindow_list = Qnil; 3304 Vwindow_list = Qnil;
diff --git a/src/window.h b/src/window.h
index 0d3910c8cb0..996c966b053 100644
--- a/src/window.h
+++ b/src/window.h
@@ -147,12 +147,6 @@ struct window
147 the user has set, by set-window-hscroll for example. */ 147 the user has set, by set-window-hscroll for example. */
148 Lisp_Object min_hscroll; 148 Lisp_Object min_hscroll;
149 149
150 /* Number saying how recently window was selected. */
151 Lisp_Object use_time;
152
153 /* Unique number of window assigned when it was created. */
154 Lisp_Object sequence_number;
155
156 /* No permanent meaning; used by save-window-excursion's 150 /* No permanent meaning; used by save-window-excursion's
157 bookkeeping. */ 151 bookkeeping. */
158 Lisp_Object temslot; 152 Lisp_Object temslot;
@@ -254,6 +248,12 @@ struct window
254 struct glyph_matrix *current_matrix; 248 struct glyph_matrix *current_matrix;
255 struct glyph_matrix *desired_matrix; 249 struct glyph_matrix *desired_matrix;
256 250
251 /* Number saying how recently window was selected. */
252 int use_time;
253
254 /* Unique number of window assigned when it was created. */
255 int sequence_number;
256
257 /* Scaling factor for the glyph_matrix size calculation in this window. 257 /* Scaling factor for the glyph_matrix size calculation in this window.
258 Used if window contains many small images or uses proportional fonts, 258 Used if window contains many small images or uses proportional fonts,
259 as the normal may yield a matrix which is too small. */ 259 as the normal may yield a matrix which is too small. */