]> git.eshelyaron.com Git - emacs.git/commit
Allow treesit-simple-indent's rule to be a single function
authorYuan Fu <casouri@gmail.com>
Fri, 29 Nov 2024 22:10:45 +0000 (14:10 -0800)
committerEshel Yaron <me@eshelyaron.com>
Wed, 4 Dec 2024 17:02:49 +0000 (18:02 +0100)
commit5b909fef271c16d02a04ecf07ffc93e70f262801
treeee4a4b7b67fc83ac1b57f77fdae9debc1768b1da
parentf9791700fa61b4170bf1d0430f08aa0db95b95ee
Allow treesit-simple-indent's rule to be a single function

* lisp/treesit.el (treesit-simple-indent-rules): Allow the rule
to be a single function.  Also replace cl-loop with dolist plus
catch-throw.
(treesit--indent-rules-optimize): Handle the case when a rule is
a function.
* doc/lispref/modes.texi (Parser-based Indentation): Update
manuel.

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