]> git.eshelyaron.com Git - emacs.git/commitdiff
Tree-sitter use with-silent-modifications like jit-lock (bug#64321)
authorYuan Fu <casouri@gmail.com>
Wed, 28 Jun 2023 03:58:34 +0000 (20:58 -0700)
committerYuan Fu <casouri@gmail.com>
Wed, 28 Jun 2023 03:58:34 +0000 (20:58 -0700)
* lisp/treesit.el (treesit--font-lock-notifier): Use
with-silent-modifications when marking modified text to be fontified
by jit-lock.  This is what jit-lock itself does.

lisp/treesit.el

index 0e1d7931d49f31b023ec3928c99a7e9fe6dbaa45..04d460fdea4b04cf7742d0a608327bd38b2b6123 100644 (file)
@@ -1072,7 +1072,8 @@ parser notifying of the change."
       (when treesit--font-lock-verbose
         (message "Notifier received range: %s-%s"
                  (car range) (cdr range)))
-      (put-text-property (car range) (cdr range) 'fontified nil))))
+      (with-silent-modifications
+        (put-text-property (car range) (cdr range) 'fontified nil)))))
 
 ;;; Indent