emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 5b34fc07085: * lisp/treesit.el (treesit-node-at): Update docstr


From: Dmitry Gutov
Subject: emacs-29 5b34fc07085: * lisp/treesit.el (treesit-node-at): Update docstring (bug#61529).
Date: Fri, 17 Feb 2023 10:10:08 -0500 (EST)

branch: emacs-29
commit 5b34fc07085a4ec636124756d09dcc3be8414eb8
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    * lisp/treesit.el (treesit-node-at): Update docstring (bug#61529).
---
 lisp/treesit.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lisp/treesit.el b/lisp/treesit.el
index 6015e78bbd5..09531b838a1 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -166,10 +166,13 @@ parser in `treesit-parser-list', or nil if there is no 
parser."
 A leaf node is a node that doesn't have any child nodes.
 
 The returned node's span covers POS: the node's beginning is before
-or at POS, and the node's end is at or after POS.
+or at POS, and the node's end is after POS.
 
-If no leaf node's span covers POS (e.g., POS is on whitespace
-between two leaf nodes), return the first leaf node after POS.
+If no such node exists, but there's a leaf node which ends at POS,
+return that node.
+
+Otherwise (e.g., when POS is on whitespace between two leaf
+nodes), return the first leaf node after POS.
 
 If there is no leaf node after POS, return the first leaf node
 before POS.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]