emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/js2-mode 7a032d37b1 1/2: Remove the correct hook in js2


From: ELPA Syncer
Subject: [elpa] externals/js2-mode 7a032d37b1 1/2: Remove the correct hook in js2-minor-mode-exit
Date: Fri, 17 Jun 2022 12:57:57 -0400 (EDT)

branch: externals/js2-mode
commit 7a032d37b1327134f9593a6be0fdb447b6ac7eb0
Author: Przemek Kryger <pkryger@gmail.com>
Commit: Przemek Kryger <pkryger@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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]