Function: evil-ex-binding

evil-ex-binding is a byte-compiled function defined in evil-ex.el.

Signature

(evil-ex-binding COMMAND &optional NOERROR)

Documentation

Return the final binding of COMMAND.

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-ex.el
(defun evil-ex-binding (command &optional noerror)
  "Return the final binding of COMMAND."
  (let ((binding (if (evil--ex-bang-p command) (substring command 0 -1)
                   command)))
    (while (stringp
            (setq binding (cdr (assoc binding evil-ex-commands)))))
    (unless binding (setq binding (intern-soft command)))
    (if (commandp binding)
        (or (command-remapping binding) binding)
      (unless noerror (user-error "Unknown command: `%s'" command)))))