branch: elpa/forth-mode
commit 778470cbcbde3ff9e76491ea2f820d23540bdc45
Author: Lars Brinkhoff <[email protected]>
Commit: Lars Brinkhoff <[email protected]>
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)