diff options
author | dpsutton <dpsutton@users.noreply.github.com> | 2016-04-25 11:02:54 -0500 |
---|---|---|
committer | Bozhidar Batsov <bozhidar.batsov@gmail.com> | 2016-04-25 09:02:54 -0700 |
commit | ece8fb95696316d2ef305efb007f63dd4385f94f (patch) | |
tree | 37f9d799a030f4630f1e397235c2859a3a9ff80b /cider-macroexpansion.el | |
parent | 21b585752358c719ff87ad51246d543c59f60b82 (diff) |
Keyboard shortcuts for macroexpansion mode (#1704)
Change keyboard shortcuts for `cider-macroexpand-1-inplace` to `m` and
`cider-macroexpand-all-inplace` to `a` from previous `C-c C-m` and `C-c
M-m` respectively.
Diffstat (limited to 'cider-macroexpansion.el')
-rw-r--r-- | cider-macroexpansion.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cider-macroexpansion.el b/cider-macroexpansion.el index 734a7fd9..63f3335c 100644 --- a/cider-macroexpansion.el +++ b/cider-macroexpansion.el @@ -177,23 +177,21 @@ and point is placed after the expanded form." (define-key map (kbd "d") #'cider-doc) (define-key map (kbd "j") #'cider-javadoc) (define-key map (kbd ".") #'cider-find-var) + (define-key map (kbd "m") #'cider-macroexpand-1-inplace) + (define-key map (kbd "a") #'cider-macroexpand-all-inplace) + (define-key map (kbd "u") #'cider-macroexpand-undo) + (define-key map [remap undo] #'cider-macroexpand-undo) (easy-menu-define cider-macroexpansion-mode-menu map "Menu for CIDER's doc mode" '("Macroexpansion" ["Restart expansion" cider-macroexpand-again] ["Macroexpand-1" cider-macroexpand-1-inplace] ["Macroexpand-all" cider-macroexpand-all-inplace] + ["Macroexpand-undo" cider-macroexpand-undo] ["Go to source" cider-find-var] ["Go to doc" cider-doc] ["Go to Javadoc" cider-docview-javadoc] ["Quit" cider-popup-buffer-quit-function])) - (cl-labels ((redefine-key (from to) - (dolist (mapping (where-is-internal from cider-mode-map)) - (define-key map mapping to)))) - (redefine-key 'cider-macroexpand-1 #'cider-macroexpand-1-inplace) - (redefine-key 'cider-macroexpand-all #'cider-macroexpand-all-inplace) - (redefine-key 'advertised-undo #'cider-macroexpand-undo) - (redefine-key 'undo #'cider-macroexpand-undo)) map)) (define-minor-mode cider-macroexpansion-mode |