Fix prefix error triggered by Helm

See docstring in changes.
This commit is contained in:
syl20bnr 2016-01-10 01:20:26 -05:00
parent ac9e88fa7c
commit 6747e9a9f6
1 changed files with 22 additions and 1 deletions

View File

@ -157,6 +157,27 @@ that directory."
(use-package counsel
:config
(progn
(defun spacemacs/describe-mode ()
"Dummy wrapper to prevent an key binding error from helm.
By default the emacs leader is M-m, turns out that Helm does this:
(cl-dolist (k (where-is-internal 'describe-mode global-map))
(define-key map k 'helm-help))
after doing this:
(define-key map (kbd \"M-m\") 'helm-toggle-all-marks)
So when Helm is loaded we get the error:
Key sequence M-m h d m starts with non-prefix key M-m
To prevent this error we just wrap `describe-mode' to defeat the
Helm hack."
(interactive)
(call-interactively 'describe-mode))
(spacemacs/set-leader-keys
dotspacemacs-command-key 'counsel-M-x
;; files
@ -164,7 +185,7 @@ that directory."
"fL" 'counsel-locate
;; help
"hdf" 'counsel-describe-function
"hdm" 'describe-mode
"hdm" 'spacemacs/describe-mode
"hdv" 'counsel-describe-variable
;; insert
"iu" 'counsel-unicode-char