branch: master commit ca7122ceecf6f06dad063b93c6957299e7bea886 Author: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com> Commit: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com>
Remove `when'. --- context-coloring.el | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/context-coloring.el b/context-coloring.el index 52a494b..c58cf67 100644 --- a/context-coloring.el +++ b/context-coloring.el @@ -765,7 +765,7 @@ faces for custom themes that might not exist yet." (font-lock-mode) (jit-lock-mode t)) - ;; Remember this buffer. This value should not be dynamically-bound. + ;; Remember this buffer. This value should not be dynamically-bound. (setq context-coloring-buffer (current-buffer)) ;; Font lock is incompatible with this mode; the converse is also true. @@ -780,16 +780,13 @@ faces for custom themes that might not exist yet." ;; Only recolor on reparse. (add-hook 'js2-post-parse-callbacks 'context-coloring-colorize nil t)) (t - ;; Only recolor on change. - (add-hook 'after-change-functions 'context-coloring-change-function nil t))) - - (when (not (equal major-mode 'js2-mode)) - ;; Only recolor idly. + ;; Only recolor on change, idly. + (add-hook 'after-change-functions 'context-coloring-change-function nil t) (setq context-coloring-colorize-idle-timer (run-with-idle-timer context-coloring-delay t - 'context-coloring-maybe-colorize))))) + 'context-coloring-maybe-colorize)))))) (provide 'context-coloring)