summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2023-06-27 20:58:34 -0700
committerYuan Fu <casouri@gmail.com>2023-06-27 20:58:34 -0700
commit2c90ade09a4d52a583158cb9cacf665ac11e8387 (patch)
treef8c10837933d265821ab895e97d9014108b6a774 /lisp
parent11cead0d73cadd5de077f8bec60045e85f651fc0 (diff)
downloademacs-2c90ade09a4d52a583158cb9cacf665ac11e8387.tar.gz
Tree-sitter use with-silent-modifications like jit-lock (bug#64321)
* 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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/treesit.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 0e1d7931d49..04d460fdea4 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -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