aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2019-04-27 18:33:39 +0900
committerYAMAMOTO Mitsuharu2019-04-27 18:33:39 +0900
commit886bedb36c7b959b7e6fc8ce8e0c04e144b0ae28 (patch)
treeb5770d9fc10a704ad8aeb3474c6940121252c770 /src/buffer.h
parent015a6e1df2772bd43680df5cbeaffccf98a881da (diff)
parent8dc00b2f1e6523c634df3e24379afbe712a32b27 (diff)
downloademacs-886bedb36c7b959b7e6fc8ce8e0c04e144b0ae28.tar.gz
emacs-886bedb36c7b959b7e6fc8ce8e0c04e144b0ae28.zip
Merge branch 'master' into harfbuzz
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h41
1 files changed, 23 insertions, 18 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 4ea7fa627e0..f42c3e97b97 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1,6 +1,6 @@
1/* Header file for the buffer manipulation primitives. 1/* Header file for the buffer manipulation primitives.
2 2
3Copyright (C) 1985-1986, 1993-1995, 1997-2018 Free Software Foundation, 3Copyright (C) 1985-1986, 1993-1995, 1997-2019 Free Software Foundation,
4Inc. 4Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
@@ -422,20 +422,20 @@ struct buffer_text
422 ptrdiff_t gpt_byte; /* Byte pos of gap in buffer. */ 422 ptrdiff_t gpt_byte; /* Byte pos of gap in buffer. */
423 ptrdiff_t z_byte; /* Byte pos of end of buffer. */ 423 ptrdiff_t z_byte; /* Byte pos of end of buffer. */
424 ptrdiff_t gap_size; /* Size of buffer's gap. */ 424 ptrdiff_t gap_size; /* Size of buffer's gap. */
425 EMACS_INT modiff; /* This counts buffer-modification events 425 modiff_count modiff; /* This counts buffer-modification events
426 for this buffer. It is incremented for 426 for this buffer. It is incremented for
427 each such event, and never otherwise 427 each such event, and never otherwise
428 changed. */ 428 changed. */
429 EMACS_INT chars_modiff; /* This is modified with character change 429 modiff_count chars_modiff; /* This is modified with character change
430 events for this buffer. It is set to 430 events for this buffer. It is set to
431 modiff for each such event, and never 431 modiff for each such event, and never
432 otherwise changed. */ 432 otherwise changed. */
433 EMACS_INT save_modiff; /* Previous value of modiff, as of last 433 modiff_count save_modiff; /* Previous value of modiff, as of last
434 time buffer visited or saved a file. */ 434 time buffer visited or saved a file. */
435 435
436 EMACS_INT overlay_modiff; /* Counts modifications to overlays. */ 436 modiff_count overlay_modiff; /* Counts modifications to overlays. */
437 437
438 EMACS_INT compact; /* Set to modiff each time when compact_buffer 438 modiff_count compact; /* Set to modiff each time when compact_buffer
439 is called for this buffer. */ 439 is called for this buffer. */
440 440
441 /* Minimum value of GPT - BEG since last redisplay that finished. */ 441 /* Minimum value of GPT - BEG since last redisplay that finished. */
@@ -446,12 +446,12 @@ struct buffer_text
446 446
447 /* MODIFF as of last redisplay that finished; if it matches MODIFF, 447 /* MODIFF as of last redisplay that finished; if it matches MODIFF,
448 beg_unchanged and end_unchanged contain no useful information. */ 448 beg_unchanged and end_unchanged contain no useful information. */
449 EMACS_INT unchanged_modified; 449 modiff_count unchanged_modified;
450 450
451 /* BUF_OVERLAY_MODIFF of current buffer, as of last redisplay that 451 /* BUF_OVERLAY_MODIFF of current buffer, as of last redisplay that
452 finished; if it matches BUF_OVERLAY_MODIFF, beg_unchanged and 452 finished; if it matches BUF_OVERLAY_MODIFF, beg_unchanged and
453 end_unchanged contain no useful information. */ 453 end_unchanged contain no useful information. */
454 EMACS_INT overlay_unchanged_modified; 454 modiff_count overlay_unchanged_modified;
455 455
456 /* Properties of this buffer's text. */ 456 /* Properties of this buffer's text. */
457 INTERVAL intervals; 457 INTERVAL intervals;
@@ -741,8 +741,8 @@ struct buffer
741 See `cursor-type' for other values. */ 741 See `cursor-type' for other values. */
742 Lisp_Object cursor_in_non_selected_windows_; 742 Lisp_Object cursor_in_non_selected_windows_;
743 743
744 /* No more Lisp_Object beyond this point. Except undo_list, 744 /* No more Lisp_Object beyond cursor_in_non_selected_windows_.
745 which is handled specially in Fgarbage_collect. */ 745 Except undo_list, which is handled specially in Fgarbage_collect. */
746 746
747 /* This structure holds the coordinates of the buffer contents 747 /* This structure holds the coordinates of the buffer contents
748 in ordinary buffers. In indirect buffers, this is not used. */ 748 in ordinary buffers. In indirect buffers, this is not used. */
@@ -812,11 +812,11 @@ struct buffer
812 off_t modtime_size; 812 off_t modtime_size;
813 813
814 /* The value of text->modiff at the last auto-save. */ 814 /* The value of text->modiff at the last auto-save. */
815 EMACS_INT auto_save_modified; 815 modiff_count auto_save_modified;
816 816
817 /* The value of text->modiff at the last display error. 817 /* The value of text->modiff at the last display error.
818 Redisplay of this buffer is inhibited until it changes again. */ 818 Redisplay of this buffer is inhibited until it changes again. */
819 EMACS_INT display_error_modiff; 819 modiff_count display_error_modiff;
820 820
821 /* The time at which we detected a failure to auto-save, 821 /* The time at which we detected a failure to auto-save,
822 Or 0 if we didn't have a failure. */ 822 Or 0 if we didn't have a failure. */
@@ -855,6 +855,13 @@ struct buffer
855 /* Non-zero whenever the narrowing is changed in this buffer. */ 855 /* Non-zero whenever the narrowing is changed in this buffer. */
856 bool_bf clip_changed : 1; 856 bool_bf clip_changed : 1;
857 857
858 /* Non-zero for internally used temporary buffers that don't need to
859 run hooks kill-buffer-hook, buffer-list-update-hook, and
860 kill-buffer-query-functions. This is used in coding.c to avoid
861 slowing down en/decoding when there are a lot of these hooks
862 defined. */
863 bool_bf inhibit_buffer_hooks : 1;
864
858 /* List of overlays that end at or before the current center, 865 /* List of overlays that end at or before the current center,
859 in order of end-position. */ 866 in order of end-position. */
860 struct Lisp_Overlay *overlays_before; 867 struct Lisp_Overlay *overlays_before;
@@ -1012,14 +1019,12 @@ bset_width_table (struct buffer *b, Lisp_Object val)
1012 structure, make sure that this is still correct. */ 1019 structure, make sure that this is still correct. */
1013 1020
1014#define BUFFER_LISP_SIZE \ 1021#define BUFFER_LISP_SIZE \
1015 ((offsetof (struct buffer, own_text) - header_size) / word_size) 1022 PSEUDOVECSIZE (struct buffer, cursor_in_non_selected_windows_)
1016 1023
1017/* Size of the struct buffer part beyond leading Lisp_Objects, in word_size 1024/* Allocated size of the struct buffer part beyond leading
1018 units. Rounding is needed for --with-wide-int configuration. */ 1025 Lisp_Objects, in word_size units. */
1019 1026
1020#define BUFFER_REST_SIZE \ 1027#define BUFFER_REST_SIZE (VECSIZE (struct buffer) - BUFFER_LISP_SIZE)
1021 ((((sizeof (struct buffer) - offsetof (struct buffer, own_text)) \
1022 + (word_size - 1)) & ~(word_size - 1)) / word_size)
1023 1028
1024/* Initialize the pseudovector header of buffer object. BUFFER_LISP_SIZE 1029/* Initialize the pseudovector header of buffer object. BUFFER_LISP_SIZE
1025 is required for GC, but BUFFER_REST_SIZE is set up just to be consistent 1030 is required for GC, but BUFFER_REST_SIZE is set up just to be consistent