]> git.eshelyaron.com Git - emacs.git/commit
Allow treesit--font-lock-level-setter to be an alist
authorYuan Fu <casouri@gmail.com>
Sun, 8 Dec 2024 07:18:53 +0000 (23:18 -0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 9 Dec 2024 12:48:40 +0000 (13:48 +0100)
commit5a93a5c4232a6aed6423cb789e006d50e37478bb
treeb2c602ccc358c56ca9644877a8b0f818ba4d272e
parentef758b0888734dd9a5ad5e6ab4ff8e7513162388
Allow treesit--font-lock-level-setter to be an alist

* lisp/treesit.el (treesit-font-lock-level): Allow the
value to be an alist mapping major modes to font lock levels.
(treesit--font-lock-level-setter): Rewrite.
(treesit--compute-font-lock-level): New function.
(treesit-font-lock-recompute-features): Use new function.

* doc/lispref/modes.texi (Parser-based Font Lock): Minor fix.

(cherry picked from commit b953bcb17047998c9e41cede7c5e5ffec22209b2)
doc/lispref/modes.texi
lisp/treesit.el