[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/forth-mode 21033fc700 031/153: Improve sending commands to
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/forth-mode 21033fc700 031/153: Improve sending commands to an interactive Forth session. |
Date: |
Sat, 29 Jan 2022 08:02:14 -0500 (EST) |
branch: elpa/forth-mode
commit 21033fc700282702aa4615bb7c039709d0f16dc9
Author: Lars Brinkhoff <lars.brinkhoff@delphi.com>
Commit: Lars Brinkhoff <lars.brinkhoff@delphi.com>
Improve sending commands to an interactive Forth session.
---
forth-interaction-mode.el | 22 ++++++++++++++--------
forth-mode.el | 2 +-
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/forth-interaction-mode.el b/forth-interaction-mode.el
index 5e07613e28..87fad97fc9 100644
--- a/forth-interaction-mode.el
+++ b/forth-interaction-mode.el
@@ -19,9 +19,7 @@
(defun forth-interaction-preoutput-filter (text)
(if forth-interaction-callback
- (prog1 (when forth-interaction-callback
- (funcall forth-interaction-callback text))
- (setq forth-interaction-callback nil))
+ (funcall forth-interaction-callback text)
text))
(defun forth-kill (&optional buffer)
@@ -64,10 +62,18 @@
(get-buffer-process forth-interaction-buffer))
;;;###autoload
-(defun forth-interaction-send (string &optional callback)
- (let ((proc (forth-ensure)))
- (setq forth-interaction-callback callback)
- (comint-send-string proc string)
- (comint-send-string proc "\n")))
+(defun forth-interaction-send (&rest strings)
+ (let* ((proc (forth-ensure))
+ (forth-result nil)
+ (forth-interaction-callback (lambda (x)
+ (setq forth-result (concat forth-result
x))
+ ""))
+ (end-time (+ (float-time) .4)))
+ (dolist (s strings)
+ (comint-send-string proc s))
+ (comint-send-string proc "\n")
+ (while (< (float-time) end-time)
+ (accept-process-output proc 0.1))
+ forth-result))
(provide 'forth-interaction-mode)
diff --git a/forth-mode.el b/forth-mode.el
index ba5289ec44..61b6d4c0fe 100644
--- a/forth-mode.el
+++ b/forth-mode.el
@@ -107,7 +107,7 @@
(defun forth-load-file (file)
(interactive (list (buffer-file-name (current-buffer))))
- (forth-interaction-send (concat "include " file)))
+ (forth-interaction-send "include " file))
(defun forth-beginning ()
(goto-char (point-min)))
- [nongnu] elpa/forth-mode 7c75c452e9 022/153: Correct autoload cookie format, (continued)
- [nongnu] elpa/forth-mode 7c75c452e9 022/153: Correct autoload cookie format, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode e4ed4a8acf 050/153: Test with both Emacs 23 and 24., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode cc267b4b85 043/153: Symbol completion. Candidates come from a running Forth., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 50adf0d552 024/153: Remove byte-compile warnings., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 85ce58e93e 020/153: Correct package header format, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode d972e9fc7a 019/153: Escape some character constants., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode d09313f19c 035/153: Add forth-eval-region., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 89b9904ceb 119/153: Add some tests for font-lock faces, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode d47662b187 037/153: Add some installation and usage instrutions., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 1cb3071930 117/153: Move the font-locking for defining words to forth-syntax.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 21033fc700 031/153: Improve sending commands to an interactive Forth session.,
ELPA Syncer <=
- [nongnu] elpa/forth-mode 1c05a009a3 080/153: Fix warning about speedbar-add-supported-extension., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode ef60dcd180 036/153: If forth-executable is nil, query user for file name., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode b29a929b78 028/153: Add provide forms., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 992bfb64b4 103/153: Fix warning about font-lock-fontify-buffer non-interactive use., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode efa1f0a336 046/153: Build Emacs Lisp files., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 1bc27cd6b6 115/153: Support paragraph filling in comments, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 4868a0ff03 051/153: Fix for imenu integration., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 5b42dfac0c 105/153: Merge branch 'master' into case-insensitive-indentation, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode c8103312c3 041/153: Fix typo., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode b83ff1274b 054/153: Type C-c C-s to SEE a word., ELPA Syncer, 2022/01/29