Skip to content

Commit

Permalink
Simplify font-lock flushing
Browse files Browse the repository at this point in the history
Just call `font-lock-flush'; all the old complications are not
actually necessary.  This is how keyword-adding minor-modes in
Emacs do it.
  • Loading branch information
tarsius committed Jul 30, 2024
1 parent 9331f28 commit af21ea5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions morlock.el
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ This variable combines the keywords defined in
(if morlock-mode
(font-lock-add-keywords nil morlock-font-lock-keywords 'append)
(font-lock-remove-keywords nil morlock-font-lock-keywords))
(when font-lock-mode
(save-restriction
(widen)
(font-lock-flush)
(font-lock-ensure))))
(font-lock-flush))

;;;###autoload
(define-globalized-minor-mode global-morlock-mode
Expand Down

0 comments on commit af21ea5

Please sign in to comment.