aboutsummaryrefslogtreecommitdiff
path: root/evil-core.el
diff options
context:
space:
mode:
authorAxel Forsman <axelsfor@gmail.com>2023-07-14 22:06:07 +0200
committerAxel Forsman <axelsfor@gmail.com>2023-07-17 19:02:11 +0200
commitf84d3453b312bd8ec0a1c092d075bbc3d91e157b (patch)
tree332c2d802dbda3eef60de8c29e0480e0de1b562e /evil-core.el
parent4b45f2619258374ebb34b07212806e77bc2997c3 (diff)
Read Ex commands from buffer
When lexing a string with string-match and its START argument, there is no way to anchor matches to the START position. Instead, one must either allocate substrings - as done prior to commit 56b43b6f7e014e905f85df1c542c67f46ea99566 - or use looking-at etc., instead. This commit opts for the latter. The Ex completion-at-point functions are also rewritten in order to avoid having to add ex-index text properties to the command string, since evil--ex-syntactic-context could be extended to provide that information just as easily.
Diffstat (limited to 'evil-core.el')
-rw-r--r--evil-core.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/evil-core.el b/evil-core.el
index fabb050..533d94f 100644
--- a/evil-core.el
+++ b/evil-core.el
@@ -848,7 +848,7 @@ does not already exist."
(let ((map (make-sparse-keymap)))
(evil-set-keymap-prompt
map (format "Minor-mode keymap for %s in %s"
- (symbol-name mode)
+ mode
(or (evil-state-property state :name)
(format "%s state" state))))
(if state-entry
@@ -973,7 +973,7 @@ mode, in which case `evil-define-minor-mode-key' is used."
(declare (indent defun))
(cond ((member keymap '('global 'local))
`(evil-define-key* ,state ,keymap ,key ,def ,@bindings))
- ((and (consp keymap) (eq (car keymap) 'quote))
+ ((eq (car-safe keymap) 'quote)
`(evil-define-minor-mode-key ,state ,keymap ,key ,def ,@bindings))
(t
`(evil-delay ',(if (symbolp keymap)