diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2006-09-01 13:28:13 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2006-09-01 13:28:13 +0000 |
commit | 3e1451520bdae2a79247347e66724306692533f6 (patch) | |
tree | e652c2d5f077b41d82c14d815d75531a96a546d5 /src/buffer.h | |
parent | d178a6ebf9c714f2360997d16746d8c81f04f07b (diff) | |
download | emacs-3e1451520bdae2a79247347e66724306692533f6.tar.gz |
* buffer.h (struct buffer_text): New field chars_modiff.
(CHARS_MODIFF, BUF_CHARS_MODIFF): New macros.
* buffer.c (Fbuffer_chars_modified_tick): New function returning
value of BUF_CHARS_MODIFF.
(syms_of_buffer): Defsubr it.
(Fget_buffer_create): Initialize BUF_CHARS_MODIFF.
* insdel.c (modify_region): New argument preserve_chars_modiff.
Set CHARS_MODIFF to MODIFF provided preserve_chars_modiff is zero.
(insert_1_both, insert_from_string_1, insert_from_buffer_1)
(adjust_after_replace, adjust_after_replace_noundo)
(replace_range, replace_range_2, del_range_2): Reset CHARS_MODIFF.
* lisp.h (modify_region): Add fourth argument in extern.
* casefiddle.c (casify_region): Call modify_region with fourth
argument zero to assert that CHARS_MODIFF is updated.
* editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
(Ftranspose_regions): Likewise.
* textprop.c (Fadd_text_properties, Fset_text_properties)
(Fremove_text_properties, Fremove_list_of_text_properties):
Call modify_region with fourth argument 1 to avoid that
CHARS_MODIFF is updated.
Diffstat (limited to 'src/buffer.h')
-rw-r--r-- | src/buffer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h index efe0252453a..a5f8a6a4070 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -82,6 +82,9 @@ Boston, MA 02110-1301, USA. */ /* Modification count. */ #define MODIFF (current_buffer->text->modiff) +/* Character modification count. */ +#define CHARS_MODIFF (current_buffer->text->chars_modiff) + /* Overlay modification count. */ #define OVERLAY_MODIFF (current_buffer->text->overlay_modiff) @@ -147,6 +150,9 @@ Boston, MA 02110-1301, USA. */ /* Modification count. */ #define BUF_MODIFF(buf) ((buf)->text->modiff) +/* Character modification count. */ +#define BUF_CHARS_MODIFF(buf) ((buf)->text->chars_modiff) + /* Modification count as of last visit or save. */ #define BUF_SAVE_MODIFF(buf) ((buf)->text->save_modiff) @@ -406,6 +412,10 @@ struct buffer_text for this buffer. It is incremented for each such event, and never otherwise changed. */ + int chars_modiff; /* This is modified with character change + events for this buffer. It is set to + modiff for each such event, and never + otherwise changed. */ int save_modiff; /* Previous value of modiff, as of last time buffer visited or saved a file. */ |