From: Yuan Fu Date: Wed, 9 Nov 2022 04:43:24 +0000 (-0800) Subject: ; Fix treesit-query-range docstring X-Git-Tag: emacs-29.0.90~1696 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=077c66405261381704da33e6858f4b6639763f5a;p=emacs.git ; 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. --- 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))))