(defmacro ek/bind-evil-keys-map (state keymap key-fn-list)
(let* ((key-fns (symbol-value key-fn-list))
(body (mapcar
(lambda (pair)
`(evil-define-key ,state ,keymap (kbd ,(car pair)) ,(cdr pair)))
key-fns)))
`(progn ,@body))
)
(defvar motion-keys
'(
("C-o" . 'ek/xref-go-back)
("<C-i>" . 'ek/xref-go-forward)
))
(ek/bind-evil-keys-map '(normal motion) 'global motion-keys)
Here I'm using symbol-value
,
I read macro doesn't evaluate arguments (but function does) so, I tried (eval key-fn-list)
.
But it seems it is not same as (symbol-value key-fn-list)
.
So what is the difference?