Variable: evil-local-mode-hook
evil-local-mode-hook is a customizable variable defined in
evil-core.el.
Value
(evil--jumps-install-or-uninstall
evil-local-mode-set-explicitly(var)/evil-local-mode-set-explicitly(fun))
Documentation
Hook run after entering or leaving evil-local-mode(var)/evil-local-mode(fun).
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-core.el
(define-minor-mode evil-local-mode
"Minor mode for setting up Evil in a single buffer."
:init-value nil
(if evil-local-mode
(progn
(cl-pushnew 'evil-mode-map-alist emulation-mode-map-alists)
(evil-initialize-local-keymaps)
(when (minibufferp)
(setq-local evil-default-state 'insert)
(setq-local evil-echo-state nil))
(setq evil-input-method current-input-method)
(evil-initialize-state)
(add-hook 'input-method-activate-hook #'evil-activate-input-method t t)
(add-hook 'input-method-deactivate-hook #'evil-deactivate-input-method t t)
(add-hook 'activate-mark-hook 'evil-visual-activate-hook nil t)
;; FIXME: Add these hooks buffer-locally and remove when disabling
(add-hook 'pre-command-hook 'evil-repeat-pre-hook)
(add-hook 'post-command-hook 'evil-repeat-post-hook))
(evil-refresh-mode-line)
(remove-hook 'activate-mark-hook 'evil-visual-activate-hook t)
(remove-hook 'input-method-activate-hook #'evil-activate-input-method t)
(remove-hook 'input-method-deactivate-hook #'evil-deactivate-input-method t)
(activate-input-method evil-input-method)
(evil-change-state nil)))