summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Neidhardt <ambrevar@gmail.com>2017-12-03 15:06:13 +0100
committerPierre Neidhardt <ambrevar@gmail.com>2017-12-03 15:06:13 +0100
commitb129403dfa58156153540f4c23bf48aa9ea362e5 (patch)
treef4a4d9e9eca06a1a18ccc4c699a139465bef13b3
parent1acc818215cdcc50e8086cf648d4544a83f6cb34 (diff)
Helm: Use evil-define-key now that upstream has fixed the inheritance issue
https://github.com/emacs-evil/evil/pull/982
-rw-r--r--evil-helm.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/evil-helm.el b/evil-helm.el
index aad9b81..1658f58 100644
--- a/evil-helm.el
+++ b/evil-helm.el
@@ -44,15 +44,15 @@
(defun evil-helm-setup ()
"Set up `evil' bindings for `helm'."
- ;; TODO: We should not modify helm-map in Emacs state but somehow it does not
- ;; work otherwise.
- (define-key helm-map (kbd "M-[") 'helm-previous-source)
- (define-key helm-map (kbd "M-]") 'helm-next-source)
- (define-key helm-map (kbd "M-l") 'helm-execute-persistent-action)
+ (evil-define-key 'insert helm-map
+ (kbd "M-[") 'helm-previous-source
+ (kbd "M-]") 'helm-next-source
+ (kbd "M-l") 'helm-execute-persistent-action)
(dolist (map (list helm-find-files-map helm-read-file-map))
- (define-key map (kbd "M-h") 'helm-find-files-up-one-level)
- (define-key map (kbd "M-l") 'helm-execute-persistent-action) ; TODO: Inheritance does not seem to work for that binding.
- (define-key map (kbd "C-l") nil)) ; So the header displays the above binding.
+ (evil-define-key 'insert map
+ (kbd "M-h") 'helm-find-files-up-one-level
+ (kbd "M-l") 'helm-execute-persistent-action)
+ (define-key map (kbd "C-l") nil)) ; So the Helm header displays the "M-l" binding.
(evil-define-key 'normal helm-map
(kbd "[") 'helm-previous-source