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.
This commit is contained in:
parent
802a54ad62
commit
8aa9dc1c0c
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue