1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 05:51:21 -08:00
emacs/doc
Yuan Fu 78df03329d
Redefine treesit-node-at
The old 'treesit-node-at' becomes 'treesit-node-on'.  The new
'treesit-node-at' has slightly different semantics.  Now
'treesit-node-on' gets the smallest node covering a range and
'treesit-node-at' gets the smallest node after a position.

The reason of change can be found in the docstring of
'treesit-node-on' (the BEWARE part): its result can be sometimes
surprising/unexpected.

* doc/lispref/parsing.texi (Retrieving Node): Update manual.
* lisp/treesit.el (treesit-node-at): Change to new definition.
(treesit-node-on): Inherits the old definition of
'treesit-node-at'.  Parameter END is now mandatory.
(treesit-language-at, treesit-node-field-name): Use the new '-on'
function.
(treesit-font-lock-fontify-region, treesit-simple-indent-presets,
treesit-indent): Use the new '-at' function.
* test/src/treesit-tests.el (treesit-node-supplemental): Update tests.
2022-05-13 14:36:37 -07:00
..
emacs Further log-view-file-next fix-ups 2022-05-06 19:09:29 +02:00
lispintro Change current-time back to list form 2022-04-28 12:54:06 -07:00
lispref Redefine treesit-node-at 2022-05-13 14:36:37 -07:00
man Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
misc ; * doc/misc/eshell.texi (Arguments): Fix cross-references. 2022-05-03 19:38:06 +03:00