I use evil and I want to execute a function by using Emacs macro system.
Let's say I have the following macro.
(evil-set-register ?f [?i ?f ?o ?o ?b ?a ?r escape])
I can run the macro by using
@f. But this system is not easy to read and maintain.
How to execute an interactive function by using
insert-foobar which inserts string
(defun insert-foobar nil "Insert foobar." (interactive) (call-interactively 'evil-append) (insert "foobar") (evil-normal-state))
(evil-set-register ?f (call-interactively 'insert-foobar)) ;; This does not work (evil-set-register ?f (insert-foobar)) ;; This does not work too