branch: externals/capf-autosuggest
commit eb8bd98731ccc2ddf230e6b7e4b55b1c0acb47d7
Author: jakanakaevangeli <[email protected]>
Commit: jakanakaevangeli <[email protected]>
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))