1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-07 06:50:23 -08:00

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)
This commit is contained in:
john muhl 2024-07-13 18:36:38 -05:00 committed by Stefan Kangas
parent 84bea20eba
commit 63058e1153

View file

@ -676,19 +676,19 @@ Calls REPORT-FN directly."
(defun lua-ts-send-buffer () (defun lua-ts-send-buffer ()
"Send current buffer to the inferior Lua process." "Send current buffer to the inferior Lua process."
(interactive) (interactive nil lua-ts-mode)
(lua-ts-send-region (point-min) (point-max))) (lua-ts-send-region (point-min) (point-max)))
(defun lua-ts-send-file (file) (defun lua-ts-send-file (file)
"Send contents of FILE to the inferior Lua process." "Send contents of FILE to the inferior Lua process."
(interactive "f") (interactive "f" lua-ts-mode)
(with-temp-buffer (with-temp-buffer
(insert-file-contents-literally file) (insert-file-contents-literally file)
(lua-ts-send-region (point-min) (point-max)))) (lua-ts-send-region (point-min) (point-max))))
(defun lua-ts-send-region (beg end) (defun lua-ts-send-region (beg end)
"Send region between BEG and END to the inferior Lua process." "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)) (let ((string (buffer-substring-no-properties beg end))
(proc-buffer (lua-ts-inferior-lua))) (proc-buffer (lua-ts-inferior-lua)))
(comint-send-string proc-buffer "print()") ; Prevent output from (comint-send-string proc-buffer "print()") ; Prevent output from