aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 91e42dca2bf..c0179c7584e 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -4481,6 +4481,23 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
4481 Lisp_Object *copy; 4481 Lisp_Object *copy;
4482 ptrdiff_t i; 4482 ptrdiff_t i;
4483 4483
4484 if (size)
4485 {
4486 Lisp_Object ovl
4487 = XVECTOR (last_overlay_modification_hooks)->contents[1];
4488
4489 /* If the buffer of the first overlay in the array doesn't
4490 match the current buffer, then these modification hooks
4491 should not be run in this buffer. This could happen when
4492 some code calls some insdel functions, such as del_range_1,
4493 with the PREPARE argument false -- in that case this
4494 function is never called to record the overlay modification
4495 hook functions in the last_overlay_modification_hooks
4496 array, so anything we find there is not ours. */
4497 if (XMARKER (OVERLAY_START (ovl))->buffer != current_buffer)
4498 return;
4499 }
4500
4484 USE_SAFE_ALLOCA; 4501 USE_SAFE_ALLOCA;
4485 SAFE_ALLOCA_LISP (copy, size); 4502 SAFE_ALLOCA_LISP (copy, size);
4486 memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents, 4503 memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents,