aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/editfns.c b/src/editfns.c
index a18a71e6d77..a8acff659cd 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3243,21 +3243,9 @@ differences between the two buffers. */)
3243 Instead, we announce a single modification for the entire 3243 Instead, we announce a single modification for the entire
3244 modified region. But don't do that if the caller inhibited 3244 modified region. But don't do that if the caller inhibited
3245 modification hooks, because then they don't want that. */ 3245 modification hooks, because then they don't want that. */
3246 ptrdiff_t from, to;
3247 if (!inhibit_modification_hooks) 3246 if (!inhibit_modification_hooks)
3248 { 3247 {
3249 ptrdiff_t k, l; 3248 prepare_to_modify_buffer (BEGV, ZV, NULL);
3250
3251 /* Find the first character position to be changed. */
3252 for (k = 0; k < size_a && !bit_is_set (ctx.deletions, k); k++)
3253 ;
3254 from = BEGV + k;
3255
3256 /* Find the last character position to be changed. */
3257 for (l = size_a; l > k && !bit_is_set (ctx.deletions, l - 1); l--)
3258 ;
3259 to = BEGV + l;
3260 prepare_to_modify_buffer (from, to, NULL);
3261 specbind (Qinhibit_modification_hooks, Qt); 3249 specbind (Qinhibit_modification_hooks, Qt);
3262 modification_hooks_inhibited = true; 3250 modification_hooks_inhibited = true;
3263 } 3251 }
@@ -3310,9 +3298,8 @@ differences between the two buffers. */)
3310 3298
3311 if (modification_hooks_inhibited) 3299 if (modification_hooks_inhibited)
3312 { 3300 {
3313 ptrdiff_t updated_to = to + ZV - BEGV - size_a; 3301 signal_after_change (BEGV, size_a, ZV - BEGV);
3314 signal_after_change (from, to - from, updated_to - from); 3302 update_compositions (BEGV, ZV, CHECK_INSIDE);
3315 update_compositions (from, updated_to, CHECK_INSIDE);
3316 } 3303 }
3317 3304
3318 return Qnil; 3305 return Qnil;