From 1f74e9112e28faa57a7bf56547a9ebf8f6618273 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Tue, 25 Oct 2022 19:46:58 -0700 Subject: [PATCH] Don't disable parse cache in tree-sitter activated js-mode * lisp/progmodes/js.el (js-mode): Move parse cache setup back. --- lisp/progmodes/js.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.39.2