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

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

[elpa] master 7cea819 18/67: ivy.el: Add `ivy-exit'


From: Oleh Krehel
Subject: [elpa] master 7cea819 18/67: ivy.el: Add `ivy-exit'
Date: Sun, 22 Mar 2015 17:33:54 +0000

branch: master
commit 7cea8194940e49680bb1cc7c690c7412632234bd
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el: Add `ivy-exit'
    
    * ivy.el (ivy-done): Update.
    (ivy-read): Update.
    (ivy-exit): New defvar.
---
 ivy.el |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ivy.el b/ivy.el
index e4c7fe0..b922df5 100644
--- a/ivy.el
+++ b/ivy.el
@@ -72,6 +72,7 @@
   (interactive)
   (delete-minibuffer-contents)
   (insert ivy--current)
+  (setq ivy-exit 'done)
   (exit-minibuffer))
 
 (defun ivy-next-line ()
@@ -117,6 +118,7 @@ UPDATE-FN is called each time the current candidate(s) is 
changed."
   (setq ivy-text "")
   (setq ivy--all-candidates collection)
   (setq ivy--update-fn update-fn)
+  (setq ivy-exit nil)
   (unwind-protect
        (minibuffer-with-setup-hook
            #'ivy--minibuffer-setup
@@ -126,6 +128,10 @@ UPDATE-FN is called each time the current candidate(s) is 
changed."
 (defvar ivy-text ""
   "Stores the user's string as it is typed in.")
 
+(defvar ivy-exit nil
+  "Store 'done if the completion was successfully selected.
+Otherwise, store nil.")
+
 ;;* Implementation
 ;;** Regex
 (defvar ivy--subexps 0



reply via email to

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