[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/tree-sitter 077c664052 2/7: ; Fix treesit-query-range docstring
From: |
Yuan Fu |
Subject: |
feature/tree-sitter 077c664052 2/7: ; Fix treesit-query-range docstring |
Date: |
Wed, 9 Nov 2022 18:52:04 -0500 (EST) |
branch: feature/tree-sitter
commit 077c66405261381704da33e6858f4b6639763f5a
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
; Fix treesit-query-range docstring
* lisp/treesit.el (treesit-query-range): Change signature, change
reference of treesit-query-in to that of treesit-query-capture.
---
lisp/treesit.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/treesit.el b/lisp/treesit.el
index c2a15835b3..766e0ac4f1 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -340,15 +340,15 @@ See `treesit-query-capture' for QUERY."
(treesit-parser-root-node parser)
query))))
-(defun treesit-query-range (source query &optional beg end)
+(defun treesit-query-range (node query &optional beg end)
"Query the current buffer and return ranges of captured nodes.
-QUERY, SOURCE, BEG, END are the same as in
-`treesit-query-in'. This function returns a list
+QUERY, NODE, BEG, END are the same as in
+`treesit-query-capture'. This function returns a list
of (START . END), where START and END specifics the range of each
captured node. Capture names don't matter."
(cl-loop for capture
- in (treesit-query-capture source query beg end)
+ in (treesit-query-capture node query beg end)
for node = (cdr capture)
collect (cons (treesit-node-start node)
(treesit-node-end node))))
- feature/tree-sitter updated (5858921f40 -> eecc2d45b9), Yuan Fu, 2022/11/09
- feature/tree-sitter 663d768d44 6/7: * configure.ac: Change required tree-sitter version to 0.20.2., Yuan Fu, 2022/11/09
- feature/tree-sitter eecc2d45b9 7/7: ; Update tree-sitter HTML manuals in admin/notes, Yuan Fu, 2022/11/09
- feature/tree-sitter 077c664052 2/7: ; Fix treesit-query-range docstring,
Yuan Fu <=
- feature/tree-sitter a7042fa051 4/7: New function fast_c_string_match and fast_c_string_match_internal, Yuan Fu, 2022/11/09
- feature/tree-sitter 838fc77254 5/7: Make tree-sitter node type match case-sensitive, Yuan Fu, 2022/11/09
- feature/tree-sitter 2b4d46f99b 1/7: Mimic existing python-mode beg/end-of-defun behavior better, Yuan Fu, 2022/11/09
- feature/tree-sitter 2332c3eb55 3/7: Add tree-sitter shortdoc, Yuan Fu, 2022/11/09