[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/embark ea10bea 5/7: Extract embark--orig-target
From: |
ELPA Syncer |
Subject: |
[elpa] externals/embark ea10bea 5/7: Extract embark--orig-target |
Date: |
Fri, 10 Dec 2021 04:57:29 -0500 (EST) |
branch: externals/embark
commit ea10beabea119e022de41c3374366b0065a97aa5
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Extract embark--orig-target
---
embark.el | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/embark.el b/embark.el
index 50b84d9..ac8f9a7 100644
--- a/embark.el
+++ b/embark.el
@@ -1851,6 +1851,14 @@ keymap for the given type."
(setq k (mod k (length list)))
(append (seq-drop list k) (seq-take list k)))
+(defun embark--orig-target (target)
+ "Convert TARGET to original target."
+ (plist-put
+ (plist-put
+ (copy-sequence target)
+ :target (plist-get target :orig-target))
+ :type (plist-get target :orig-type)))
+
;;;###autoload
(defun embark-act (&optional arg)
"Prompt the user for an action and perform it.
@@ -1916,11 +1924,7 @@ target."
action
(if (and (eq action default-action)
(eq action embark--command))
- (plist-put
- (plist-put
- (copy-sequence target)
- :target (plist-get target :orig-target))
- :type (plist-get target :orig-type))
+ (embark--orig-target target)
target)
(if embark-quit-after-action (not arg) arg))
(user-error
@@ -2020,9 +2024,7 @@ ARG is the prefix argument."
(embark--act action candidate)))))
(when (and (eq action (embark--default-action type))
(eq action embark--command))
- (dolist (cand candidates)
- (plist-put cand :target (plist-get cand :orig-target))
- (plist-put cand :type (plist-get cand :orig-type))))
+ (setq candidates (mapcar #'embark--orig-target candidates)))
(when (y-or-n-p (format "Run %s on %d %ss? "
action (length candidates) type))
(if (if embark-quit-after-action (not arg) arg)
@@ -2107,11 +2109,7 @@ See `embark-act' for the meaning of the prefix ARG."
(plist-get target :type))))
(embark--act default-action
(if (eq default-action embark--command)
- (plist-put
- (plist-put
- (copy-sequence target)
- :target (plist-get target :orig-target))
- :type (plist-get target :orig-type))
+ (embark--orig-target target)
target)
(if embark-quit-after-action (not arg) arg)))
(user-error "No target found")))
- [elpa] externals/embark updated (91e6db4 -> f9e6749), ELPA Syncer, 2021/12/10
- [elpa] externals/embark 731723a 2/7: embark-act etc: Bail out early with user error, ELPA Syncer, 2021/12/10
- [elpa] externals/embark 8fec816 6/7: Move post-action-wo-restart out of lambda, ELPA Syncer, 2021/12/10
- [elpa] externals/embark ea10bea 5/7: Extract embark--orig-target,
ELPA Syncer <=
- [elpa] externals/embark 570a025 1/7: Change elp-instrument-function binding to m for measure, ELPA Syncer, 2021/12/10
- [elpa] externals/embark 56fdd1d 4/7: embark-keymap-prompter: Handle quit commands, ELPA Syncer, 2021/12/10
- [elpa] externals/embark a5d199f 3/7: embark-indicators: Display Act* when acting on all candidates, ELPA Syncer, 2021/12/10
- [elpa] externals/embark f9e6749 7/7: Merge pull request #419 from minad/improvements, ELPA Syncer, 2021/12/10