emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/lua-mode f92ced5 283/468: lua-send-region: send extra prin


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode f92ced5 283/468: lua-send-region: send extra printline
Date: Thu, 5 Aug 2021 04:58:53 -0400 (EDT)

branch: elpa/lua-mode
commit f92ced5898ca963bf6113a6e0553b4a0e3b49d52
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>

    lua-send-region: send extra printline
    
    This avoids putting interpreter output onto the prompt line.
---
 lua-mode.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lua-mode.el b/lua-mode.el
index b8532f0..843a727 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -1692,7 +1692,9 @@ Otherwise, return START."
          (lua-file (or (buffer-file-name) (buffer-name)))
          (region-str (buffer-substring-no-properties start end))
          (command
-          (format "luamode_loadstring(%s, %s, %s)"
+          ;; Print empty line before executing the code so that the first line
+          ;; of output doesn't end up on the same line as current prompt.
+          (format "print(''); luamode_loadstring(%s, %s, %s);\n"
                   (lua-make-lua-string region-str)
                   (lua-make-lua-string lua-file)
                   lineno)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]