Some styling issues in key-bindings.el have been fixed
This commit is contained in:
parent
63f978dfe6
commit
0c82c80c18
|
@ -42,20 +42,20 @@
|
||||||
(insert-key (plist-get state-keys :insert))
|
(insert-key (plist-get state-keys :insert))
|
||||||
(emacs-key (plist-get state-keys :emacs)))
|
(emacs-key (plist-get state-keys :emacs)))
|
||||||
(cond
|
(cond
|
||||||
((not (null normal-key)) (evil-define-key 'normal map (kbd normal-key) fn))
|
((not (null normal-key)) (evil-define-key 'normal map (kbd normal-key) fn))
|
||||||
((not (null visual-key)) (evil-define-key 'visual map (kbd visual-key) fn))
|
((not (null visual-key)) (evil-define-key 'visual map (kbd visual-key) fn))
|
||||||
((not (null insert-key)) (evil-define-key 'insert map (kbd insert-key) fn))
|
((not (null insert-key)) (evil-define-key 'insert map (kbd insert-key) fn))
|
||||||
((not (null emacs-key)) (evil-define-key 'emacs map (kbd emacs-key) fn)))))
|
((not (null emacs-key)) (evil-define-key 'emacs map (kbd emacs-key) fn)))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defmacro defkey (map fn &rest keys)
|
(defmacro defkey (map fn &rest keys)
|
||||||
"Defines a key binding for FG42 for different types.
|
"Defines a key binding for FG42 for different types.
|
||||||
Defines a keybinding in the given MAP for the given KEYS that maps
|
Defines a keybinding in the given MAP for the given KEYS that maps
|
||||||
to the given FN with the given DOCSTRING.
|
to the given FN with the given DOCSTRING.
|
||||||
Example usage : (defkey `'global-map`' 'counsel-M-x :evil (:normal \"SPC s u\") :god \"C-x C-n\")"
|
Example usage :
|
||||||
|
\\(defkey `'global-map`' 'goto-line
|
||||||
|
:evil \\(:normal \"SPC s u\"\\)
|
||||||
|
:god \"<f2>\"\\)"
|
||||||
|
|
||||||
(let ((god-key (plist-get keys :god))
|
(let ((god-key (plist-get keys :god))
|
||||||
(human-key (plist-get keys :human))
|
(human-key (plist-get keys :human))
|
||||||
|
@ -64,5 +64,6 @@ Example usage : (defkey `'global-map`' 'counsel-M-x :evil (:normal \"SPC s u\")
|
||||||
((is-god?) `(-defkey-god ,map ,god-key ,fn))
|
((is-god?) `(-defkey-god ,map ,god-key ,fn))
|
||||||
((is-human?) `(-defkey-human ,map ,human-key ,fn))
|
((is-human?) `(-defkey-human ,map ,human-key ,fn))
|
||||||
((is-evil?) `(-defkey-evil ,map (quote ,evil-state-key) ,fn)))))
|
((is-evil?) `(-defkey-evil ,map (quote ,evil-state-key) ,fn)))))
|
||||||
|
|
||||||
(provide 'fg42/key-bindings)
|
(provide 'fg42/key-bindings)
|
||||||
;;; key-bindings.el ends here
|
;;; key-bindings.el ends here
|
||||||
|
|
Loading…
Reference in New Issue