Mercurial > emacs
comparison src/buffer.h @ 9404:698990d4feca
* buffer.h (struct buffer): New members: newline_cache,
width_run_cache, width_table, and cache_long_line_scans.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 08 Oct 1994 22:12:45 +0000 |
parents | 7327513b377b |
children | 907353876b8b |
comparison
equal
deleted
inserted
replaced
9403:9f797989b817 | 9404:698990d4feca |
---|---|
198 successive elements in its marker `chain' | 198 successive elements in its marker `chain' |
199 are the other markers referring to this | 199 are the other markers referring to this |
200 buffer */ | 200 buffer */ |
201 Lisp_Object markers; | 201 Lisp_Object markers; |
202 | 202 |
203 /* If the long line scan cache is enabled (i.e. the buffer-local | |
204 variable cache-long-line-scans is non-nil), newline_cache | |
205 points to the newline cache, and width_run_cache points to the | |
206 width run cache. | |
207 | |
208 The newline cache records which stretches of the buffer are | |
209 known *not* to contain newlines, so that they can be skipped | |
210 quickly when we search for newlines. | |
211 | |
212 The width run cache records which stretches of the buffer are | |
213 known to contain characters whose widths are all the same. If | |
214 the width run cache maps a character to a value > 0, that value is | |
215 the character's width; if it maps a character to zero, we don't | |
216 know what its width is. This allows compute_motion to process | |
217 such regions very quickly, using algebra instead of inspecting | |
218 each character. See also width_table, below. */ | |
219 struct region_cache *newline_cache; | |
220 struct region_cache *width_run_cache; | |
203 | 221 |
204 /* Everything from here down must be a Lisp_Object */ | 222 /* Everything from here down must be a Lisp_Object */ |
205 | 223 |
206 | 224 |
207 /* the name of this buffer */ | 225 /* the name of this buffer */ |
302 in order of start-position. */ | 320 in order of start-position. */ |
303 Lisp_Object overlays_after; | 321 Lisp_Object overlays_after; |
304 | 322 |
305 /* Position where the overlay lists are centered. */ | 323 /* Position where the overlay lists are centered. */ |
306 Lisp_Object overlay_center; | 324 Lisp_Object overlay_center; |
325 | |
326 /* True if the newline position cache and width run cache are | |
327 enabled. See search.c and indent.c. */ | |
328 Lisp_Object cache_long_line_scans; | |
329 | |
330 /* If the width run cache is enabled, this table contains the | |
331 character widths width_run_cache (see above) assumes. When we | |
332 do a thorough redisplay, we compare this against the buffer's | |
333 current display table to see whether the display table has | |
334 affected the widths of any characters. If it has, we | |
335 invalidate the width run cache, and re-initialize width_table. */ | |
336 Lisp_Object width_table; | |
307 }; | 337 }; |
308 | 338 |
309 /* This points to the current buffer. */ | 339 /* This points to the current buffer. */ |
310 | 340 |
311 extern struct buffer *current_buffer; | 341 extern struct buffer *current_buffer; |