Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hl-todo-mode: Fontify using hl-todo--regexp only
Previously we used `font-lock-flush' and `font-lock-ensure' instead. Most built-in minor-modes that call `font-lock-add-keywords' (with `nil' as MODE), only call the former, which doesn't appear to always get the job done. Additionally calling `font-lock-ensure' as we did isn't much; it re-fontifies the complete buffer, which can be costly and it has been reported that it sometimes fails to actually do so. Directly fontifying just our own keyword using `hl-todo--regexp' for the complete buffer seems to be a good compromise and should also be more reliable.
- Loading branch information