Fix evil-map
This commit is contained in:
parent
5decda16b2
commit
c036dfc843
|
@ -669,14 +669,14 @@
|
||||||
"Map for a given STATE a KEY to a sequence SEQ of keys.
|
"Map for a given STATE a KEY to a sequence SEQ of keys.
|
||||||
|
|
||||||
Can handle recursive definition only if KEY is the first key of SEQ.
|
Can handle recursive definition only if KEY is the first key of SEQ.
|
||||||
Example: (evil-map normal \"<\" \"<gv\")"
|
Example: (evil-map visual \"<\" \"<gv\")"
|
||||||
(let ((map (intern (format "evil-%S-state-map" state))))
|
(let ((map (intern (format "evil-%S-state-map" state))))
|
||||||
`(define-key ,map ,key
|
`(define-key ,map ,key
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
,(if (string-equal key (substring seq 0 1))
|
,(if (string-equal key (substring seq 0 1))
|
||||||
`(progn
|
`(progn
|
||||||
(call-interactively ',(lookup-key (eval map) key))
|
(call-interactively ',(lookup-key evil-normal-state-map key))
|
||||||
(execute-kbd-macro ,(substring seq 1)))
|
(execute-kbd-macro ,(substring seq 1)))
|
||||||
(execute-kbd-macro ,seq))))))
|
(execute-kbd-macro ,seq))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue