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

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

[elpa] externals/ivy-hydra fcf5dcf 159/395: ivy.el (ivy--compute-extra-a


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra fcf5dcf 159/395: ivy.el (ivy--compute-extra-actions): Use the provided doc for "o"
Date: Thu, 25 Feb 2021 08:31:53 -0500 (EST)

branch: externals/ivy-hydra
commit fcf5dcfd5796637d64164fd17956c5bc54e25612
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    ivy.el (ivy--compute-extra-actions): Use the provided doc for "o"
    
    Re #2468
---
 ivy.el | 30 ++++++++++++++----------------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/ivy.el b/ivy.el
index 9b2fd69..bf8f8e2 100644
--- a/ivy.el
+++ b/ivy.el
@@ -327,22 +327,20 @@ ACTIONS that have the same key."
                                  (plist-get ivy--actions-list caller))
                          :key #'car :test #'equal))
          (override-default (assoc "o" extra-actions)))
-    (when override-default
-      (setq action (cadr override-default))
-      (setq extra-actions
-            (assoc-delete-all "o" extra-actions)))
-    (if extra-actions
-        (cond ((functionp action)
-               `(1
-                 ("o" ,action "default")
-                 ,@extra-actions))
-              ((null action)
-               `(1
-                 ("o" identity "default")
-                 ,@extra-actions))
-              (t
-               (delete-dups (append action extra-actions))))
-      action)))
+    (cond (override-default
+           (cons 1 (cons override-default (assoc-delete-all "o" 
extra-actions))))
+          ((not extra-actions)
+           action)
+          ((functionp action)
+           `(1
+             ("o" ,action "default")
+             ,@extra-actions))
+          ((null action)
+           `(1
+             ("o" identity "default")
+             ,@extra-actions))
+          (t
+           (delete-dups (append action extra-actions))))))
 
 (defvar ivy--prompts-list nil)
 



reply via email to

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