branch: elpa/forth-mode
commit b6b1f049b0caf65a07c181be66cdf0d85bb9c096
Author: Lars Brinkhoff <[email protected]>
Commit: Lars Brinkhoff <[email protected]>
Restart an interactive Forth session.
---
forth-interaction-mode.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/forth-interaction-mode.el b/forth-interaction-mode.el
index 5fb40194d7..80ceb40850 100644
--- a/forth-interaction-mode.el
+++ b/forth-interaction-mode.el
@@ -7,6 +7,7 @@
(let ((map (copy-keymap forth-mode-map)))
(set-keymap-parent map comint-mode-map)
(define-key map (kbd "C-c C-k") 'forth-kill)
+ (define-key map (kbd "C-c C-r") 'forth-restart)
map)
"Keymap for Forth interaction.")
@@ -50,6 +51,12 @@
'forth-interaction-preoutput-filter nil t)
(setq forth-interaction-buffer buffer))))
+;;;### autoload
+(defun forth-restart ()
+ (interactive)
+ (forth-kill)
+ (forth))
+
(defun ensure-forth ()
(unless forth-interaction-buffer
(forth))