Package: Emacs Version: 29.1 As found via yasnippet's test suite, the new overlay code in Emacs-29 sometimes mistakenly runs the `modification-hooks` when the text *right after* an (empty) overlay is deleted. This can be seen in the attached trace obtained while running yasnippet's `delete-numberless-inner-snippet-issue-562` test. In that trace we see a call (yas--on-protection-overlay-modification # nil 1 5) i.e. a call where the `modification-hooks` function (`yas--on-protection-overlay-modification`) is called for a deletion of text between 1 and 5 while the overlay itself does not contain any of those characters since the overlay is empty, at BOB. According to the Texinfo doc: ‘modification-hooks’ This property’s value is a list of functions to be called if any character within the overlay is changed or if text is inserted strictly within the overlay. The behavior in Emacs<29 obeys the Texinfo doc. Stefan