]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/go-ts-mode.el: Use treesit-language-available-p.
authorYuan Fu <casouri@gmail.com>
Wed, 1 Mar 2023 22:38:22 +0000 (14:38 -0800)
committerYuan Fu <casouri@gmail.com>
Wed, 1 Mar 2023 22:38:22 +0000 (14:38 -0800)
treesit-ready-p does more checks than language grammar availability.

lisp/progmodes/go-ts-mode.el

index 6043c86ac932b9792631316073e13ac95d5f7b89..fbe085a2c6cdb9003623644f816e7b02ea7764b6 100644 (file)
@@ -393,7 +393,7 @@ what the parent of the node would be if it were a node."
 
     (treesit-major-mode-setup)))
 
-(if (treesit-ready-p 'gomod t)
+(if (treesit-language-available-p 'gomod)
     (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode)))
 
 (provide 'go-ts-mode)