diff --git a/lib/fg42/key-bindings.el b/lib/fg42/key-bindings.el index 38876b5..d57ec75 100644 --- a/lib/fg42/key-bindings.el +++ b/lib/fg42/key-bindings.el @@ -45,18 +45,17 @@ (when (not (null normal-key)) (evil-define-key 'normal map (kbd normal-key) fn)) (when (not (null visual-key)) (evil-define-key 'visual map (kbd visual-key) fn)) (when (not (null insert-key)) (evil-define-key 'insert map (kbd insert-key) fn)) - (when (not (null emacs-key)) (evil-define-key 'emacs map (kbd emacs-key) fn)) - ) - ) + (when (not (null emacs-key)) (evil-define-key 'emacs map (kbd emacs-key) fn)))) + + (defmacro defkey (map keys fn) "Defines a key binding for FG42 for different types. Defines a keybinding in the given MAP for the given KEYS that maps to the given FN with the given DOCSTRING. +Example usage : (defkey `global-map` (:evil (:normal \"SPC s u\") :god \"C-x C-y\") counsel-M-x)" -KEYS should be a plist in the following format: -\(:god :human :evil