summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorjohn muhl <jm@pub.pink>2024-12-18 10:59:19 -0600
committerEli Zaretskii <eliz@gnu.org>2024-12-21 12:53:21 +0200
commit08b62132ddee01f0c84bc478b718370b51fade6a (patch)
treecce874809eccb9700623bdd5b88a3c5871a70204 /lisp
parentd8ffcf2fbaca158f3eed3b35cc181756a4c4878f (diff)
downloademacs-08b62132ddee01f0c84bc478b718370b51fade6a.tar.gz
emacs-08b62132ddee01f0c84bc478b718370b51fade6a.tar.bz2
emacs-08b62132ddee01f0c84bc478b718370b51fade6a.zip
Add 'lua-ts-mode' to 'interpreter-mode-alist'
* lisp/progmodes/lua-ts-mode.el: Enable 'lua-ts-mode' for Lua scripts based on their interpreter line. (Bug#74951)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/lua-ts-mode.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el
index 9d06517a97d..641ea4261b0 100644
--- a/lisp/progmodes/lua-ts-mode.el
+++ b/lisp/progmodes/lua-ts-mode.el
@@ -853,7 +853,8 @@ Calls REPORT-FN directly."
(derived-mode-add-parents 'lua-ts-mode '(lua-mode))
(when (treesit-ready-p 'lua)
- (add-to-list 'auto-mode-alist '("\\.lua\\'" . lua-ts-mode)))
+ (add-to-list 'auto-mode-alist '("\\.lua\\'" . lua-ts-mode))
+ (add-to-list 'interpreter-mode-alist '("\\<lua\\(?:jit\\)?" . lua-ts-mode)))
(provide 'lua-ts-mode)