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

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

[elpa] externals/capf-autosuggest eb8bd98 52/63: Use while-no-input, ma


From: ELPA Syncer
Subject: [elpa] externals/capf-autosuggest eb8bd98 52/63: Use while-no-input, make slow capfs slightly more bearable
Date: Wed, 27 Oct 2021 14:58:03 -0400 (EDT)

branch: externals/capf-autosuggest
commit eb8bd98731ccc2ddf230e6b7e4b55b1c0acb47d7
Author: jakanakaevangeli <jakanakaevangeli@chiru.no>
Commit: jakanakaevangeli <jakanakaevangeli@chiru.no>

    Use while-no-input, make slow capfs slightly more bearable
---
 capf-autosuggest.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/capf-autosuggest.el b/capf-autosuggest.el
index 151153b..9327ac7 100644
--- a/capf-autosuggest.el
+++ b/capf-autosuggest.el
@@ -179,11 +179,14 @@ Otherwise, return nil."
                    (lambda (start end collection predicate)
                      (throw catch-sym
                             (list start end collection :predicate predicate))))
-                  (buffer-read-only t))
-             (condition-case _
+                  (buffer-read-only t)
+                  (inhibit-quit nil))
+             (condition-case nil
                  (catch catch-sym
-                   (capf-autosuggest-orig-capf 
'capf-autosuggest-capf-functions))
-               (buffer-read-only t)))
+                   (while-no-input
+                     (capf-autosuggest-orig-capf
+                      'capf-autosuggest-capf-functions)))
+               ((buffer-read-only quit) t)))
       (`(,beg ,end ,table . ,plist)
        (let* ((pred (plist-get plist :predicate))
               (string (buffer-substring-no-properties beg end))



reply via email to

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