Function: elixir-ts-mode-maybe

elixir-ts-mode-maybe is an autoloaded and byte-compiled function defined in elixir-ts-mode.el.gz.

Signature

(elixir-ts-mode-maybe)

Documentation

Enable elixir-ts-mode when its grammar is available.

Also propose to install the grammar when treesit-enabled-modes is t or contains the mode name.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/elixir-ts-mode.el.gz
;;;###autoload
(defun elixir-ts-mode-maybe ()
  "Enable `elixir-ts-mode' when its grammar is available.
Also propose to install the grammar when `treesit-enabled-modes'
is t or contains the mode name."
  (declare-function treesit-language-available-p "treesit.c")
  (if (or (treesit-language-available-p 'elixir)
          (eq treesit-enabled-modes t)
          (memq 'elixir-ts-mode treesit-enabled-modes))
      (elixir-ts-mode)
    (fundamental-mode)))