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

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

[elpa] externals/poke 3ac0d4c611 51/76: poke.el: avoid race condition in


From: ELPA Syncer
Subject: [elpa] externals/poke 3ac0d4c611 51/76: poke.el: avoid race condition in REPL handling
Date: Tue, 5 Apr 2022 14:59:36 -0400 (EDT)

branch: externals/poke
commit 3ac0d4c6119ca6d6ba47794da7487b7cdec267c9
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Commit: Jose E. Marchesi <jose.marchesi@oracle.com>

    poke.el: avoid race condition in REPL handling
    
    2022-03-21  Jose E. Marchesi  <jemarch@gnu.org>
    
            * emacs/poke.el (poke-repl-input-sender): Avoid race condition in
            repl handling.
---
 poke.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/poke.el b/poke.el
index 9abcc1328c..7ae513ae0e 100644
--- a/poke.el
+++ b/poke.el
@@ -795,11 +795,12 @@ fun plet_elval = (string s) void:
       (comint-output-filter poke-repl-process poke-repl-prompt))))
 
 (defun poke-repl-input-sender (proc input)
-  (unless (string-blank-p input)
+  (if (not (string-blank-p input))
     (let ((id (number-to-string poke-repl-seq))
           (buffer-read-only nil)
           (lb (- (line-beginning-position) 5)))
       (comint-output-filter poke-repl-process (format "#%s\n" id))
+      (comint-output-filter poke-repl-process poke-repl-prompt)
       (cond
        ((string-match "^[ \t]*\\(var\\|type\\|unit\\|fun\\) " input)
         (poke-code-send (concat input ";")))
@@ -812,9 +813,9 @@ fun plet_elval = (string s) void:
                                 "\"" (match-string 1 input) "\""
                                 ");")))
        (t
-        (poke-cmd-send (concat input ";"))))))
-  (poke-vu-refresh)
-  (comint-output-filter poke-repl-process poke-repl-prompt))
+        (poke-cmd-send (concat input ";")))))
+    (comint-output-filter poke-repl-process poke-repl-prompt))
+  (poke-vu-refresh))
 
 (defun poke-repl ()
   (interactive)



reply via email to

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