[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/capf-autosuggest aa27c87 1/2: Remove unused variable
From: |
ELPA Syncer |
Subject: |
[elpa] externals/capf-autosuggest aa27c87 1/2: Remove unused variable |
Date: |
Fri, 5 Nov 2021 08:57:15 -0400 (EDT) |
branch: externals/capf-autosuggest
commit aa27c87aa3f9636801a86d960b63f62795fed897
Author: jakanakaevangeli <jakanakaevangeli@chiru.no>
Commit: jakanakaevangeli <jakanakaevangeli@chiru.no>
Remove unused variable
---
capf-autosuggest.el | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/capf-autosuggest.el b/capf-autosuggest.el
index 3b22264..f2a65a0 100644
--- a/capf-autosuggest.el
+++ b/capf-autosuggest.el
@@ -150,12 +150,6 @@ It is used instead of the standard
`capf-autosuggest-orig-if-at-eol-capf' which searches the
standard capf functions, if point is at the end of line.")
-(defvar capf-autosuggest-all-completions-only-one nil
- "Non-nil if only the first result of `all-completions' is of interest.
-capf-autosuggest binds this to t around calls to
-`all-completions'. A dynamic completion table can take this as a
-hint to only return a list of one element for optimization.")
-
(defvar-local capf-autosuggest--overlay nil)
(defvar-local capf-autosuggest--str "")
(defvar-local capf-autosuggest--tick nil)
@@ -223,14 +217,11 @@ Otherwise, return nil."
;; See `completion-emacs21-all-completions'
(base (car (completion-boundaries string table pred ""))))
(when-let*
- ((completions
- (let ((capf-autosuggest-all-completions-only-one t))
- ;; Use `all-completions' rather than
- ;; `completion-all-completions' to bypass completion styles
- ;; and strictly match only on prefix. This makes sense here
- ;; as we only use the string without the prefix for the
- ;; overlay.
- (all-completions string table pred)))
+ ;; Use `all-completions' rather than `completion-all-completions'
+ ;; to bypass completion styles and strictly match only on prefix.
+ ;; This makes sense here as we only use the string without the
+ ;; prefix for the overlay.
+ ((completions (all-completions string table pred))
;; `all-completions' may return strings that don't strictly
;; match on our prefix. Ignore them.
((string-prefix-p (substring string base) (car completions)))