From 077c66405261381704da33e6858f4b6639763f5a Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Tue, 8 Nov 2022 20:43:24 -0800 Subject: [PATCH] ; 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 c2a15835b3b..766e0ac4f1a 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)))) -- 2.39.5