mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-04 15:03:42 -05:00
refactor(:lang): remove fboundp checks for *-ts-modes
The major-mode-remap advice will handle undefined modes, so all these extra checks aren't needed.
This commit is contained in:
@@ -44,7 +44,11 @@
|
||||
(let ((mode (funcall fn mode)))
|
||||
(if-let* ((ts (get mode '+tree-sitter))
|
||||
(fallback-mode (car ts)))
|
||||
(cond ((not (fboundp mode))
|
||||
(cond ((or (not (fboundp 'treesit-available-p))
|
||||
(not (treesit-available-p)))
|
||||
(message "Treesit unavailable, falling back to `%S'" fallback-mode)
|
||||
fallback-mode)
|
||||
((not (fboundp mode))
|
||||
(message "Couldn't find `%S', falling back to `%S'" mode fallback-mode)
|
||||
fallback-mode)
|
||||
((and (or (eq treesit-enabled-modes t)
|
||||
|
Reference in New Issue
Block a user