fix(csharp): csharp-tree-sitter-mode: void-function error in Emacs 29+

In Emacs 29.0.60, csharp-mode was absorbed into Emacs, and
csharp-tree-sitter-mode was replaced with built-in support for the new
treesit.el library.
This commit is contained in:
passeride 2023-03-09 02:30:09 +01:00 committed by GitHub
parent 8be11ff48c
commit 78895d89ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,8 @@ or terminating simple string."
:defer t
:init
(add-hook 'csharp-mode-local-vars-hook #'tree-sitter! 'append)
(add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-tree-sitter-mode)))
(if (fboundp #'csharp-tree-sitter-mode)
(add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-tree-sitter-mode))))
;; Unity shaders