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

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

[elpa] master 6051225 020/272: Call ivy-set-actions with t to affect all


From: Oleh Krehel
Subject: [elpa] master 6051225 020/272: Call ivy-set-actions with t to affect all commands
Date: Mon, 25 Apr 2016 10:13:14 +0000

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

    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

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