[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/poke 8128b1c4b4 54/76: poke.el: simplify prompt handlin
From: |
ELPA Syncer |
Subject: |
[elpa] externals/poke 8128b1c4b4 54/76: poke.el: simplify prompt handling |
Date: |
Tue, 5 Apr 2022 14:59:37 -0400 (EDT) |
branch: externals/poke
commit 8128b1c4b4fbf250a00dc74ef28ca210f2e85dba
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Commit: Jose E. Marchesi <jose.marchesi@oracle.com>
poke.el: simplify prompt handling
* emacs/poke.el (poke-repl-input-sender): Avoid race condition in
repl handling.
---
poke.el | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/poke.el b/poke.el
index d6839b586d..02161e51d7 100644
--- a/poke.el
+++ b/poke.el
@@ -752,7 +752,6 @@ fun plet_elval = (string s) void:
(defconst poke-repl-default-prompt "#!poke!# ")
(defvar poke-repl-prompt poke-repl-default-prompt)
(defvar poke-repl-process nil)
-(defvar poke-repl-seq 0)
(defvar poke-repl-mode-map
(let ((map (make-sparse-keymap)))
@@ -783,14 +782,13 @@ fun plet_elval = (string s) void:
(let ((buffer-read-only nil))
(save-excursion
(re-search-backward
- (regexp-quote (concat "#" (number-to-string poke-repl-seq)))
+ (regexp-quote (concat "---poke-repl-val---"))
nil t)
(delete-region (point) (line-end-position))
(if (> (length valstring) 0)
(insert valstring)
(unless (equal (point) (point-max))
- (delete-char 1))))
- (setq poke-repl-seq (1+ poke-repl-seq)))))
+ (delete-char 1)))))))
(defun poke-repl-set-prompt (string)
(let ((previous-prompt poke-repl-prompt))
@@ -804,10 +802,8 @@ fun plet_elval = (string s) void:
(defun poke-repl-input-sender (proc 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))
+ (let ((buffer-read-only nil))
+ (comint-output-filter poke-repl-process "---poke-repl-val---\n")
(comint-output-filter poke-repl-process poke-repl-prompt)
(cond
((string-match "^[ \t]*\\(var\\|type\\|unit\\|fun\\) " input)
@@ -831,7 +827,6 @@ fun plet_elval = (string s) void:
(poke-cmd)
(poke-code)
(when (not (process-live-p poke-repl-process))
- (setq poke-repl-seq 0)
(let ((buf (get-buffer-create "*poke-repl*")))
(with-current-buffer buf
(poke-repl-mode)))
- [elpa] externals/poke 84913982b0 23/76: poke.el: set_ios support, (continued)
- [elpa] externals/poke 84913982b0 23/76: poke.el: set_ios support, ELPA Syncer, 2022/04/05
- [elpa] externals/poke ad7ecfce56 28/76: poke.el: highlight lines in *poke-ios*, ELPA Syncer, 2022/04/05
- [elpa] externals/poke b88ff20148 31/76: poke.el: couple of small fixes, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 44f8443088 35/76: poke.el: minor fixes, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 46d106a707 40/76: poke.el: remove some non-needed functions, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 67aec94f24 42/76: poke.el: improvements in poke-edit, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 4e561bd42c 45/76: poke.el: several fixes, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 1de8a96a83 47/76: poke.el: more settings and frame layout, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 4fe7b7d8d3 48/76: poke.el: fix pouplating map buffer, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 71345855d5 49/76: poke.el: fix typo, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 8128b1c4b4 54/76: poke.el: simplify prompt handling,
ELPA Syncer <=
- [elpa] externals/poke 2b9ce057b3 61/76: poke.el: remove spurious function, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 9f45208c23 63/76: poke.el: mention pdap, ELPA Syncer, 2022/04/05
- [elpa] externals/poke cdf89905d2 02/76: emacs: new poke.el Emacs interface based on poked, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 48ec70a5fa 06/76: poke.el: simplify, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 182c7e124a 16/76: poke.el: fix typo, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 084424df42 17/76: poke.el: add a few commentary, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 560a396b6b 21/76: poke.el: poke-ios buffer with a list of open IO spaces, ELPA Syncer, 2022/04/05
- [elpa] externals/poke a656ac1691 32/76: emacs.el: poke-vu movement commands, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 23f72d3b9a 41/76: poke.el: many changes, ELPA Syncer, 2022/04/05
- [elpa] externals/poke 53d0275eac 60/76: poke.el: change vu refresh to use poked hooks, ELPA Syncer, 2022/04/05