Function: evil-make-overriding-map
evil-make-overriding-map is a byte-compiled function defined in
evil-core.el.
Signature
(evil-make-overriding-map KEYMAP &optional STATE COPY)
Documentation
Give KEYMAP precedence over the global keymap of STATE.
The keymap will have lower precedence than custom STATE bindings.
If STATE is nil, give it precedence over all states.
If COPY is t, create a copy of KEYMAP and give that
higher precedence. See also evil-make-intercept-map.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-core.el
(defun evil-make-overriding-map (keymap &optional state copy)
"Give KEYMAP precedence over the global keymap of STATE.
The keymap will have lower precedence than custom STATE bindings.
If STATE is nil, give it precedence over all states.
If COPY is t, create a copy of KEYMAP and give that
higher precedence. See also `evil-make-intercept-map'."
(let ((key [override-state]))
(if (not copy)
(define-key keymap key (or state 'all))
(unless (keymapp copy)
(setq copy (assq-delete-all 'menu-bar (copy-keymap keymap))))
(define-key copy key (or state 'all))
(define-key keymap key copy))))