Function: evil-exit-emacs-state

evil-exit-emacs-state is an interactive and byte-compiled function defined in evil-commands.el.

Signature

(evil-exit-emacs-state &optional BUFFER MESSAGE)

Documentation

Exit Emacs state.

Changes the state to the previous state, or to Normal state if the previous state was Emacs state.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-commands.el
;;; State switching

(evil-define-command evil-exit-emacs-state (&optional buffer message)
  "Exit Emacs state.
Changes the state to the previous state, or to Normal state
if the previous state was Emacs state."
  :keep-visual t
  :suppress-operator t
  (interactive '(nil t))
  (with-current-buffer (or buffer (current-buffer))
    (when (evil-emacs-state-p)
      (evil-change-to-previous-state buffer message)
      (when (evil-emacs-state-p)
        (evil-normal-state (and message 1))))))