aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorYuan Fu2022-08-29 11:41:10 -0700
committerYuan Fu2022-08-29 11:41:10 -0700
commit77d5a0cf9fc4a6dc44f0c6ee5e3295e0eea08273 (patch)
tree969937ec44ce5ddf9447b074aa15314e0b9e8e95 /src/buffer.h
parente98b4715bb986524bde9356b62429af9786ae716 (diff)
parentdf2f6fb7fc4b79834ae40db8be2ccdc1e4a273f1 (diff)
downloademacs-77d5a0cf9fc4a6dc44f0c6ee5e3295e0eea08273.tar.gz
emacs-77d5a0cf9fc4a6dc44f0c6ee5e3295e0eea08273.zip
Merge remote-tracking branch 'origin/master' into feature/tree-sitter
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/buffer.h b/src/buffer.h
index bc07a63b537..04792374cd1 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -149,12 +149,18 @@ enum { BEG = 1, BEG_BYTE = BEG };
149#define BUF_BEG_UNCHANGED(buf) ((buf)->text->beg_unchanged) 149#define BUF_BEG_UNCHANGED(buf) ((buf)->text->beg_unchanged)
150#define BUF_END_UNCHANGED(buf) ((buf)->text->end_unchanged) 150#define BUF_END_UNCHANGED(buf) ((buf)->text->end_unchanged)
151 151
152#define BUF_CHARS_UNCHANGED_MODIFIED(buf) \
153 ((buf)->text->chars_unchanged_modified)
154
152#define UNCHANGED_MODIFIED \ 155#define UNCHANGED_MODIFIED \
153 BUF_UNCHANGED_MODIFIED (current_buffer) 156 BUF_UNCHANGED_MODIFIED (current_buffer)
154#define OVERLAY_UNCHANGED_MODIFIED \ 157#define OVERLAY_UNCHANGED_MODIFIED \
155 BUF_OVERLAY_UNCHANGED_MODIFIED (current_buffer) 158 BUF_OVERLAY_UNCHANGED_MODIFIED (current_buffer)
156#define BEG_UNCHANGED BUF_BEG_UNCHANGED (current_buffer) 159#define BEG_UNCHANGED BUF_BEG_UNCHANGED (current_buffer)
157#define END_UNCHANGED BUF_END_UNCHANGED (current_buffer) 160#define END_UNCHANGED BUF_END_UNCHANGED (current_buffer)
161
162#define CHARS_UNCHANGED_MODIFIED \
163 BUF_CHARS_UNCHANGED_MODIFIED (current_buffer)
158 164
159/* Functions to set PT in the current buffer, or another buffer. */ 165/* Functions to set PT in the current buffer, or another buffer. */
160 166
@@ -237,9 +243,10 @@ struct buffer_text
237 ptrdiff_t z_byte; /* Byte pos of end of buffer. */ 243 ptrdiff_t z_byte; /* Byte pos of end of buffer. */
238 ptrdiff_t gap_size; /* Size of buffer's gap. */ 244 ptrdiff_t gap_size; /* Size of buffer's gap. */
239 modiff_count modiff; /* This counts buffer-modification events 245 modiff_count modiff; /* This counts buffer-modification events
240 for this buffer. It is incremented for 246 for this buffer. It is increased
241 each such event, and never otherwise 247 logarithmically to the extent of the
242 changed. */ 248 modification for each such event,
249 and never otherwise changed. */
243 modiff_count chars_modiff; /* This is modified with character change 250 modiff_count chars_modiff; /* This is modified with character change
244 events for this buffer. It is set to 251 events for this buffer. It is set to
245 modiff for each such event, and never 252 modiff for each such event, and never
@@ -267,6 +274,11 @@ struct buffer_text
267 end_unchanged contain no useful information. */ 274 end_unchanged contain no useful information. */
268 modiff_count overlay_unchanged_modified; 275 modiff_count overlay_unchanged_modified;
269 276
277 /* CHARS_MODIFF as of last redisplay that finished. It's used
278 when we only care about changes in actual buffer text, not in
279 any other kind of changes, like properties etc. */
280 modiff_count chars_unchanged_modified;
281
270 /* Properties of this buffer's text. */ 282 /* Properties of this buffer's text. */
271 INTERVAL intervals; 283 INTERVAL intervals;
272 284
@@ -685,6 +697,10 @@ struct buffer
685 defined, as well as by with-temp-buffer, for example. */ 697 defined, as well as by with-temp-buffer, for example. */
686 bool_bf inhibit_buffer_hooks : 1; 698 bool_bf inhibit_buffer_hooks : 1;
687 699
700 /* Non-zero when the buffer contains long lines and specific
701 display optimizations must be used. */
702 bool_bf long_line_optimizations_p : 1;
703
688 /* List of overlays that end at or before the current center, 704 /* List of overlays that end at or before the current center,
689 in order of end-position. */ 705 in order of end-position. */
690 struct Lisp_Overlay *overlays_before; 706 struct Lisp_Overlay *overlays_before;