Function: evil-repeat-pre-hook
evil-repeat-pre-hook is a byte-compiled function defined in
evil-repeat.el.
Signature
(evil-repeat-pre-hook)
Documentation
Prepare the current command for recording the repeation.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-repeat.el
;; called from `pre-command-hook'
(defun evil-repeat-pre-hook ()
"Prepare the current command for recording the repeation."
(when evil-local-mode
(let ((repeat-type (evil--repeat-type this-command)))
(cond
;; abort the repeat
((evil-repeat-force-abort-p repeat-type)
;; We mark the current record as being aborted, because there
;; may be further pre-hooks following before the post-hook is
;; called.
(evil-repeat-abort))
;; ignore those commands completely
((or (null repeat-type)
(evil-mouse-events-p (this-command-keys-vector))))
;; record command
(t
;; In normal-state or visual state, each command is a single
;; repeation, therefore start a new repeation.
(when (or (evil-normal-state-p)
(evil-visual-state-p))
(evil-repeat-start))
(setq evil-recording-current-command t)
(funcall repeat-type 'pre))))))