From: Yuan Fu Date: Wed, 26 Oct 2022 02:46:58 +0000 (-0700) Subject: Don't disable parse cache in tree-sitter activated js-mode X-Git-Tag: emacs-29.0.90~1787 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1f74e9112e28faa57a7bf56547a9ebf8f6618273;p=emacs.git Don't disable parse cache in tree-sitter activated js-mode * lisp/progmodes/js.el (js-mode): Move parse cache setup back. --- diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 4ccdab0d928..1d53a624a7a 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3622,6 +3622,9 @@ This function can be used as a value in `which-func-functions'" (setq-local fill-paragraph-function #'js-fill-paragraph) (setq-local normal-auto-fill-function #'js-do-auto-fill) + ;; Parse cache + (add-hook 'before-change-functions #'js--flush-caches t t) + ;; Frameworks (js--update-quick-match-re) @@ -3704,9 +3707,7 @@ This function can be used as a value in `which-func-functions'" #'syntax-propertize-multiline 'append 'local) (add-hook 'syntax-propertize-extend-region-functions #'js--syntax-propertize-extend-region 'append 'local) - - ;; Parse cache - (add-hook 'before-change-functions #'js--flush-caches t t)))) + ))) (defvar js-json--treesit-font-lock-settings (treesit-font-lock-rules