Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid triggering too many change hooks
This commit attempts to reduce the number of times `after-change-functions` is called when edits are applied. Otherwise, with large enough buffer and complex font locking rules, emacs could get blocked for long time. Ideally the start and end of the region that is being changed should be supplied to the function, but I am not sure how it could be calculated easily as each edit affects successive edits' region. For now, I have settled on using the min max point of the buffer and apply the optimization only if there are more than two edits. see #427
- Loading branch information