aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/editfns.c b/src/editfns.c
index cf596aec37c..a18a71e6d77 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3257,9 +3257,7 @@ differences between the two buffers. */)
3257 for (l = size_a; l > k && !bit_is_set (ctx.deletions, l - 1); l--) 3257 for (l = size_a; l > k && !bit_is_set (ctx.deletions, l - 1); l--)
3258 ; 3258 ;
3259 to = BEGV + l; 3259 to = BEGV + l;
3260 /* If k >= l, it means nothing needs to be deleted. */ 3260 prepare_to_modify_buffer (from, to, NULL);
3261 if (k < l)
3262 prepare_to_modify_buffer (from, to, NULL);
3263 specbind (Qinhibit_modification_hooks, Qt); 3261 specbind (Qinhibit_modification_hooks, Qt);
3264 modification_hooks_inhibited = true; 3262 modification_hooks_inhibited = true;
3265 } 3263 }
@@ -3310,16 +3308,11 @@ differences between the two buffers. */)
3310 SAFE_FREE (); 3308 SAFE_FREE ();
3311 rbc_quitcounter = 0; 3309 rbc_quitcounter = 0;
3312 3310
3313 if (modification_hooks_inhibited && from <= to) 3311 if (modification_hooks_inhibited)
3314 { 3312 {
3315 ptrdiff_t updated_to = to + ZV - BEGV - size_a; 3313 ptrdiff_t updated_to = to + ZV - BEGV - size_a;
3316 /* Only call after-change-functions if something was actually 3314 signal_after_change (from, to - from, updated_to - from);
3317 inserted. */ 3315 update_compositions (from, updated_to, CHECK_INSIDE);
3318 if (from < updated_to)
3319 {
3320 signal_after_change (from, to - from, updated_to - from);
3321 update_compositions (from, updated_to, CHECK_INSIDE);
3322 }
3323 } 3316 }
3324 3317
3325 return Qnil; 3318 return Qnil;