[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless f6fe5e17e6 01/11: Optimize orderless-try-comp
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless f6fe5e17e6 01/11: Optimize orderless-try-completion predicate calling convention |
Date: |
Thu, 15 Feb 2024 15:58:53 -0500 (EST) |
branch: externals/orderless
commit f6fe5e17e6c9c26801b26d8a1b77642592f42906
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Optimize orderless-try-completion predicate calling convention
Only allocate a rest argument list if the predicate is used on hash table
candidates.
---
orderless.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/orderless.el b/orderless.el
index e914a6b8a1..a55c62804e 100644
--- a/orderless.el
+++ b/orderless.el
@@ -472,15 +472,15 @@ This function is part of the `orderless' completion
style."
;; 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)))
+ (lambda (arg &rest val) ;; val for hash table
+ (when (or (not pred) (if val (funcall pred arg (car val)) (funcall
pred arg)))
+ ;; Normalize predicate argument
+ (setq arg (if (consp arg) (car arg) arg) ;; alist
+ arg (if (symbolp arg) (symbol-name arg) arg)) ;; symbols
+ ;; Check if there is more than a single match (= many).
+ (when (and one (not (equal one arg)))
(throw 'orderless--many (cons string point)))
- (setq one args)
+ (setq one arg)
t)))
(when one
;; Prepend prefix if the candidate does not already have the same
- [elpa] externals/orderless updated (b24748093b -> 61aed3e622), ELPA Syncer, 2024/02/15
- [elpa] externals/orderless e49e86776b 06/11: Revert "orderless-pattern-compiler: Create fewer intermediate data structures", ELPA Syncer, 2024/02/15
- [elpa] externals/orderless 2c952fd161 10/11: Merge pull request #161 from minad/optimize-predicate, ELPA Syncer, 2024/02/15
- [elpa] externals/orderless ebd2b841de 04/11: orderless-pattern-compiler: Create fewer intermediate data structures, ELPA Syncer, 2024/02/15
- [elpa] externals/orderless 61aed3e622 11/11: Document the new rx format for matching styles, ELPA Syncer, 2024/02/15
- [elpa] externals/orderless f6fe5e17e6 01/11: Optimize orderless-try-completion predicate calling convention,
ELPA Syncer <=
- [elpa] externals/orderless 40f75b6bdf 08/11: orderless-literal: Use (literal string) instead of regexp-quote, ELPA Syncer, 2024/02/15
- [elpa] externals/orderless 9e515ee9a3 09/11: Drop support for Emacs 26.1 because rx does not support (literal ...), ELPA Syncer, 2024/02/15
- [elpa] externals/orderless 674a1c75d5 07/11: Support rx sepxs as return values of matching style functions, ELPA Syncer, 2024/02/15
- [elpa] externals/orderless 55978d8578 03/11: Replace orderless--prefix+pattern by orderless--compile, ELPA Syncer, 2024/02/15
- [elpa] externals/orderless d536e44f37 05/11: orderless-try-completion: Use or instead of if, ELPA Syncer, 2024/02/15
- [elpa] externals/orderless 3938b69914 02/11: Extract orderless--filter, ELPA Syncer, 2024/02/15