]> git.eshelyaron.com Git - emacs.git/commit
Fix treesit-font-lock-fontify-region wrt local parsers
authorYuan Fu <casouri@gmail.com>
Thu, 14 Sep 2023 02:16:04 +0000 (19:16 -0700)
committerYuan Fu <casouri@gmail.com>
Thu, 14 Sep 2023 04:00:29 +0000 (21:00 -0700)
commit63766b49e2a4a8c1b46446d0e97bfac640159610
tree515f8410f32c49b41c22f270fa99058d9c99ff1a
parent921c0a16ce20828043b3a9df3e0fb6c3a4ecbd74
Fix treesit-font-lock-fontify-region wrt local parsers

* lisp/treesit.el (treesit--update-ranges-local): Minor change.
(treesit-font-lock-fontify-region): Don't try to fontify if node is
nil.  Don't use alist-get to get the root node for a language: there
might be multiple root nodes (from multiple local parsers) for the
same language.
(treesit-major-mode-setup): Remove existing local parsers when major
mode is activated.
lisp/treesit.el