branch: elpa/forth-mode
commit d09313f19cc1a564989b82b9924e38c974a8e38c
Author: Lars Brinkhoff <[email protected]>
Commit: Lars Brinkhoff <[email protected]>
Add forth-eval-region.
---
README.md | 3 ++-
forth-interaction-mode.el | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 3ff4854f5c..a8e6661f9a 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,8 @@
Features in progress:
- Recognises definitions and moves by balanced expressions.
-- Interact with a Forth session: enter commands, load files.
+- Interact with a Forth session: enter commands, load files, evalutate
+ expressions.
- Display stack comment when moving the cursor over a word.
- Edit block files.
diff --git a/forth-interaction-mode.el b/forth-interaction-mode.el
index 35d20a4478..658b455b29 100644
--- a/forth-interaction-mode.el
+++ b/forth-interaction-mode.el
@@ -83,4 +83,9 @@
(defun forth-words ()
(split-string (forth-interaction-send "words")))
+;;;###autoload
+(defun forth-eval-region (start end)
+ (interactive "r")
+ (message "%s" (forth-interaction-send (buffer-substring start end))))
+
(provide 'forth-interaction-mode)