aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.h
diff options
context:
space:
mode:
authorDmitry Antipov2012-06-01 07:41:03 +0400
committerDmitry Antipov2012-06-01 07:41:03 +0400
commitc98ff5dd439c0018b34a5e84f2a3ccc00ee444ef (patch)
treea8f1d45b19ca87d91dddfd67f1d3e29958d1766b /src/window.h
parentb691b884eeef2ecb8772ac121ab23136b9d9d0d2 (diff)
downloademacs-c98ff5dd439c0018b34a5e84f2a3ccc00ee444ef.tar.gz
emacs-c98ff5dd439c0018b34a5e84f2a3ccc00ee444ef.zip
For a 'struct window', replace some Lisp_Object fields to
bitfields where appropriate, remove unused fields. * window.h (struct window): Remove unused 'last_mark_x' and 'last_mark_y' fields. Rename 'mini_p' field to 'mini', change it's type from Lisp_Object to bitfield. Change type of 'force_start', 'optional_new_start', 'last_had_star', 'update_mode_line' and 'start_at_line_beg' fields from Lisp_Object to bitfield. Adjust users accordingly.
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h57
1 files changed, 28 insertions, 29 deletions
diff --git a/src/window.h b/src/window.h
index 1524805579f..0d3910c8cb0 100644
--- a/src/window.h
+++ b/src/window.h
@@ -94,9 +94,6 @@ struct window
94 /* The frame this window is on. */ 94 /* The frame this window is on. */
95 Lisp_Object frame; 95 Lisp_Object frame;
96 96
97 /* t if this window is a minibuffer window. */
98 Lisp_Object mini_p;
99
100 /* Following (to right or down) and preceding (to left or up) child 97 /* Following (to right or down) and preceding (to left or up) child
101 at same level of tree. */ 98 at same level of tree. */
102 Lisp_Object next, prev; 99 Lisp_Object next, prev;
@@ -144,15 +141,6 @@ struct window
144 each one can have its own value of point. */ 141 each one can have its own value of point. */
145 Lisp_Object pointm; 142 Lisp_Object pointm;
146 143
147 /* Non-nil means next redisplay must use the value of start
148 set up for it in advance. Set by scrolling commands. */
149 Lisp_Object force_start;
150 /* Non-nil means we have explicitly changed the value of start,
151 but that the next redisplay is not obliged to use the new value.
152 This is used in Fdelete_other_windows to force a call to
153 Vwindow_scroll_functions; also by Frecenter with argument. */
154 Lisp_Object optional_new_start;
155
156 /* Number of columns display within the window is scrolled to the left. */ 144 /* Number of columns display within the window is scrolled to the left. */
157 Lisp_Object hscroll; 145 Lisp_Object hscroll;
158 /* Minimum hscroll for automatic hscrolling. This is the value 146 /* Minimum hscroll for automatic hscrolling. This is the value
@@ -176,9 +164,6 @@ struct window
176 Lisp_Object last_overlay_modified; 164 Lisp_Object last_overlay_modified;
177 /* Value of point at that time. */ 165 /* Value of point at that time. */
178 Lisp_Object last_point; 166 Lisp_Object last_point;
179 /* Non-nil if the buffer was "modified" when the window
180 was last updated. */
181 Lisp_Object last_had_star;
182 167
183 /* This window's vertical scroll bar. This field is only for use 168 /* This window's vertical scroll bar. This field is only for use
184 by the window-system-dependent code which implements the 169 by the window-system-dependent code which implements the
@@ -206,11 +191,6 @@ struct window
206 no scroll bar. A value of t means use frame value. */ 191 no scroll bar. A value of t means use frame value. */
207 Lisp_Object vertical_scroll_bar_type; 192 Lisp_Object vertical_scroll_bar_type;
208 193
209 /* Frame coords of mark as of last time display completed */
210 /* May be nil if mark does not exist or was not on frame */
211 Lisp_Object last_mark_x;
212 Lisp_Object last_mark_y;
213
214 /* Z - the buffer position of the last glyph in the current matrix 194 /* Z - the buffer position of the last glyph in the current matrix
215 of W. Only valid if WINDOW_END_VALID is not nil. */ 195 of W. Only valid if WINDOW_END_VALID is not nil. */
216 Lisp_Object window_end_pos; 196 Lisp_Object window_end_pos;
@@ -223,18 +203,13 @@ struct window
223 did not get onto the frame. */ 203 did not get onto the frame. */
224 Lisp_Object window_end_valid; 204 Lisp_Object window_end_valid;
225 205
226 /* Non-nil means must regenerate mode line of this window */
227 Lisp_Object update_mode_line;
228
229 /* Non-nil means current value of `start'
230 was the beginning of a line when it was chosen. */
231 Lisp_Object start_at_line_beg;
232
233 /* Display-table to use for displaying chars in this window. 206 /* Display-table to use for displaying chars in this window.
234 Nil means use the buffer's own display-table. */ 207 Nil means use the buffer's own display-table. */
235 Lisp_Object display_table; 208 Lisp_Object display_table;
236 209
237 /* Non-nil means window is marked as dedicated. */ 210 /* Non-nil usually means window is marked as dedicated.
211 Note Lisp code may set this to something beyond Qnil
212 and Qt, so bitfield can't be used here. */
238 Lisp_Object dedicated; 213 Lisp_Object dedicated;
239 214
240 /* Line number and position of a line somewhere above the top of the 215 /* Line number and position of a line somewhere above the top of the
@@ -302,6 +277,30 @@ struct window
302 /* This is handy for undrawing the cursor. */ 277 /* This is handy for undrawing the cursor. */
303 int phys_cursor_ascent, phys_cursor_height; 278 int phys_cursor_ascent, phys_cursor_height;
304 279
280 /* Non-zero if this window is a minibuffer window. */
281 unsigned mini : 1;
282
283 /* Non-zero means must regenerate mode line of this window */
284 unsigned update_mode_line : 1;
285
286 /* Non-nil if the buffer was "modified" when the window
287 was last updated. */
288 unsigned last_had_star : 1;
289
290 /* Non-zero means current value of `start'
291 was the beginning of a line when it was chosen. */
292 unsigned start_at_line_beg : 1;
293
294 /* Non-zero means next redisplay must use the value of start
295 set up for it in advance. Set by scrolling commands. */
296 unsigned force_start : 1;
297
298 /* Non-zero means we have explicitly changed the value of start,
299 but that the next redisplay is not obliged to use the new value.
300 This is used in Fdelete_other_windows to force a call to
301 Vwindow_scroll_functions; also by Frecenter with argument. */
302 unsigned optional_new_start : 1;
303
305 /* Non-zero means the cursor is currently displayed. This can be 304 /* Non-zero means the cursor is currently displayed. This can be
306 set to zero by functions overpainting the cursor image. */ 305 set to zero by functions overpainting the cursor image. */
307 unsigned phys_cursor_on_p : 1; 306 unsigned phys_cursor_on_p : 1;
@@ -337,7 +336,7 @@ struct window
337 336
338/* 1 if W is a minibuffer window. */ 337/* 1 if W is a minibuffer window. */
339 338
340#define MINI_WINDOW_P(W) (!NILP ((W)->mini_p)) 339#define MINI_WINDOW_P(W) ((W)->mini)
341 340
342/* General window layout: 341/* General window layout:
343 342