]> git.eshelyaron.com Git - emacs.git/commitdiff
Change treesit-local-parsers-in to treesit-local-parsers-on
authorYuan Fu <casouri@gmail.com>
Thu, 7 Sep 2023 23:04:29 +0000 (16:04 -0700)
committerYuan Fu <casouri@gmail.com>
Thu, 7 Sep 2023 23:04:29 +0000 (16:04 -0700)
To improve consistency. We already have treesit-node-at and
treesit-node-on.

* doc/lispref/parsing.texi (Multiple Languages): Update manual.
* lisp/treesit.el (treesit-local-parsers-on): Change to in.
(treesit-font-lock-fontify-region): Change to in.

doc/lispref/parsing.texi
lisp/treesit.el

index 3e5cbbec95bc46c299869e086d9bbc5f21c6f8e6..bac5a864bf89830d08a1b516019b14af510e1d9b 100644 (file)
@@ -1726,8 +1726,8 @@ treating them as separate independent segments.  Therefore, if the
 embedded ranges are semantically independent segments, they should be
 processed by local parsers, described below.
 
-The local parser set to a range can be retrieved by
-@code{treesit-local-parsers-at} and @code{treesit-local-parsers-in}.
+Local parser set to a range can be retrieved by
+@code{treesit-local-parsers-at} and @code{treesit-local-parsers-on}.
 
 @code{treesit-update-ranges} uses @var{query} to figure out how to set
 the ranges for parsers for the embedded language.  It queries
index 6fefc12258249bd433cb4ae432d47108dc2b423b..762bd8a9d04556aa0af4c7ab09110e34fe80f588 100644 (file)
@@ -602,7 +602,7 @@ If LANGUAGE is non-nil, only return parsers for LANGUAGE."
           (push parser res))))
     (nreverse res)))
 
-(defun treesit-local-parsers-in (&optional beg end language)
+(defun treesit-local-parsers-on (&optional beg end language)
   "Return all the local parsers between BEG END.
 
 BEG and END default to the beginning and end of the buffer's
@@ -1134,7 +1134,7 @@ If LOUDLY is non-nil, display some debugging information."
     (message "Fontifying region: %s-%s" start end))
   (treesit-update-ranges start end)
   (font-lock-unfontify-region start end)
-  (let* ((local-parsers (treesit-local-parsers-in start end))
+  (let* ((local-parsers (treesit-local-parsers-on start end))
          (global-parsers (treesit-parser-list))
          (root-nodes
           (mapcar (lambda (parser)