; Add heuristic for treesit--update-ranges-non-local

* lisp/treesit.el (treesit--update-ranges-non-local): Treat
language symbols that happens to be a command as just language
symbol, not function.
This commit is contained in:
Yuan Fu 2026-04-26 22:07:33 -07:00
parent ee021b0ec1
commit d19c511425
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -1079,7 +1079,8 @@ returns the ranges to use for that node.
Return updated parsers as a list."
(let ((ranges-by-lang
(if (functionp embed-lang)
;; Filter out functions like `markdown' using `commandp'.
(if (and (functionp embed-lang) (not (commandp embed-lang)))
(treesit-query-range-by-language
host-parser query embed-lang beg end offset range-fn)
(list (cons embed-lang