How to prevent iedit from aborting after yank?

  1. create an empty buffer

  2. type the following two lines:

    abc

    abc

  3. put the point inside abc, run iedit-mode

  4. now if you yank before the a in the first abc, iedit doesn’t abort, but if you yank before the a in the second abc, iedit abort

The relevant issue on github

感觉问题在 iedit-lib.el

    (if (or (< beg (overlay-start occurrence))
            (> end (overlay-end occurrence)))
        (progn (setq iedit-aborting t) ; abort iedit-mode
               (add-hook 'post-command-hook 'iedit-reset-aborting nil t))

Looks like modification-hooks is run after insert-in-front-hooks