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

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

[nongnu] elpa/forth-mode 9f9b5cdf86 089/153: Don't send output as input


From: ELPA Syncer
Subject: [nongnu] elpa/forth-mode 9f9b5cdf86 089/153: Don't send output as input
Date: Sat, 29 Jan 2022 08:02:21 -0500 (EST)

branch: elpa/forth-mode
commit 9f9b5cdf862ecfee4af61930d782dd69a82577ce
Author: Helmut Eller <eller.helmut@gmail.com>
Commit: Lars Brinkhoff <lars@nocrew.org>

    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)



reply via email to

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