aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorGlenn Morris2018-09-15 09:20:32 -0700
committerGlenn Morris2018-09-15 09:20:32 -0700
commit9e79d59790809387707852e6d1b691d1bfbf2327 (patch)
treeb18125d7befbcdad78f2cafb805d0db45c030318 /src/buffer.c
parentffbe561ee5acb0b9edc5f4c995c287fb2485c315 (diff)
parente133b630625d6e5791c8b491c1cf3252cdb97080 (diff)
downloademacs-9e79d59790809387707852e6d1b691d1bfbf2327.tar.gz
emacs-9e79d59790809387707852e6d1b691d1bfbf2327.zip
Merge from origin/emacs-26
e133b63 (origin/emacs-26) Avoid adverse side effects of fixing bug#21824 cc8f334 Document changes called out in NEWS 20ecc52 ; * etc/NEWS: Document recent change in 'thing-at-point'. 1fc5283 ; INSTALL: Fix a typo in the last commit. 24f240d Tiny doc updates re yum/dnf etc 41c2d25 Remove unused variable 1e3b3fa Fix (thing-at-point 'list) regression (Bug#31772) 219893a Clarify meaning of '*' 41cdda2 * etc/PROBLEMS: Document Ubuntu 16.04 issue. 1c22f03 Increase default value for imenu-auto-rescan-maxout ee84389 Improve recent change to ELisp manual ff374e4 * doc/lispref/display.texi (SVG Images): Improve wording. 3a0caf6 * doc/lispref/display.texi (SVG Images): Fix a typo. (Bug#32... Conflicts: doc/lispref/lists.texi etc/NEWS
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 878844dd020..1f18dbd11a8 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -4516,23 +4516,6 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
4516 Lisp_Object *copy; 4516 Lisp_Object *copy;
4517 ptrdiff_t i; 4517 ptrdiff_t i;
4518 4518
4519 if (size)
4520 {
4521 Lisp_Object ovl
4522 = XVECTOR (last_overlay_modification_hooks)->contents[1];
4523
4524 /* If the buffer of the first overlay in the array doesn't
4525 match the current buffer, then these modification hooks
4526 should not be run in this buffer. This could happen when
4527 some code calls some insdel functions, such as del_range_1,
4528 with the PREPARE argument false -- in that case this
4529 function is never called to record the overlay modification
4530 hook functions in the last_overlay_modification_hooks
4531 array, so anything we find there is not ours. */
4532 if (XMARKER (OVERLAY_START (ovl))->buffer != current_buffer)
4533 return;
4534 }
4535
4536 USE_SAFE_ALLOCA; 4519 USE_SAFE_ALLOCA;
4537 SAFE_ALLOCA_LISP (copy, size); 4520 SAFE_ALLOCA_LISP (copy, size);
4538 memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents, 4521 memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents,
@@ -4543,7 +4526,12 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
4543 Lisp_Object prop_i, overlay_i; 4526 Lisp_Object prop_i, overlay_i;
4544 prop_i = copy[i++]; 4527 prop_i = copy[i++];
4545 overlay_i = copy[i++]; 4528 overlay_i = copy[i++];
4546 call_overlay_mod_hooks (prop_i, overlay_i, after, arg1, arg2, arg3); 4529 /* It is possible that the recorded overlay has been deleted
4530 (which makes it's markers' buffers be nil), or that (due to
4531 some bug) it belongs to a different buffer. Only run this
4532 hook if the overlay belongs to the current buffer. */
4533 if (XMARKER (OVERLAY_START (overlay_i))->buffer == current_buffer)
4534 call_overlay_mod_hooks (prop_i, overlay_i, after, arg1, arg2, arg3);
4547 } 4535 }
4548 4536
4549 SAFE_FREE (); 4537 SAFE_FREE ();