aboutsummaryrefslogtreecommitdiff
path: root/evil-ex.el
diff options
context:
space:
mode:
authorAxel Forsman <axelsfor@gmail.com>2023-07-01 15:17:20 +0200
committerAxel Forsman <axelsfor@gmail.com>2023-07-02 11:18:10 +0200
commitd2770cac1e3b3c59172adc7dc6f575a0e871310f (patch)
tree3950713eb9e757e35b72cdb82840377c2149028b /evil-ex.el
parent4d0088dc669be6e06cf25340f8935db5eaca2a81 (diff)
Store command properties as symbol property
Also replace a few calls to evil-filter-list that destructively modified user-provided lists with cl-remove-if.
Diffstat (limited to 'evil-ex.el')
-rw-r--r--evil-ex.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/evil-ex.el b/evil-ex.el
index d1e3f42..8157bd2 100644
--- a/evil-ex.el
+++ b/evil-ex.el
@@ -659,9 +659,10 @@ in case of incomplete or unknown commands."
(if (string-match "^[^][]*\\(\\[\\(.*\\)\\]\\)[^][]*$" cmd)
(let ((abbrev (replace-match "" nil t cmd 1))
(full (replace-match "\\2" nil nil cmd 1)))
- (evil--add-to-alist 'evil-ex-commands full function)
- (evil--add-to-alist 'evil-ex-commands abbrev full))
- (evil--add-to-alist 'evil-ex-commands cmd function)))
+ (evil--add-to-alist evil-ex-commands
+ full function
+ abbrev full))
+ (evil--add-to-alist evil-ex-commands cmd function)))
(defun evil-ex-make-argument-handler (runner completer)
(list runner completer))
@@ -720,10 +721,8 @@ keywords and function:
((eq key :completion-at-point)
(setq completer (cons 'completion-at-point func))))))
`(eval-and-compile
- (evil--add-to-alist
- 'evil-ex-argument-types
- ',arg-type
- '(,runner ,completer)))))
+ (evil--add-to-alist evil-ex-argument-types
+ ',arg-type '(,runner ,completer)))))
(evil-ex-define-argument-type file
"Handle a file argument."