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

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

[nongnu] elpa/forth-mode d09313f19c 035/153: Add forth-eval-region.


From: ELPA Syncer
Subject: [nongnu] elpa/forth-mode d09313f19c 035/153: Add forth-eval-region.
Date: Sat, 29 Jan 2022 08:02:14 -0500 (EST)

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

    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)



reply via email to

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