[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] scratch/evil be5584efb1 8/8: Misc minor changes
From: |
Stefan Monnier |
Subject: |
[nongnu] scratch/evil be5584efb1 8/8: Misc minor changes |
Date: |
Sun, 2 Jul 2023 12:34:34 -0400 (EDT) |
branch: scratch/evil
commit be5584efb1b1af7729627c30d8449893ea04f494
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@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))
- [nongnu] branch scratch/evil created (now be5584efb1), Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil d366673c77 3/8: Prefer #' to quote function names, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil 141f483adb 1/8: evil-pkg.el: Remove file, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil 79ef3ad9f5 4/8: (evil-with-delay): New macro, extracted from `evil-delay`, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil d7999e33f3 5/8: Use lexical-binding everywhere, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil c0a6878a8f 7/8: Replace uses of `defadvice` with `advice-add`, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil 335ff20ebf 2/8: Better follow conventions for use of ' in docstrings, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil 40a326753a 6/8: Remove redundant `:group` args, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil be5584efb1 8/8: Misc minor changes,
Stefan Monnier <=