From 8c0e519c57296d540684bb4997edcf43671adc07 Mon Sep 17 00:00:00 2001 From: Jeronimo Pellegrini Date: Fri, 23 Nov 2018 10:37:22 -0200 Subject: [PATCH] Add restart-forth to source window menu This also changes the default key binding for restart-forth, which conflicted with forth-eval-region --- forth-interaction-mode.el | 2 +- forth-mode.el | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/forth-interaction-mode.el b/forth-interaction-mode.el index 6e9cfe9..8eaffbd 100644 --- a/forth-interaction-mode.el +++ b/forth-interaction-mode.el @@ -23,7 +23,7 @@ (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-r") 'forth-restart) + (define-key map (kbd "C-c C-f") 'forth-restart) (define-key map (kbd "C-c C-z") 'forth-switch-to-source-buffer) map) "Keymap for Forth interaction.") diff --git a/forth-mode.el b/forth-mode.el index 2c18798..537bab6 100644 --- a/forth-mode.el +++ b/forth-mode.el @@ -19,15 +19,16 @@ (defvar forth-mode-map (let ((map (make-sparse-keymap))) - (define-key map (kbd "C-c C-r") 'forth-eval-region) - (define-key map (kbd "C-c C-l") 'forth-load-file) - (define-key map (kbd "C-c C-s") 'forth-see) - (define-key map (kbd "C-M-x") 'forth-eval-defun) - (define-key map (kbd "C-c C-k") 'forth-kill) - (define-key map (kbd "C-c C-e") 'forth-eval-last-expression) - (define-key map (kbd "C-x M-e") 'forth-eval-last-expression-display-output) - (define-key map (kbd "C-c C-z") 'forth-switch-to-output-buffer) - (define-key map (kbd "C-c :") 'forth-eval) + (define-key map (kbd "C-c C-r") 'forth-eval-region) + (define-key map (kbd "C-c C-l") 'forth-load-file) + (define-key map (kbd "C-c C-s") 'forth-see) + (define-key map (kbd "C-M-x") 'forth-eval-defun) + (define-key map (kbd "C-c C-k") 'forth-kill) + (define-key map (kbd "C-c C-f") 'forth-restart) + (define-key map (kbd "C-c C-e") 'forth-eval-last-expression) + (define-key map (kbd "C-x M-e") 'forth-eval-last-expression-display-output) + (define-key map (kbd "C-c C-z") 'forth-switch-to-output-buffer) + (define-key map (kbd "C-c :") 'forth-eval) (define-key map (kbd "C-c C-d 1") 'forth-spec-lookup-1994) (define-key map (kbd "C-c C-d 2") 'forth-spec-lookup-2012) ;; (define-key map (kbd "C-c C-c") 'eval-buffer) @@ -81,6 +82,7 @@ '(separator2 "--") '(load-file "Load file" forth-load-file) '(run "Run Forth" run-forth) + '(restart "Restart Forth" forth-restart) '(kill "Kill" forth-kill)))) ;; forth-create-menu will actually call define-key to