all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#74951: [PATCH] Add 'lua-ts-mode' to 'interpreter-mode-alist'
@ 2024-12-18 19:17 john muhl
  2024-12-18 19:20 ` john muhl
  0 siblings, 1 reply; 3+ messages in thread
From: john muhl @ 2024-12-18 19:17 UTC (permalink / raw)
  To: 74951

Tags: patch

Make is so that extensionless Lua scripts get recognized based on
the interpreter line.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#74951: [PATCH] Add 'lua-ts-mode' to 'interpreter-mode-alist'
  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
  2024-12-21 10:54   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: john muhl @ 2024-12-18 19:20 UTC (permalink / raw)
  To: 74951

[-- 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.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#74951: [PATCH] Add 'lua-ts-mode' to 'interpreter-mode-alist'
  2024-12-18 19:20 ` john muhl
@ 2024-12-21 10:54   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2024-12-21 10:54 UTC (permalink / raw)
  To: john muhl; +Cc: 74951-done

> From: john muhl <jm@pub.pink>
> Date: Wed, 18 Dec 2024 13:20:24 -0600
> 
> >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(-)

Thanks, installed on the emacs-30 branch, and closing the bug.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-21 10:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-12-21 10:54   ` Eli Zaretskii

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.