Skip to content

Commit

Permalink
Add restart-forth to source window menu
Browse files Browse the repository at this point in the history
This also changes the default key binding for restart-forth,
which conflicted with forth-eval-region
  • Loading branch information
jpellegrini authored and larsbrinkhoff committed Jan 23, 2021
1 parent b9586a5 commit 8c0e519
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion forth-interaction-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
20 changes: 11 additions & 9 deletions forth-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8c0e519

Please sign in to comment.