emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 8aa9dc1c0cb 1/3: Change treesit-local-parsers-in to treesit-local


From: Yuan Fu
Subject: master 8aa9dc1c0cb 1/3: Change treesit-local-parsers-in to treesit-local-parsers-on
Date: Thu, 7 Sep 2023 19:05:12 -0400 (EDT)

branch: master
commit 8aa9dc1c0cbdf8367511f561d39c5aef8dd71a0c
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    Change treesit-local-parsers-in to treesit-local-parsers-on
    
    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 | 4 ++--
 lisp/treesit.el          | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi
index 3e5cbbec95b..bac5a864bf8 100644
--- a/doc/lispref/parsing.texi
+++ b/doc/lispref/parsing.texi
@@ -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
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 6fefc122582..762bd8a9d04 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -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)



reply via email to

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