]> git.eshelyaron.com Git - emacs.git/commit
Use treesit-subtree-stat to determine treesit--font-lock-fast-mode
authorYuan Fu <casouri@gmail.com>
Sun, 29 Jan 2023 08:07:46 +0000 (00:07 -0800)
committerYuan Fu <casouri@gmail.com>
Sun, 29 Jan 2023 08:12:57 +0000 (00:12 -0800)
commit1970726e26a979243925fabe32686ba2ee757c6b
tree5187c732099e11bc4f0c8217c8d47eae77bf7877
parent382e018856a884a96a94ad551dbc1d7b0317b2e5
Use treesit-subtree-stat to determine treesit--font-lock-fast-mode

* lisp/treesit.el:
(treesit--children-covering-range-recurse): Return nil if LIMIT is
exceeded.
(treesit--font-lock-fast-mode): Change to a ternary value.
(treesit-font-lock-fontify-region): Enable fast mode based on the
result of treesit-subtree-stat.
lisp/treesit.el