[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/raku-mode 759b21553f 189/253: Fix keybinds and menu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/raku-mode 759b21553f 189/253: Fix keybinds and menu |
Date: |
Sat, 29 Jan 2022 08:28:56 -0500 (EST) |
branch: elpa/raku-mode
commit 759b21553f028cd68df2bd5d51eebc1e0b1bb33f
Author: Matias Linares <matiaslina@gmail.com>
Commit: Matias Linares <matiaslina@gmail.com>
Fix keybinds and menu
---
perl6-mode.el | 19 +++++++++++++++----
perl6-repl.el | 20 --------------------
2 files changed, 15 insertions(+), 24 deletions(-)
diff --git a/perl6-mode.el b/perl6-mode.el
index 878e2db228..e21e8cb353 100644
--- a/perl6-mode.el
+++ b/perl6-mode.el
@@ -38,15 +38,27 @@
:prefix "perl6-"
:group 'language)
-(defvar perl6-mode-map nil "Keymap for `perl6-mode'")
-
-
(require 'perl6-detect)
(require 'perl6-font-lock)
(require 'perl6-indent)
(require 'perl6-imenu)
(require 'perl6-repl)
+(defvar perl6-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map (kbd "C-c C-c") 'perl6-send-line-to-repl)
+ (define-key map (kbd "C-c C-r") 'perl6-send-region-to-repl)
+ (define-key map (kbd "C-c C-h") 'perl6-send-buffer-to-repl)
+ map)
+ "Keymap for `perl6-mode'")
+
+(easy-menu-define perl6-mode-menu perl6-mode-map
+ "Menu for `perl6-mode'"
+ '("Raku"
+ ["Send line to repl" perl6-send-line-to-repl]
+ ["Send region to repl" perl6-send-region-to-repl]
+ ["Send buffer to repl" perl6-send-buffer-to-repl]))
+
;;;###autoload
(define-derived-mode perl6-mode prog-mode "Perl6"
"Major mode for editing Perl 6 code."
@@ -58,7 +70,6 @@
;; Add imenu support for perl6-mode. Note that imenu-generic-expression
;; is buffer-local, so we don't need a local-variable for it.
(add-hook 'perl6-mode-hook 'imenu-add-menubar-index)
- (add-hook 'perl6-mode-hook 'perl6-repl--initialize-menu)
(setq imenu-generic-expression perl6-imenu-generic-expression
imenu-case-fold-search nil)
;; Comments
diff --git a/perl6-repl.el b/perl6-repl.el
index 543cfe75a6..249b0bf18a 100644
--- a/perl6-repl.el
+++ b/perl6-repl.el
@@ -92,25 +92,5 @@
(select-window cwin)
(switch-to-buffer cbuf)))
-;; Menu for evaluation
-(defun perl6-repl--initialize-menu ()
- (interactive)
- (define-key-after
- perl6-mode-map
- [menu-bar perl6-interaction]
- (cons "Raku Interaction" (make-sparse-keymap "Perl6 Interaction"))
- 'tools)
- (define-key
- perl6-mode-map
- [menu-bar perl6-interaction eval-line]
- '("Evaluate line" . perl6-send-line-to-repl))
- (define-key
- perl6-mode-map
- [menu-bar perl6-interaction eval-region]
- '("Evaluate region" . perl6-send-region-to-repl))
- (define-key
- perl6-mode-map
- [menu-bar perl6-interaction eval-buffer]
- '("Evaluate buffer" . perl6-send-buffer-to-repl)))
(provide 'perl6-repl)
- [nongnu] elpa/raku-mode b6410f9d4c 126/253: Fix highlighting of ::foo, (continued)
- [nongnu] elpa/raku-mode b6410f9d4c 126/253: Fix highlighting of ::foo, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 60966ea875 133/253: Highlight function composition operator, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 601f37ef15 136/253: Bool type was added., ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 72f21d4a91 171/253: Just forcing reload to use change in cask, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode e5ab8b0589 175/253: Reverting to original cask, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode cc28223bb7 182/253: add new name categories and other improvements, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 748d07ab7c 188/253: Add repl to perl6 major mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode bf687c66a9 195/253: Update README, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode e79cb9067d 210/253: Merge pull request #27 from tmtvl/repl-syntax-highlighting, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 385ed1d54a 155/253: pull regexes up into documents variables, add index of classes, update regexes a bit (no longer show sub signatures), ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 759b21553f 189/253: Fix keybinds and menu,
ELPA Syncer <=
- [nongnu] elpa/raku-mode 588dc4417b 166/253: add new files, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 26fc7115b5 215/253: Add information about the auto-insert skeletons to the README., ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 44529c097f 221/253: Merge pull request #32 from widefox/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode ac967de8a4 222/253: Fix #33: missed interpreter & mode autoloads, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 02bf289149 242/253: Merge pull request #45 from sumanstats/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 0fc63c3ce1 001/253: Initial import, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 623b5b559a 018/253: Syntaxify double colons around identifiers as symbol chars, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 142ff3e928 030/253: Highlight variable package differently from variable name, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 127b125ab1 034/253: Use a smaller heading, ELPA Syncer, 2022/01/29
- [nongnu] elpa/raku-mode 75e4c4831d 022/253: Clean up the code for comment detection a bit, ELPA Syncer, 2022/01/29