Function: evil-initial-state-for-buffer
evil-initial-state-for-buffer is a byte-compiled function defined in
evil-core.el.
Signature
(evil-initial-state-for-buffer &optional BUFFER)
Documentation
Return the initial Evil state to use for BUFFER.
BUFFER defaults to the current buffer. See also evil-initial-state.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-core.el
(defun evil-initial-state-for-buffer (&optional buffer)
"Return the initial Evil state to use for BUFFER.
BUFFER defaults to the current buffer. See also `evil-initial-state'."
(with-current-buffer (or buffer (current-buffer))
(or (evil-initial-state-for-buffer-name)
(cl-loop for (mode) in minor-mode-map-alist
when (and (boundp mode) (symbol-value mode))
thereis (evil-initial-state mode))
(evil-initial-state major-mode nil t)
evil-default-state)))