1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 06:20:43 -08:00
emacs/doc
Yuan Fu ef87c75566
Make sure NODE is not the root node in tree-sitter indent (bug#60602)
There are two possible ways to solve the problem raised in the bug
report: either make sure NODE is never the root (so that parent is
never nil), or allow parent to be nil.

If we go with the latter, a lot of matcher and anchor functions need
change (they need to guard against a null parent).  I tried it, and
needing to check for null parent is pretty annoying.  In comparison,
if NODE is never the root, it is very convenient for the user, and it
doesn't complicate the rule that much (and it's rather intuitive,
people usually don't think of the case where NODE is the root node).
So that's what I choose.

* doc/lispref/modes.texi (Parser-based Indentation): Update manual.
* lisp/treesit.el (treesit-indent-function): Update docstring.
(treesit--indent-1): Make sure NODE is not the root.
2023-01-08 21:22:06 -08:00
..
emacs ; Fix last change 2023-01-07 10:47:44 +02:00
lispintro ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lispref Make sure NODE is not the root node in tree-sitter indent (bug#60602) 2023-01-08 21:22:06 -08:00
man ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
misc Update to Org 9.6-90-ga6523f 2023-01-07 23:50:54 -05:00