branch: externals/js2-mode commit 7a032d37b1327134f9593a6be0fdb447b6ac7eb0 Author: Przemek Kryger <pkry...@gmail.com> Commit: Przemek Kryger <pkry...@gmail.com>
Remove the correct hook in js2-minor-mode-exit The `js2-minor-mode-enter` adds `js2-minor-mode-edit` to `after-change-functions`. Contrary the `js2-minor-mode-exit` removes `js2-mode-edit` which had not been added to the list. Without that, after enabling `js2-minor-mode` the `js-lint` remains enabled even when the mode exits. --- js2-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js2-mode.el b/js2-mode.el index 65241ad04e..9d81065882 100644 --- a/js2-mode.el +++ b/js2-mode.el @@ -11756,7 +11756,7 @@ highlighting features of `js2-mode'." (defun js2-minor-mode-exit () "Turn off `js2-minor-mode'." (setq next-error-function nil) - (remove-hook 'after-change-functions #'js2-mode-edit t) + (remove-hook 'after-change-functions #'js2-minor-mode-edit t) (remove-hook 'change-major-mode-hook #'js2-minor-mode-exit t) (when js2-mode-node-overlay (delete-overlay js2-mode-node-overlay)