From aa27c87aa3f9636801a86d960b63f62795fed897 Mon Sep 17 00:00:00 2001 From: jakanakaevangeli Date: Fri, 5 Nov 2021 09:24:04 +0100 Subject: [PATCH] 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))) -- 2.11.4.GIT