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

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

[elpa] master 1606918 129/399: ivy.el (ivy-read): Allow :update-fn to be


From: Oleh Krehel
Subject: [elpa] master 1606918 129/399: ivy.el (ivy-read): Allow :update-fn to be 'auto
Date: Sat, 20 Jul 2019 14:57:08 -0400 (EDT)

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

    ivy.el (ivy-read): Allow :update-fn to be 'auto
---
 counsel.el | 3 +--
 ivy.el     | 6 +++++-
 swiper.el  | 6 ++----
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/counsel.el b/counsel.el
index 43200db..970da1b 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2817,8 +2817,7 @@ When non-nil, INITIAL-INPUT is the initial search 
pattern."
 
                              :keymap counsel-grep-map
                              :history 'counsel-grep-history
-                             :update-fn (lambda ()
-                                          (counsel-grep-action 
(ivy-state-current ivy-last)))
+                             :update-fn 'auto
                              :re-builder #'ivy--regex
                              :action #'counsel-grep-action
                              :unwind (lambda ()
diff --git a/ivy.el b/ivy.el
index b41a6be..dbfd6e2 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1892,7 +1892,11 @@ customizations apply to the current completion session."
            :history history
            :preselect preselect
            :keymap keymap
-           :update-fn update-fn
+           :update-fn (if (eq update-fn 'auto)
+                          (lambda ()
+                            (funcall (ivy--get-action ivy-last)
+                                     (ivy-state-current ivy-last)))
+                        update-fn)
            :sort sort
            :action action
            :frame (selected-frame)
diff --git a/swiper.el b/swiper.el
index 32ecaf4..4739ac0 100644
--- a/swiper.el
+++ b/swiper.el
@@ -1046,8 +1046,7 @@ See `ivy-format-function' for further information."
     (ivy-read "swiper-all: " 'swiper-all-function
               :action #'swiper-all-action
               :unwind #'swiper--cleanup
-              :update-fn (lambda ()
-                           (swiper-all-action (ivy-state-current ivy-last)))
+              :update-fn 'auto
               :dynamic-collection t
               :keymap swiper-all-map
               :initial-input initial-input
@@ -1157,8 +1156,7 @@ See `ivy-format-function' for further information."
                  "iswiper: " #'swiper-isearch-function
                  :dynamic-collection t
                  :action #'swiper-isearch-action
-                 :update-fn (lambda ()
-                              (swiper-isearch-action (ivy-state-current 
ivy-last)))
+                 :update-fn 'auto
                  :unwind #'swiper--cleanup
                  :history 'swiper-history
                  :caller 'swiper-isearch))



reply via email to

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