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

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

[nongnu] elpa/lua-mode 853b040 432/468: `lua-start-process': start a new


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode 853b040 432/468: `lua-start-process': start a new process sometimes
Date: Thu, 5 Aug 2021 04:59:23 -0400 (EDT)

branch: elpa/lua-mode
commit 853b0405b7c9403484746328412fe5ae71fe240d
Author: Nikita Bloshchanevich <nikblos@outlook.com>
Commit: Nikita Bloshchanevich <nikblos@outlook.com>

    `lua-start-process': start a new process sometimes
    
    Start a new lua process if NAME is given and different.
---
 lua-mode.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lua-mode.el b/lua-mode.el
index 64334a2..bd9a60f 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -1857,11 +1857,12 @@ This function just searches for a `end' at the 
beginning of a line."
 PROGRAM defaults to NAME, which defaults to `lua-default-application'.
 When called interactively, switch to the process buffer."
   (interactive)
-  (unless (process-live-p lua-process)
-    (setq name (or name (if (consp lua-default-application)
-                            (car lua-default-application)
-                          lua-default-application)))
-    (setq program (or program lua-default-application))
+  (setq name (or name (if (consp lua-default-application)
+                          (car lua-default-application)
+                        lua-default-application)))
+  (setq program (or program lua-default-application))
+  ;; don't re-initialize if there already is a lua process
+  (unless (comint-check-proc (format "*%s*" name))
     (setq lua-process-buffer (apply #'make-comint name program startfile
                                     (or switches 
lua-default-command-switches)))
     (setq lua-process (get-buffer-process lua-process-buffer))



reply via email to

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