branch: externals/hotfuzz
commit 2a9d24c6615a166b1191204aad1d3ca55a43ae9b
Author: Axel Forsman <[email protected]>
Commit: Axel Forsman <[email protected]>
Fix void-variable hotfuzz--filtering-p
The variable hotfuzz--filtering-p was set only in the case of
completion-all-completions and not completion-try-completion. (In the
latter case its actual value does not matter as
display-/cycle-sort-function are inapplicable.) This commit ensures
the variable is always initialized.
Fixes #21
---
hotfuzz.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hotfuzz.el b/hotfuzz.el
index c4933e2a0d..fd0a8097e8 100644
--- a/hotfuzz.el
+++ b/hotfuzz.el
@@ -43,7 +43,7 @@ Large values will decrease performance."
(defvar hotfuzz--d (make-vector hotfuzz--max-needle-len 0))
(defvar hotfuzz--bonus (make-vector hotfuzz--max-haystack-len 0))
-(defvar hotfuzz--filtering-p)
+(defvar hotfuzz--filtering-p nil)
(defconst hotfuzz--bonus-lut
(eval-when-compile
@@ -143,7 +143,7 @@ will lead to inaccuracies."
(concat "[^" s "]*" (regexp-quote s))))
needle "")))
(cons (concat "\\`" re) completion-regexp-list))))
- (all (if (and (string= prefix "") (or (stringp (car-safe table))
(null table))
+ (all (if (and (string= prefix "") (stringp (car-safe table))
(not (or pred completion-regexp-list (string= needle
""))))
table (all-completions prefix table pred))))
;; `completion-pcm--all-completions' tests completion-regexp-list