mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Make tree-sitter based modes optional
* lisp/progmodes/c-ts-mode.el: Update Commentary. Make 'auto-mode-alist' update conditional on the tree-sitter and grammar libraries being available. * lisp/progmodes/cmake-ts-mode.el: * lisp/progmodes/csharp-mode.el: * lisp/progmodes/dockerfile-ts-mode.el: * lisp/progmodes/go-ts-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/typescript-ts-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/toml-ts-mode.el: * lisp/textmodes/yaml-ts-mode.el: Make 'auto-mode-alist' update for tree-sitter based modes be conditional on the tree-sitter and grammar libraries being available. (Bug#60559)
This commit is contained in:
parent
b56cf28b32
commit
6b2f85caa6
16 changed files with 140 additions and 76 deletions
|
|
@ -1047,6 +1047,20 @@ leading double colon is not added."
|
|||
|
||||
(treesit-major-mode-setup))
|
||||
|
||||
(if (treesit-ready-p 'ruby)
|
||||
;; Copied from ruby-mode.el.
|
||||
(add-to-list 'auto-mode-alist
|
||||
(cons (concat "\\(?:\\.\\(?:"
|
||||
"rbw?\\|ru\\|rake\\|thor"
|
||||
"\\|jbuilder\\|rabl\\|gemspec\\|podspec"
|
||||
"\\)"
|
||||
"\\|/"
|
||||
"\\(?:Gem\\|Rake\\|Cap\\|Thor"
|
||||
"\\|Puppet\\|Berks\\|Brew"
|
||||
"\\|Vagrant\\|Guard\\|Pod\\)file"
|
||||
"\\)\\'")
|
||||
'ruby-ts-mode)))
|
||||
|
||||
(provide 'ruby-ts-mode)
|
||||
|
||||
;;; ruby-ts-mode.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue