emacs-diffs
[Top][All Lists]
Advanced

[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))))



reply via email to

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