summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--orderless.el23
1 files changed, 12 insertions, 11 deletions
diff --git a/orderless.el b/orderless.el
index bcc0d4c..0d99e35 100644
--- a/orderless.el
+++ b/orderless.el
@@ -425,17 +425,18 @@ This function is part of the `orderless' completion style."
;; Abuse all-completions/orderless-filter as a fast search loop.
;; Should be almost allocation-free since our "predicate" is not
;; called more than two times.
- (orderless-filter string table
- ;; key/value for hash tables
- (lambda (&rest args)
- (when (or (not pred) (apply pred args))
- (setq args (car args) ;; first argument is key
- args (if (consp args) (car args) args) ;; alist
- args (if (symbolp args) (symbol-name args) args))
- (when (and one (not (equal one args)))
- (throw 'orderless--many (cons string point)))
- (setq one args)
- t)))
+ (orderless-filter
+ string table
+ ;; key/value for hash tables
+ (lambda (&rest args)
+ (when (or (not pred) (apply pred args))
+ (setq args (car args) ;; first argument is key
+ args (if (consp args) (car args) args) ;; alist
+ args (if (symbolp args) (symbol-name args) args))
+ (when (and one (not (equal one args)))
+ (throw 'orderless--many (cons string point)))
+ (setq one args)
+ t)))
(when one
(if (equal string one)
t ;; unique exact match