Function: markdown-get-lang-mode
markdown-get-lang-mode is a byte-compiled function defined in
markdown-mode.el.
Signature
(markdown-get-lang-mode LANG)
Documentation
Return major mode that should be used for LANG.
LANG is a string, and the returned major mode is a symbol.
Source Code
;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown-get-lang-mode (lang)
"Return major mode that should be used for LANG.
LANG is a string, and the returned major mode is a symbol."
(cl-find-if
#'markdown--lang-mode-predicate
(nconc (list (cdr (assoc lang markdown-code-lang-modes))
(cdr (assoc (downcase lang) markdown-code-lang-modes)))
(and (fboundp 'treesit-language-available-p)
(list (and (treesit-language-available-p (intern lang))
(intern (concat lang "-ts-mode")))
(and (treesit-language-available-p (intern (downcase lang)))
(intern (concat (downcase lang) "-ts-mode")))))
(list
(intern (concat lang "-mode"))
(intern (concat (downcase lang) "-mode"))))))