branch: externals/ivy-hydra
commit fcf5dcfd5796637d64164fd17956c5bc54e25612
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
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)