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

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

[nongnu] elpa/forth-mode 778470cbcb 014/153: Load a file into an interac


From: ELPA Syncer
Subject: [nongnu] elpa/forth-mode 778470cbcb 014/153: Load a file into an interactive Forth session.
Date: Sat, 29 Jan 2022 08:02:13 -0500 (EST)

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

    Load a file into an interactive Forth session.
---
 forth-mode.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/forth-mode.el b/forth-mode.el
index a5afaf00e6..27e42b3b11 100644
--- a/forth-mode.el
+++ b/forth-mode.el
@@ -13,7 +13,7 @@
     ;; (define-key (kbd "C-x C-e") #'forth-eval-last-sexp)
     ;; (define-key (kbd "C-M-x") #'forth-eval-defun)
     ;; (define-key (kbd "C-c C-r") #'forth-eval-region)
-    ;; (define-key (kbd "C-c C-l") #'forth-load-file)
+    (define-key map (kbd "C-c C-l") 'forth-load-file)
     ;; (define-key (kbd "C-c :") #'forth-eval-expression)
     ;; (define-key (kbd "C-c C-c") #'forth-compile-defun)
     ;; (define-key (kbd "C-c C-k") #'forth-compile-and-load-file)
@@ -96,4 +96,9 @@
 (defun forth-beginning-of-defun ())
 (defun forth-end-of-defun ())
 
+(defun forth-load-file (file)
+  (interactive (list (buffer-file-name (current-buffer))))
+  (forth-interaction-send (concat "include " file)
+                         (lambda (x) (message "Forth: %s" x))))
+
 (provide 'forth-mode)



reply via email to

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