emacs-diffs
[Top][All Lists]
Advanced

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

feature/tree-sitter 1f74e9112e 01/10: Don't disable parse cache in tree-


From: Yuan Fu
Subject: feature/tree-sitter 1f74e9112e 01/10: Don't disable parse cache in tree-sitter activated js-mode
Date: Wed, 26 Oct 2022 21:41:59 -0400 (EDT)

branch: feature/tree-sitter
commit 1f74e9112e28faa57a7bf56547a9ebf8f6618273
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    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 4ccdab0d92..1d53a624a7 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



reply via email to

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