[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/capf-autosuggest d4b469d 2/4: Mitigate capf--wrapper pe
From: |
ELPA Syncer |
Subject: |
[elpa] externals/capf-autosuggest d4b469d 2/4: Mitigate capf--wrapper performance issue under some circumstances |
Date: |
Thu, 4 Nov 2021 19:57:17 -0400 (EDT) |
branch: externals/capf-autosuggest
commit d4b469dedac9a878b9d79d65445ddbaae1749174
Author: jakanakaevangeli <jakanakaevangeli@chiru.no>
Commit: jakanakaevangeli <jakanakaevangeli@chiru.no>
Mitigate capf--wrapper performance issue under some circumstances
---
capf-autosuggest.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/capf-autosuggest.el b/capf-autosuggest.el
index c8b5ebd..520408d 100644
--- a/capf-autosuggest.el
+++ b/capf-autosuggest.el
@@ -199,7 +199,16 @@ Otherwise, return nil."
(throw catch-sym
(list start end collection :predicate predicate))))
(buffer-read-only t)
- (inhibit-quit nil))
+ (inhibit-quit nil)
+ ;; With `corfu-mode' enabled, `completion--capf-wrapper' is
+ ;; advised to use completion styles instead of simple prefix
+ ;; completion for non-:exclusive criteria, making it more
+ ;; accurate, but also quite slower. In our case, we are only
+ ;; interested in prefix matching and speed, so we enable only
+ ;; the simple and fast `emacs21' prefix matching completion
+ ;; style.
+ (completion-styles '(emacs21))
+ (completion-category-overrides nil))
(condition-case nil
(catch catch-sym
(while-no-input