I believe that subst-char-in-region is signally incorrectly to before and after-change-functions. This is causing me difficulties with a package I am writing (lentic, formerly linked-buffer), as subst-char-in-region is called by fill-paragraph which breaks lentic. In a clean emacs, launched with the file open.el (it and noisy-change.el are attached), I create a single buffer with contents ooo bbb Changing ooo to xxx reports the following from Emacs before(1,8) after(1,4,3) But this does not really make sense to me because the start and stop reported by the before-change-function is much wider than that reported by the after-change-functions. The reason for this is that the before-change-function gets from the first change to the end of the entire region here (in editfns.c) modify_text (pos, XINT (end)); while after-change gets from the start to the last changed character here. signal_after_change (changed, last_changed - changed, last_changed - changed); I have created a (bad) fix for this, currently on branch... origin/fix/subst-char-in-region (hopefully adding a new branch is okay for this, obviously it can be deleted later). After adding this fix I get... before(1,8) after(1,8,8) This seems consistent and correct to me. My fix is not good though since it is overly conservative. It's probably bad for other reasons also since I don't know C (willing to learn though). Assuming others agree with me that this behaviour is wrong, I would like to fix the problem, but would welcome some help and code review.