branch: master commit b4c220a5cae6c9d7d9be855b5c6ff2b87b53d692 Author: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com> Commit: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com>
Always remove hooks. --- context-coloring.el | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/context-coloring.el b/context-coloring.el index 5da99b6..97c391a 100644 --- a/context-coloring.el +++ b/context-coloring.el @@ -445,11 +445,8 @@ colorizing would be redundant." (context-coloring-kill-scopifier) (when (not (null 'context-coloring-colorize-idle-timer)) (cancel-timer context-coloring-colorize-idle-timer)) - (cond - ((equal major-mode 'js2-mode) - (remove-hook 'js2-post-parse-callbacks 'context-coloring-change-function t)) - (t - (remove-hook 'after-change-functions 'context-coloring-change-function t))) + (remove-hook 'js2-post-parse-callbacks 'context-coloring-change-function t) + (remove-hook 'after-change-functions 'context-coloring-change-function t) (font-lock-mode) (jit-lock-mode t))