aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuan Fu2022-06-18 16:57:50 -0700
committerYuan Fu2022-06-18 16:57:50 -0700
commitc8eeaa4ae4aea05ccf66f415be20842d8447bad7 (patch)
tree50757d3a052e6f8469032776840474c99ac37f58
parent7544e9ab5d20a773db15ae3538f1c4a3a9167760 (diff)
downloademacs-tree-sitter.tar.gz
emacs-tree-sitter.zip
; * lisp/treesit.el (treesit-traverse-forward): Fix docstring.tree-sitter
-rw-r--r--lisp/treesit.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 3cfafd0d156..cf5001eebc9 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -309,15 +309,14 @@ below where NODE is marked 1, traverse as numbered:
309 o o 2 7 +-+-+ +--+--+ 309 o o 2 7 +-+-+ +--+--+
310 | | | | | 310 | | | | |
311 10 11 13 14 15 311 10 11 13 14 15
312 312DEPTH can be a positive integer, 0, nil, or \\='up. A positive
313DEPTH can be a positive integer, 0, nil, or 'up. A positive
314integer or 0 means go DEPTH deep counting from NODE. A nil means 313integer or 0 means go DEPTH deep counting from NODE. A nil means
315no limit. And a symbol 'up means go upwards only: only traverse 314no limit. And a symbol \\='up means go upwards only: only traverse
316sibling and parent, never go down to children. 315sibling and parent, never go down to children.
317 316
318The difference between 0 and 'up is subtle: in the above example, 317The difference between 0 and \\='up is subtle: in the above example,
319if given 0 as DEPTH, node 1 3 4 5 6 8 9 12 16 are visited; if 318if given 0 as DEPTH, node 1 3 4 5 6 8 9 12 16 are visited; if
320given 'up as DEPTH, only node 1 3 4 8 16 are visited." 319given \\='up as DEPTH, only node 1 3 4 8 16 are visited."
321 ;; First try NODE's subtree, but only under these conditions: if 320 ;; First try NODE's subtree, but only under these conditions: if
322 ;; DEPTH is a number, it has to be greater than 0, if it's a symbol, 321 ;; DEPTH is a number, it has to be greater than 0, if it's a symbol,
323 ;; it cannot be 'up. 322 ;; it cannot be 'up.