emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/embark 66a8f5895d: Fix support for quitting multitarget


From: ELPA Syncer
Subject: [elpa] externals/embark 66a8f5895d: Fix support for quitting multitarget actions (fixes #657)
Date: Mon, 21 Aug 2023 18:57:46 -0400 (EDT)

branch: externals/embark
commit 66a8f5895dea60b128341813bb08495aa0d48ff4
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>

    Fix support for quitting multitarget actions (fixes #657)
    
    This corrects the change made in commit
    9a44418c349e41020cdc5ad1bd21e8c77a429062, which handled the case of
    quitting a multitarget action incorrectly.
---
 embark.el | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/embark.el b/embark.el
index 41f26336c2..1885a70ec3 100644
--- a/embark.el
+++ b/embark.el
@@ -2404,15 +2404,17 @@ ARG is the prefix argument."
                                    (alist-get action 
embark-pre-action-hooks))))
                     (y-or-n-p (format "Run %s on %d %ss? "
                                       action (length candidates) type)))
-            (if quit
-                (embark--quit-and-run #'mapc act candidates)
-              (if (memq action embark-multitarget-actions)
-                  (let ((prefix-arg prefix))
-                    (embark--act action transformed quit))
-                (save-excursion (mapc act candidates)))
-              (when (memq 'embark--restart
-                          (alist-get action embark-post-action-hooks))
-                (embark--restart)))))
+            (if (memq action embark-multitarget-actions)
+                (let ((prefix-arg prefix))
+                  (embark--act action transformed quit))
+              (save-excursion
+                (if quit
+                    (embark--quit-and-run #'mapc act candidates)
+                  (mapc act candidates))))
+            (when (and (not quit)
+                       (memq 'embark--restart
+                             (alist-get action embark-post-action-hooks)))
+              (embark--restart))))
       (dolist (cand candidates)
         (when-let ((bounds (plist-get cand :bounds)))
           (set-marker (car bounds) nil) ; yay, manual memory management!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]