From: john muhl <jm@pub.pink>
To: 74951@debbugs.gnu.org
Subject: bug#74951: [PATCH] Add 'lua-ts-mode' to 'interpreter-mode-alist'
Date: Wed, 18 Dec 2024 13:20:24 -0600 [thread overview]
Message-ID: <878qscyf0n.fsf@pub.pink> (raw)
In-Reply-To: <87ed24yf52.fsf@pub.pink> (john muhl's message of "Wed, 18 Dec 2024 13:17:45 -0600")
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-Add-lua-ts-mode-to-interpreter-mode-alist.patch --]
[-- Type: text/x-patch, Size: 960 bytes --]
From 375f901d152b929d7f64bd2c18fa6a02bd4ba233 Mon Sep 17 00:00:00 2001
From: john muhl <jm@pub.pink>
Date: Wed, 18 Dec 2024 10:59:19 -0600
Subject: [PATCH] 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)
---
lisp/progmodes/lua-ts-mode.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el
index 9d2969d6ac4..6fa3e51b34b 100644
--- a/lisp/progmodes/lua-ts-mode.el
+++ b/lisp/progmodes/lua-ts-mode.el
@@ -839,7 +839,8 @@ lua-ts-mode
(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)
--
2.47.1
[-- Attachment #2: Type: text/plain, Size: 143 bytes --]
john muhl <jm@pub.pink> writes:
> Tags: patch
>
> Make is so that extensionless Lua scripts get recognized based on
> the interpreter line.
next prev parent reply other threads:[~2024-12-18 19:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 19:17 bug#74951: [PATCH] Add 'lua-ts-mode' to 'interpreter-mode-alist' john muhl
2024-12-18 19:20 ` john muhl [this message]
2024-12-21 10:54 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878qscyf0n.fsf@pub.pink \
--to=jm@pub.pink \
--cc=74951@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.