fix(tree-sitter): suppress changes to {auto,interpreter}-mode-alist

...when auto-loading a ts-mode package.
This commit is contained in:
Henrik Lissner
2025-09-03 14:42:28 +02:00
parent c014950f6d
commit 8dab364e46

View File

@@ -62,7 +62,10 @@
(warning-suppress-types
(cons '(treesit) warning-suppress-types)))
(or (not (autoloadp fn))
(autoload-do-load fn mode)))
;; ts-modes usually change these alists at autoload
;; *and* load time.
(let (auto-mode-alist interpreter-mode-alist)
(autoload-do-load fn mode))))
;; Only prompt once, and log other times.
(or (null (cdr ts)) ; no grammars, no problem!
;; If the base/fallback mode doesn't exist, let's