[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless e0b2b74d71 5/6: Merge pull request #120 from
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless e0b2b74d71 5/6: Merge pull request #120 from minad/fix-118 |
Date: |
Sat, 17 Sep 2022 20:58:03 -0400 (EDT) |
branch: externals/orderless
commit e0b2b74d71d96c2da74a79bfef6aec197887ce86
Merge: 2e46849f5e c06e66d964
Author: Omar AntolĂn Camarena <omar.antolin@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #120 from minad/fix-118
Improve orderless-try-completion (Fix #118)
---
orderless.el | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/orderless.el b/orderless.el
index d1b47e9749..0d99e35ed7 100644
--- a/orderless.el
+++ b/orderless.el
@@ -423,18 +423,20 @@ This function is part of the `orderless' completion
style."
(catch 'orderless--many
(let (one)
;; Abuse all-completions/orderless-filter as a fast search loop.
- ;; Should be more or less allocation-free since our "predicate"
- ;; always returns nil.
- (orderless-filter string table
- ;; key/value for hash tables
- (lambda (&rest args)
- (when (or (not pred) (apply pred args))
- (when one
- (throw 'orderless--many (cons string point)))
- (setq one (car args) ;; first argument is key
- one (if (consp one) (car one) one) ;; alist
- one (if (symbolp one) (symbol-name one)
one)))
- nil))
+ ;; 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)))
(when one
(if (equal string one)
t ;; unique exact match
- [elpa] externals/orderless updated (8b9af2796f -> 6b86527b30), ELPA Syncer, 2022/09/17
- [elpa] externals/orderless 684c5e493c 1/6: Improve orderless-try-completion (Fix #118), ELPA Syncer, 2022/09/17
- [elpa] externals/orderless b341b825ec 2/6: Update README regarding Prescient (Fix #121), ELPA Syncer, 2022/09/17
- [elpa] externals/orderless 2e46849f5e 3/6: Merge pull request #122 from minad/fix-121, ELPA Syncer, 2022/09/17
- [elpa] externals/orderless e0b2b74d71 5/6: Merge pull request #120 from minad/fix-118,
ELPA Syncer <=
- [elpa] externals/orderless c06e66d964 4/6: Avoid long lines, ELPA Syncer, 2022/09/17
- [elpa] externals/orderless 6b86527b30 6/6: Flex matching: more efficient regexp, better highlighting, ELPA Syncer, 2022/09/17