Alan Mackenzie writes: > @@ -1743,9 +1743,17 @@ Overlay Properties > However, doing this can sometimes confuse the internal > +mechanism that calls all these hooks, leading, for example, to calling > +them recursively, which is usually unwanted. > @@ -3621,9 +3621,14 @@ Special Properties > +When Emacs calls these functions, @code{inhibit-modification-hooks} is > +set to @code{nil}. As Phillip mentioned in the OP, Emacs in fact binds it to t. > If the functions modify the buffer, you should > +consider binding this variable to non-@code{nil}, to avoid confusing > +the internal mechanism that calls these hooks. @xref{Change Hooks}. I find this "confusing the internal mechanism" thing unhelpful, how about this instead: