GNU bug report logs - #65929
29.1; modification-hooks run when deleting after the overlay

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Wed, 13 Sep 2023 22:39:02 UTC

Severity: normal

Found in version 29.1

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 65929 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 65929 <at> debbugs.gnu.org
Subject: Re: bug#65929: 29.1; modification-hooks run when deleting after the
 overlay
Date: Wed, 13 Sep 2023 18:52:33 -0400
I pushed the patch below to `emacs-29`.
It fixes the bug for the yasnippet test suite and adds a corresponding
regression test in our test suite.


        Stefan


diff --git a/src/buffer.c b/src/buffer.c
index 252231357bc..db362ffe7b0 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -4091,7 +4091,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
 	    }
 	  /* Test for intersecting intervals.  This does the right thing
 	     for both insertion and deletion.  */
-	  if (! insertion || (end_arg > obegin && begin_arg < oend))
+	  if (end_arg > obegin && begin_arg < oend)
 	    {
 	      Lisp_Object prop = Foverlay_get (overlay, Qmodification_hooks);
 	      if (!NILP (prop))
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el
index 45914b2b6b0..aa30533c6a0 100644
--- a/test/src/buffer-tests.el
+++ b/test/src/buffer-tests.el
@@ -142,6 +142,7 @@ overlay-modification-hooks
                 (expected-calls . ((modification-hooks (nil 3 4))
                                    (modification-hooks (t 3 4 1)))))
                ((replace . "4"))
+               ((replace . "4") (overlay-beg . 4)) ;bug#65929
                ((replace . "12")
                 (expected-calls . ((modification-hooks (nil 1 3))
                                    (modification-hooks (t 1 2 2)))))





This bug report was last modified 1 year and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.