branch: elpa/forth-mode
commit 9f9b5cdf862ecfee4af61930d782dd69a82577ce
Author: Helmut Eller <[email protected]>
Commit: Lars Brinkhoff <[email protected]>
Don't send output as input
Use 'comint-output-filter instead of 'insert when inserting output.
If text is inserted with a normal 'insert the text is included as
as input the next time RET is pressed.
---
forth-interaction-mode.el | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/forth-interaction-mode.el b/forth-interaction-mode.el
index c40286d71c..ef0c9e788d 100644
--- a/forth-interaction-mode.el
+++ b/forth-interaction-mode.el
@@ -155,11 +155,9 @@
(setq result (forth-scrub result t))
(if (< (count ?\n result) 2)
(message "%s" result)
- (let ((buffer (current-buffer)))
- (pop-to-buffer forth-interaction-buffer)
- (goto-char (point-max))
- (insert result "\n")
- (pop-to-buffer buffer)))))
+ (pop-to-buffer forth-interaction-buffer))
+ (comint-output-filter (get-buffer-process forth-interaction-buffer)
+ (concat result "\n"))))
;;;###autoload
(defun forth-see (word)