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

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

[nongnu] elpa/forth-mode 6dcd29382f 015/153: Make the forth-interaction-


From: ELPA Syncer
Subject: [nongnu] elpa/forth-mode 6dcd29382f 015/153: Make the forth-interaction-send callback optional.
Date: Sat, 29 Jan 2022 08:02:13 -0500 (EST)

branch: elpa/forth-mode
commit 6dcd29382f95a2f34d2c8bbb2990ceb65a90e373
Author: Lars Brinkhoff <lars.brinkhoff@delphi.com>
Commit: Lars Brinkhoff <lars.brinkhoff@delphi.com>

    Make the forth-interaction-send callback optional.
---
 forth-interaction-mode.el | 5 +++--
 forth-mode.el             | 3 +--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/forth-interaction-mode.el b/forth-interaction-mode.el
index e8529af451..731ccb1bcc 100644
--- a/forth-interaction-mode.el
+++ b/forth-interaction-mode.el
@@ -17,7 +17,8 @@
 
 (defun forth-interaction-preoutput-filter (text)
   (if forth-interaction-callback
-      (prog1 (funcall forth-interaction-callback text)
+      (prog1 (when forth-interaction-callback
+              (funcall forth-interaction-callback text))
        (setq forth-interaction-callback nil))
       text))
 
@@ -53,7 +54,7 @@
   (get-buffer-process forth-interaction-buffer))
 
 ;;;### autoload
-(defun forth-interaction-send (string callback)
+(defun forth-interaction-send (string &optional callback)
   (let ((proc (ensure-forth)))
     (setq forth-interaction-callback callback)
     (comint-send-string proc string)
diff --git a/forth-mode.el b/forth-mode.el
index 27e42b3b11..8580cdc3d0 100644
--- a/forth-mode.el
+++ b/forth-mode.el
@@ -98,7 +98,6 @@
 
 (defun forth-load-file (file)
   (interactive (list (buffer-file-name (current-buffer))))
-  (forth-interaction-send (concat "include " file)
-                         (lambda (x) (message "Forth: %s" x))))
+  (forth-interaction-send (concat "include " file)))
 
 (provide 'forth-mode)



reply via email to

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