]> git.eshelyaron.com Git - emacs.git/commit
Add accessors for treesit-font-lock-settings
authorYuan Fu <casouri@gmail.com>
Mon, 16 Sep 2024 06:32:51 +0000 (23:32 -0700)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Sep 2024 10:45:22 +0000 (12:45 +0200)
commitf2908eb2362f87fc9066d2adb9f2e17cf975860b
tree2945aa8bb5b78848186112ca2f9258cbbc6ab400
parent4bf42b7b2993cf04d4245bed533e3ba98974cc2b
Add accessors for treesit-font-lock-settings

Since each SETTING in treesit-font-lock-settings is considered an opaque
object, provide accessor functions for each field.

* lisp/treesit.el:
(treesit-font-lock-settings): Update docstring.
(treesit-font-lock-setting-query):
(treesit-font-lock-setting-enable):
(treesit-font-lock-setting-feature):
(treesit-font-lock-setting-override): New functions.
(treesit--font-lock-setting-feature): Remove function.
(treesit--font-lock-setting-enable): Rename to
treesit--font-lock-setting-clone-enable to avoid confusion with
treesit-font-lock-setting-enable.
(treesit-add-font-lock-rules): Use renamed function.
(treesit-font-lock-fontify-region): Add a comment.
* doc/lispref/modes.texi (Parser-based Font Lock): Update manual.

(cherry picked from commit f9fa75c1ef31ee78b43509f15b50cf0603757181)
doc/lispref/modes.texi
etc/NEWS
lisp/treesit.el