]> code.delx.au - gnu-emacs-elpa/commitdiff
Never enable js2-minor-mode in js2-mode
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 26 Jul 2015 20:30:20 +0000 (23:30 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 26 Jul 2015 20:30:20 +0000 (23:30 +0300)
#249

js2-mode.el

index 332e8f803fb5f959dcbae503c5769025da50a23c..78768dad738f10cdc5e41989c5dcbfb3240b75b2 100644 (file)
@@ -11129,9 +11129,11 @@ such as `js-mode', while retaining the asynchronous error/warning
 highlighting features of `js2-mode'."
   :group 'js2-mode
   :lighter " js-lint"
-  (if js2-minor-mode
-      (js2-minor-mode-enter)
-    (js2-minor-mode-exit)))
+  (if (derived-mode-p 'js2-mode)
+      (setq js2-minor-mode nil)
+    (if js2-minor-mode
+        (js2-minor-mode-enter)
+      (js2-minor-mode-exit))))
 
 (defun js2-minor-mode-enter ()
   "Initialization for `js2-minor-mode'."
@@ -11278,7 +11280,6 @@ Selecting an error will jump it to the corresponding source-buffer error.
 ;;;###autoload
 (define-derived-mode js2-mode js-mode "Javascript-IDE"
   "Major mode for editing JavaScript code."
-  ;; Used by comment-region; don't change it.
   (set (make-local-variable 'max-lisp-eval-depth)
        (max max-lisp-eval-depth 3000))
   (set (make-local-variable 'indent-line-function) #'js2-indent-line)