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

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

[elpa] master 7edfbc9 14/22: ivy.el (ivy--exhibit): Wrap in `while-no-in


From: Oleh Krehel
Subject: [elpa] master 7edfbc9 14/22: ivy.el (ivy--exhibit): Wrap in `while-no-input'
Date: Wed, 22 Apr 2015 19:51:50 +0000

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

    ivy.el (ivy--exhibit): Wrap in `while-no-input'
    
    * ivy.el (ivy--exhibit): `ivy--dynamic-function' will sometimes use
      `call-process'. Adding `while-no-input' speeds up things a lot, at the
      cost of a small message interrupting the minibuffer when
      `call-process' takes too long or the user types too fast.
      This message is not an issue for emacs-snapshot.
---
 ivy.el |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/ivy.el b/ivy.el
index 66b3f3a..5f52262 100644
--- a/ivy.el
+++ b/ivy.el
@@ -687,13 +687,14 @@ Should be run via minibuffer `post-command-hook'."
   (if ivy--dynamic-function
       ;; while-no-input would cause annoying
       ;; "Waiting for process to die...done" message interruptions
-      (progn
-        (unless (equal ivy--old-text ivy-text)
-          (let ((store ivy--dynamic-function)
-                (ivy--dynamic-function nil))
-            (setq ivy--all-candidates (funcall store ivy-text)))
-          (setq ivy--old-text ivy-text))
-        (ivy--insert-minibuffer (ivy--format ivy--all-candidates)))
+      (let ((inhibit-message t))
+       (while-no-input
+         (unless (equal ivy--old-text ivy-text)
+           (let ((store ivy--dynamic-function)
+                 (ivy--dynamic-function nil))
+             (setq ivy--all-candidates (funcall store ivy-text)))
+           (setq ivy--old-text ivy-text))
+         (ivy--insert-minibuffer (ivy--format ivy--all-candidates))))
     (when ivy--directory
       (if (string-match "/$" ivy-text)
           (if (member ivy-text ivy--all-candidates)



reply via email to

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