branch: master
commit 6051225d97bbd258ace7db1a0eba7894a06e7447
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    Call ivy-set-actions with t to affect all commands
    
    * ivy.el (ivy-read): Update.
    
    Example:
    
    (ivy-set-actions
     t
     '(("i" insert "insert")))
    
    Now an "insert" action will be available for all `ivy-read' sessions
    when pressing "M-o".
    
    Fixes #337
---
 ivy.el |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index 244d819..b83c7b4 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1100,7 +1100,8 @@ 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 (plist-get ivy--actions-list this-command)))
+  (let ((extra-actions (append (plist-get ivy--actions-list t)
+                               (plist-get ivy--actions-list this-command))))
     (when extra-actions
       (setq action
             (if (functionp action)

Reply via email to