branch: externals/embark commit 8fec816e490e3e3862f66e2915459a710a3c1775 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Move post-action-wo-restart out of lambda --- embark.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/embark.el b/embark.el index ac8f9a7..05f8ae3 100644 --- a/embark.el +++ b/embark.el @@ -2004,6 +2004,8 @@ ARG is the prefix argument." (or (cl-mapcar (lambda (cand orig-cand) (list :type type :orig-type orig-type + ;; TODO The file special casing here seems odd. + ;; Why do we need this? :target (if (eq type 'file) (expand-file-name cand dir) cand) :orig-target orig-cand)) (plist-get transformed :candidates) @@ -2016,11 +2018,12 @@ ARG is the prefix argument." indicators (embark--action-keymap type nil) (list (list :type type :multi (length candidates)))) (user-error "Canceled"))) + (post-action-wo-restart + (mapcar (lambda (x) (remq 'embark--restart x)) + embark-post-action-hooks)) (act (lambda (candidate) (let ((embark-allow-edit-actions nil) - (embark-post-action-hooks - (mapcar (lambda (x) (remq 'embark--restart x)) - embark-post-action-hooks))) + (embark-post-action-hooks post-action-wo-restart)) (embark--act action candidate))))) (when (and (eq action (embark--default-action type)) (eq action embark--command))