I am trying to replicate emacs standard behavior when it comes to 'q', i.e. when in a buffer where insert mode does not make sense 'q' closes it. So I defined the following function
(defun evil-new-record-macro () (interactive) (cond (buffer-read-only (quit-window)) (t (evil-record-macro ?0)) ))
(evil-record-macro ?0) is a bad idea since it assumes a '0' as an argument and I don't know how to use without a pre-specified register.
The question is the following:
Whats a more correct/better way to approach the letter 'q' behavior, macros when it makes sense and quit when it does not.
BONUS: How I can fix the function so it does not need a register to be pre specified.
assume that I am always in normal state and switching to emacs or motion is not an option. I also use general.el to bind keys.