]> git.eshelyaron.com Git - emacs.git/commitdiff
* Makefile.in (distclean): Remove the 'native-lisp' directory.
authorEli Zaretskii <eliz@gnu.org>
Thu, 27 Apr 2023 18:39:33 +0000 (21:39 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 27 Apr 2023 18:39:33 +0000 (21:39 +0300)
Makefile.in
lisp/treesit.el

index 8b77aac38cde86b34c6ffc0245ffea1e25eb5e92..f5fda0eb61a275b3a959c762cd89f75929c2b06d 100644 (file)
@@ -1030,6 +1030,9 @@ $(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),distclean)
 
 distclean: $(distclean_dirs:=_distclean) clean-gsettings-schemas
        ${top_distclean}
+ifeq ($(HAVE_NATIVE_COMP),yes)
+       rm -rf native-lisp
+endif
 
 ### 'bootstrap-clean'
 ###      Delete everything that can be reconstructed by 'make' and that
index e718ea1a23a9d25cd23b49ff899f9bba4c2d9bd6..1d4749c8cd223e9a0f511f762cf27338368f15f9 100644 (file)
@@ -378,13 +378,16 @@ See `treesit-query-capture' for QUERY."
 (defun treesit-query-range (node query &optional beg end)
   "Query the current buffer and return ranges of captured nodes.
 
-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."
+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
+generally don't matter, but names that starts with an underscore
+are ignored."
   (cl-loop for capture
            in (treesit-query-capture node query beg end)
+           for name = (car capture)
            for node = (cdr capture)
+           if (not (string-prefix-p "_" (symbol-name name)))
            collect (cons (treesit-node-start node)
                          (treesit-node-end node))))
 
@@ -399,6 +402,9 @@ When updating the range of each parser in the buffer,
 range to the range spanned by captured nodes.  QUERY must be a
 compiled query.
 
+Capture names generally don't matter, but names that starts with
+an underscore are ignored.
+
 QUERY can also be a function, in which case it is called with 2
 arguments, START and END.  It should ensure parsers' ranges are
 correct in the region between START and END.
@@ -418,6 +424,9 @@ like this:
 Each QUERY is a tree-sitter query in either the string,
 s-expression or compiled form.
 
+Capture names generally don't matter, but names that starts with
+an underscore are ignored.
+
 For each QUERY, :KEYWORD and VALUE pairs add meta information to
 it.  For example,