mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 02:30:33 -08:00
fix(tree-sitter): suppress changes to {auto,interpreter}-mode-alist
...when auto-loading a ts-mode package.
This commit is contained in:
parent
c014950f6d
commit
8dab364e46
1 changed files with 4 additions and 1 deletions
|
|
@ -62,7 +62,10 @@
|
||||||
(warning-suppress-types
|
(warning-suppress-types
|
||||||
(cons '(treesit) warning-suppress-types)))
|
(cons '(treesit) warning-suppress-types)))
|
||||||
(or (not (autoloadp fn))
|
(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.
|
;; Only prompt once, and log other times.
|
||||||
(or (null (cdr ts)) ; no grammars, no problem!
|
(or (null (cdr ts)) ; no grammars, no problem!
|
||||||
;; If the base/fallback mode doesn't exist, let's
|
;; If the base/fallback mode doesn't exist, let's
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue