Subject: bug#73586: [PATCH] Tag interactive commands in 'lua-ts-mode'

From: john muhl <[email-masked]>
Date: Tue, 01 Oct 2024 13:43:51 -0500

>From bba5bcf0df080c92508f4fc932f9ea27874f0b05 Mon Sep 17 00:00:00 2001
From: john muhl <[email-masked]>
Date: Sat, 13 Jul 2024 18:36:38 -0500
Subject: [PATCH] Tag interactive commands in 'lua-ts-mode'

* lisp/progmodes/lua-ts-mode.el (lua-ts-send-buffer):
(lua-ts-send-file):
(lua-ts-send-region): Mark inferior interaction commands that are
only relevant in Lua buffers. (bug#73586)
---
 lisp/progmodes/lua-ts-mode.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el
index dd04a9e7569..7f16c75bdb5 100644
--- a/lisp/progmodes/lua-ts-mode.el
+++ b/lisp/progmodes/lua-ts-mode.el
@@ -676,19 +676,19 @@ lua-ts-inferior-lua
 
 (defun lua-ts-send-buffer ()
   "Send current buffer to the inferior Lua process."
-  (interactive)
+  (interactive nil lua-ts-mode)
   (lua-ts-send-region (point-min) (point-max)))
 
 (defun lua-ts-send-file (file)
   "Send contents of FILE to the inferior Lua process."
-  (interactive "f")
+  (interactive "f" lua-ts-mode)
   (with-temp-buffer
     (insert-file-contents-literally file)
     (lua-ts-send-region (point-min) (point-max))))
 
 (defun lua-ts-send-region (beg end)
   "Send region between BEG and END to the inferior Lua process."
-  (interactive "r")
+  (interactive "r" lua-ts-mode)
   (let ((string (buffer-substring-no-properties beg end))
         (proc-buffer (lua-ts-inferior-lua)))
     (comint-send-string proc-buffer "print()") ; Prevent output from
-- 
2.46.2

john muhl <[email-masked]> writes:

> Tags: patch
>
> Add tags to interactive commands that only make sense in lua mode
> buffers.