From f1bd30e9c3a438fe2cc54533c178f72295205757 Mon Sep 17 00:00:00 2001 From: Pengji Zhang Date: Mon, 24 Dec 2018 19:33:12 -0500 Subject: [PATCH] ivy.el (ivy-read): Keep only one action for one key This allows overriding the global actions per command. --- ivy.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ivy.el b/ivy.el index 52683606..c9e77e73 100644 --- a/ivy.el +++ b/ivy.el @@ -1793,10 +1793,11 @@ candidates is updated after each input by calling COLLECTION. CALLER is a symbol to uniquely identify the caller to `ivy-read'. It is used, along with COLLECTION, to determine which customizations apply to the current completion session." - (let ((extra-actions (delete-dups + (let ((extra-actions (cl-delete-duplicates (append (plist-get ivy--actions-list t) (plist-get ivy--actions-list this-command) - (plist-get ivy--actions-list caller))))) + (plist-get ivy--actions-list caller)) + :key #'car :test #'equal))) (when extra-actions (setq action (cond ((functionp action)