diff options
author | Bozhidar Batsov <bozhidar@batsov.com> | 2016-02-07 11:12:20 +0200 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@batsov.com> | 2016-02-07 11:12:20 +0200 |
commit | 527b7ded071978a3043736fc7ac07e4a104cdc20 (patch) | |
tree | d6bbf42f64f2a0151d008aba5d37c40f727d4936 | |
parent | 2370b6cec4ec5bf0b75b662d751c2a666614d3d4 (diff) |
Extract the cider-test menu into a variable
Now it can be shared between cider-mode and
cider-repl-mode.
-rw-r--r-- | cider-mode.el | 8 | ||||
-rw-r--r-- | cider-repl.el | 2 | ||||
-rw-r--r-- | cider-test.el | 10 |
3 files changed, 13 insertions, 7 deletions
diff --git a/cider-mode.el b/cider-mode.el index 22acab8e..3a820457 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -240,13 +240,7 @@ Returns to the buffer in which the command was invoked." ["Find definition" cider-find-var] ["Find resource" cider-find-resource] ["Go back" cider-pop-back]) - ("Test" - ["Run test" cider-test-run-test] - ["Run namespace tests" cider-test-run-ns-tests] - ["Run all loaded tests" cider-test-run-loaded-tests] - ["Run all project tests" cider-test-run-project-tests] - ["Rerun failed/erring tests" cider-test-rerun-tests] - ["Show test report" cider-test-show-report]) + ,cider-test-menu "--" ["Run project (-main function)" cider-run] ["Inspect" cider-inspect] diff --git a/cider-repl.el b/cider-repl.el index ffcd1df0..58054fc4 100644 --- a/cider-repl.el +++ b/cider-repl.el @@ -1213,6 +1213,8 @@ constructs." ["Macroexpand-1" cider-macroexpand-1] ["Macroexpand-all" cider-macroexpand-all]) "--" + ,cider-test-menu + "--" ["Run project (-main function)" cider-run] ["Inspect" cider-inspect] ["Toggle var tracing" cider-toggle-trace-var] diff --git a/cider-test.el b/cider-test.el index 3a59428a..5e626ac8 100644 --- a/cider-test.el +++ b/cider-test.el @@ -134,6 +134,16 @@ (define-key map (kbd "b") #'cider-test-show-report) map)) +(defvar cider-test-menu + '("Test" + ["Run test" cider-test-run-test] + ["Run namespace tests" cider-test-run-ns-tests] + ["Run all loaded tests" cider-test-run-loaded-tests] + ["Run all project tests" cider-test-run-project-tests] + ["Rerun failed/erring tests" cider-test-rerun-tests] + ["Show test report" cider-test-show-report]) + "CIDER test submenu.") + (defvar cider-test-report-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "C-c ,") 'cider-test-commands-map) |