Mercurial > emacs
comparison src/casefiddle.c @ 72592:f6de516bbb4b
* 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.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Fri, 01 Sep 2006 13:28:13 +0000 |
parents | 7477595dfc6f |
children | 3d45362f1d38 c358d0861b16 |
comparison
equal
deleted
inserted
replaced
72591:4582bd903132 | 72592:f6de516bbb4b |
---|---|
185 Fset_case_table (current_buffer->downcase_table); | 185 Fset_case_table (current_buffer->downcase_table); |
186 | 186 |
187 validate_region (&b, &e); | 187 validate_region (&b, &e); |
188 start = XFASTINT (b); | 188 start = XFASTINT (b); |
189 end = XFASTINT (e); | 189 end = XFASTINT (e); |
190 modify_region (current_buffer, start, end); | 190 modify_region (current_buffer, start, end, 0); |
191 record_change (start, end - start); | 191 record_change (start, end - start); |
192 start_byte = CHAR_TO_BYTE (start); | 192 start_byte = CHAR_TO_BYTE (start); |
193 end_byte = CHAR_TO_BYTE (end); | 193 end_byte = CHAR_TO_BYTE (end); |
194 | 194 |
195 for (i = start_byte; i < end_byte; i++, start++) | 195 for (i = start_byte; i < end_byte; i++, start++) |