Skip to content

Commit ee6f4bd

Browse files
authored
evil-core: refactored evil-get-auxiliary-keymap (#1478)
* evil-core: refactored `evil-get-auxiliary-keymap` In `evil-get-auxilliary-keymap`, there's already a check on `state` when entering the function. Should `state` be `nil`, it won't enter the `let*` form. Hence the binding specification `(aux (if state (lookup-key map key) map))` always reduces to `(aux (lookup-key map key))` This commit removed unnecessary `if` form. * minor changes
1 parent e1b98d4 commit ee6f4bd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

evil-core.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -871,10 +871,9 @@ one already."
871871
(when state
872872
(let* ((key (vconcat (list (intern (format "%s-state" state)))))
873873
(parent-aux (when (and ignore-parent
874-
(keymap-parent map)
875-
state)
874+
(keymap-parent map))
876875
(lookup-key (keymap-parent map) key)))
877-
(aux (if state (lookup-key map key) map)))
876+
(aux (lookup-key map key)))
878877
(cond
879878
((and ignore-parent
880879
(equal parent-aux aux)

0 commit comments

Comments
 (0)