diff options
| author | Axel Forsman <axel@axelf.se> | 2023-08-13 13:52:45 +0200 |
|---|---|---|
| committer | Axel Forsman <axelsfor@gmail.com> | 2023-08-27 13:07:58 +0200 |
| commit | a8663a22b6f65513d9f1f610ed19941b14161490 (patch) | |
| tree | 63bcaf888fec355c66a603d69c3e8f8683ad4879 /evil-ex.el | |
| parent | 2d8918e827b970623cf1ab5ef073412c33196d04 (diff) | |
Add evil-command-line-map
There was a lot of duplication between evil-ex-completion-map and
evil-ex-search-keymap, which meant that any rebinds had to be done
twice. This commit fixes that by introducing evil-command-line-map as
a common ancestor of the two keymaps.
Also renames evil-ex-map to evil-ex-shortcut-map to avoid confusion,
as its purpose is more niche than evil-ex-completion-map which
functions the same as any other keymap passed to read-from-minibuffer.
Diffstat (limited to 'evil-ex.el')
| -rw-r--r-- | evil-ex.el | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -32,7 +32,7 @@ ;; `evil-ex-define-cmd', which creates a binding from a string ;; to an interactive function. It is also possible to define key ;; sequences which execute a command immediately when entered: -;; such shortcuts go in `evil-ex-map'. +;; such shortcuts go in `evil-ex-shortcut-map'. ;; To provide buffer and filename completion, as well as interactive ;; feedback, Ex defines the concept of an argument handler, specified @@ -415,8 +415,7 @@ actions during Ex state." (defun evil-ex-teardown () "Deinitialize Ex minibuffer. Clean up everything set up by `evil-ex-setup'." - (let ((runner (evil-ex-argument-handler-runner - evil--ex-argument-handler))) + (let ((runner (evil-ex-argument-handler-runner evil--ex-argument-handler))) (when runner (funcall runner 'stop)))) (put 'evil-ex-teardown 'permanent-local-hook t) @@ -431,7 +430,7 @@ hook. If BEG is non-nil (which is the case when called from `after-change-functions'), then an error description is shown in case of incomplete or unknown commands." (when (and beg (eq this-command #'self-insert-command)) - (let ((cmd (lookup-key evil-ex-map (minibuffer-contents-no-properties)))) + (let ((cmd (lookup-key evil-ex-shortcut-map (minibuffer-contents-no-properties)))) (when (commandp cmd) (setq evil--ex-expression `(call-interactively #',cmd)) (exit-minibuffer)))) |
