Subject: Re: bug#74705: [PATCH] Don't restrict 'lua-ts-send-file' to 'lua-ts-mode'

From: Eli Zaretskii <[email-masked]>
Date: Sat, 07 Dec 2024 15:29:24 +0200

> From: john muhl <[email-masked]>
> Date: Thu, 05 Dec 2024 19:35:33 -0600
> 
> >From 097384e4ddaf98b1f2afe441d2c7997feb0bd715 Mon Sep 17 00:00:00 2001
> From: john muhl <[email-masked]>
> Date: Mon, 2 Dec 2024 09:20:01 -0600
> Subject: [PATCH] Don't restrict 'lua-ts-send-file' to 'lua-ts-mode'
> 
> * lisp/progmodes/lua-ts-mode.el (lua-ts-send-file): Remove
> restriction on interactive use.  Unlike related send-* commands
> it can be useful to send a file to the Lua interpreter outside of
> a 'lua-ts-mode' buffer.  (Bug#74705)
> ---
>  lisp/progmodes/lua-ts-mode.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el
> index 828636f359d..f7669a1b015 100644
> --- a/lisp/progmodes/lua-ts-mode.el
> +++ b/lisp/progmodes/lua-ts-mode.el
> @@ -694,7 +694,7 @@ lua-ts-send-buffer
>  
>  (defun lua-ts-send-file (file)
>    "Send contents of FILE to the inferior Lua process."
> -  (interactive "f" lua-ts-mode)
> +  (interactive "f")
>    (with-temp-buffer
>      (insert-file-contents-literally file)
>      (lua-ts-send-region (point-min) (point-max))))
> -- 
> 2.47.0
> 
> john muhl <[email-masked]> writes:
> 
> > Tags: patch
> >
> > The lua-ts-send-file command was marked as limited to lua-ts-mode
> > buffers but there is no reason for such a restriction since it
> > reads a file from disk (unlike the other send-* commands that use
> > buffer contents).

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