branch: scratch/evil commit be5584efb1b1af7729627c30d8449893ea04f494 Author: Stefan Monnier <monn...@iro.umontreal.ca> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
Misc minor changes * evil-command-window.el (evil-command-window-draw-prefix): Mark `ignored` as, well, ignored. * README.md: Mention that `undo-fu` is also in NonGNU ELPA. * evil-core (evil-get-auxiliary-keymap): Simplify `vconcat` to `vector`. (evil-auxiliary-keymap-p): Unhide arg by moving it to its own line. * evil-macros.el (evil-define-interactive-code): Move shared `setq func` out of `cond`. Move the insertion of quote around `func` to the `cond` so the `quote` is not incorrectly added around lambda forms. --- README.md | 2 +- evil-command-window.el | 2 +- evil-core.el | 5 +++-- evil-macros.el | 18 +++++++++--------- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 198b18317c..6473ba66f2 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ file. * The [undo-tree](https://gitlab.com/tsc25/undo-tree) package (available via GNU ELPA) * The [undo-fu](https://gitlab.com/ideasman42/emacs-undo-fu) package - (available via MELPA) + (available via MELPA and NonGNU ELPA) * For the motions `g;` `g,` and for the last-change-register `.`, Evil requires the [goto-chg.el](https://github.com/emacs-evil/goto-chg) diff --git a/evil-command-window.el b/evil-command-window.el index 21299a2dc0..566ee3a79e 100644 --- a/evil-command-window.el +++ b/evil-command-window.el @@ -164,7 +164,7 @@ function to execute." (push result evil-search-backward-history))) (evil-search result forward evil-regexp-search)))) -(defun evil-command-window-draw-prefix (&rest ignored) +(defun evil-command-window-draw-prefix (&rest _ignored) "Display `evil-command-window-cmd-key' as a prefix to the current line. Parameters passed in through IGNORED are ignored." (let ((prefix (propertize evil-command-window-cmd-key diff --git a/evil-core.el b/evil-core.el index 4e50b1878f..ddab7de5c4 100644 --- a/evil-core.el +++ b/evil-core.el @@ -845,7 +845,7 @@ IGNORE-PARENT are non-nil then a new auxiliary keymap is created even if the parent of MAP has one already." (when state - (let* ((key (vconcat (list (intern (format "%s-state" state))))) + (let* ((key (vector (intern (format "%s-state" state)))) (parent-aux (when (and ignore-parent (keymap-parent map)) (lookup-key (keymap-parent map) key))) @@ -884,7 +884,8 @@ does not already exist." "Whether MAP is an auxiliary keymap." (and (keymapp map) (string-match-p "Auxiliary keymap" - (or (keymap-prompt map) "")) t)) + (or (keymap-prompt map) "")) + t)) (defun evil-minor-mode-keymap-p (map) "Whether MAP is a minor-mode keymap." diff --git a/evil-macros.el b/evil-macros.el index a164fe6981..458a2119e2 100644 --- a/evil-macros.el +++ b/evil-macros.el @@ -763,19 +763,19 @@ via KEY-VALUE pairs. BODY should evaluate to a list of values. (while (keywordp (car-safe body)) (setq properties (append properties (list (pop body) (pop body))))) - (cond - (args - (setq func `(lambda ,args + (setq func (cond + (args + `(lambda ,args ,@(when doc `(,doc)) - ,@body))) - ((> (length body) 1) - (setq func `(progn ,@body))) - (t - (setq func (car body)))) + ,@body)) + ((> (length body) 1) + `'(progn ,@body)) + (t + `',(car body)))) `(eval-and-compile (let* ((code ,code) (entry (assoc code evil-interactive-alist)) - (value (cons ',func ',properties))) + (value (cons ,func ',properties))) (if entry (setcdr entry value) (push (cons code value) evil-interactive-alist))