[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/forth-mode 3047dfa37a 008/153: Run a subprocess Forth for
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/forth-mode 3047dfa37a 008/153: Run a subprocess Forth for interaction. |
Date: |
Sat, 29 Jan 2022 08:02:12 -0500 (EST) |
branch: elpa/forth-mode
commit 3047dfa37a82e3f0f188b0926c92f50a2699f71c
Author: Lars Brinkhoff <lars.brinkhoff@delphi.com>
Commit: Lars Brinkhoff <lars.brinkhoff@delphi.com>
Run a subprocess Forth for interaction.
---
forth-interaction-mode.el | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/forth-interaction-mode.el b/forth-interaction-mode.el
index 74dc7696b7..ad298bf172 100644
--- a/forth-interaction-mode.el
+++ b/forth-interaction-mode.el
@@ -1,3 +1,34 @@
+(require 'comint)
+
+(defvar forth-interaction-mode-map
+ (let ((map (copy-keymap forth-mode-map)))
+ (set-keymap-parent map comint-mode-map)
+ (define-key map (kbd "C-c C-k") 'forth-interaction-kill)
+ map)
+ "Keymap for Forth interaction.")
+
(define-derived-mode forth-interaction-mode comint-mode "Forth Interaction"
"Major mode for interacting with Forth."
- :syntax-table forth-interaction-mode-syntax-table)
+ :syntax-table forth-mode-syntax-table
+ (use-local-map forth-interaction-mode-map))
+
+(defun forth-interaction-kill (&optional buffer)
+ (interactive)
+ (kill-buffer (or buffer (current-buffer))))
+
+(defun forth-interaction-sentinel (proc arg)
+ (message "Forth: %s" arg)
+ (forth-interaction-kill (process-buffer proc)))
+
+;;;### autoload
+(defun forth ()
+ "Start an interactive forth session."
+ (interactive)
+ (let ((buffer (get-buffer-create "*forth*")))
+ (pop-to-buffer-same-window buffer)
+ (unless (comint-check-proc buffer)
+ (make-comint-in-buffer "forth" buffer "forth")
+ (set-process-sentinel (get-buffer-process buffer)
+ 'forth-interaction-sentinel)
+ (forth-interaction-mode))))
+
- [nongnu] elpa/forth-mode 3deee67777 097/153: Emacs 23: Don't test font-lock., (continued)
- [nongnu] elpa/forth-mode 3deee67777 097/153: Emacs 23: Don't test font-lock., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode b455a556fe 056/153: Add C-M-x, forth-eval-defun., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 973481a1c5 007/153: Add some autoloads., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 244c416c4d 013/153: Variable for secifying Forth executable., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode cdab2e4ec1 038/153: Also recognise .4th., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 695bb04ebc 002/153: A humble beginning., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 24d3d052fe 003/153: More work. Font lock and navigation somewhat usable., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 93756ec224 005/153: Some basic and flawed support for block files., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode bca8f01218 004/153: Make it work in older Emacsen without prog-mode., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode effb52b8e0 009/153: Load files from load-path., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 3047dfa37a 008/153: Run a subprocess Forth for interaction.,
ELPA Syncer <=
- [nongnu] elpa/forth-mode 6ab334684b 010/153: Send a string to an interactive Forth session., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode b6b1f049b0 017/153: Restart an interactive Forth session., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 7c75c452e9 022/153: Correct autoload cookie format, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode e4ed4a8acf 050/153: Test with both Emacs 23 and 24., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode cc267b4b85 043/153: Symbol completion. Candidates come from a running Forth., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 50adf0d552 024/153: Remove byte-compile warnings., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 85ce58e93e 020/153: Correct package header format, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode d972e9fc7a 019/153: Escape some character constants., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode d09313f19c 035/153: Add forth-eval-region., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 89b9904ceb 119/153: Add some tests for font-lock faces, ELPA Syncer, 2022/01/29