[Top][All Lists]

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

[elpa] master ea6525e 18/63: ivy.el (ivy-read): Improve ivy-set-actions

From: Oleh Krehel
Subject: [elpa] master ea6525e 18/63: ivy.el (ivy-read): Improve ivy-set-actions interaction
Date: Fri, 21 Aug 2015 12:08:34 +0000

branch: master
commit ea6525e6bdddb6c4c7d175613aa1d6536afd0a1b
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy-read): Improve ivy-set-actions interaction
    * ivy.el (ivy-read): When the base action is already a list, merge it
      with the one obtained from `ivy-set-actions'.
 ivy.el |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ivy.el b/ivy.el
index 876204f..58b2529 100644
--- a/ivy.el
+++ b/ivy.el
@@ -800,9 +800,11 @@ candidates with each input."
   (let ((extra-actions (plist-get ivy--actions-list this-command)))
     (when extra-actions
       (setq action
-            `(1
-              ("default" ,action)
-              ,@extra-actions))))
+            (if (functionp action)
+                `(1
+                  ("default" ,action)
+                  ,@extra-actions)
+              (delete-dups (append action extra-actions))))))
   (setq ivy-last
          :prompt prompt

reply via email to

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