Function: evil-change-state

evil-change-state is a byte-compiled function defined in evil-core.el.

Signature

(evil-change-state STATE &optional MESSAGE)

Documentation

Change the state to STATE.

If STATE is nil, disable all states.

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-core.el
(defun evil-change-state (state &optional message)
  "Change the state to STATE.
If STATE is nil, disable all states."
  (let ((func (evil-state-property (or state evil-state) :toggle)))
    (when (and (functionp func)
               (or message (not (eq state evil-state))))
      (funcall func (if state (and message 1) -1)))))