[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless 674a1c75d5 07/11: Support rx sepxs as return
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless 674a1c75d5 07/11: Support rx sepxs as return values of matching style functions |
Date: |
Thu, 15 Feb 2024 15:58:54 -0500 (EST) |
branch: externals/orderless
commit 674a1c75d5861b36de29b2fa1957146a3ee34163
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Support rx sepxs as return values of matching style functions
---
orderless.el | 40 +++++++++++++++++++---------------------
1 file changed, 19 insertions(+), 21 deletions(-)
diff --git a/orderless.el b/orderless.el
index 45bd5c81de..97a9cd5073 100644
--- a/orderless.el
+++ b/orderless.el
@@ -226,22 +226,20 @@ If BEFORE is specified, add it to the beginning of the rx
sequence. If AFTER is specified, add it to the end of the rx
sequence."
(declare (indent 1))
- (rx-to-string
- `(seq
- ,(or before "")
- ,@(cl-loop for (sexp . more) on rxs
- collect `(group ,sexp)
- when more collect sep)
- ,(or after ""))))
+ `(seq
+ ,(or before "")
+ ,@(cl-loop for (sexp . more) on rxs
+ collect `(group ,sexp)
+ when more collect sep)
+ ,(or after "")))
(defun orderless-flex (component)
"Match a component in flex style.
This means the characters in COMPONENT must occur in the
candidate in that order, but not necessarily consecutively."
- (rx-to-string
- `(seq
- ,@(cdr (cl-loop for char across component
- append `((zero-or-more (not ,char)) (group ,char)))))))
+ `(seq
+ ,@(cdr (cl-loop for char across component
+ append `((zero-or-more (not ,char)) (group ,char))))))
(defun orderless-initialism (component)
"Match a component as an initialism.
@@ -261,15 +259,14 @@ at a word boundary in the candidate. This is similar to
the
(defun orderless-without-literal (component)
"Match strings that do *not* contain COMPONENT as a literal match."
- (rx-to-string
- `(seq
- (group string-start) ; highlight nothing!
- (zero-or-more
- (or ,@(cl-loop for i below (length component)
- collect `(seq ,(substring component 0 i)
- (or (not (any ,(aref component i)))
- string-end)))))
- string-end)))
+ `(seq
+ (group string-start) ; highlight nothing!
+ (zero-or-more
+ (or ,@(cl-loop for i below (length component)
+ collect `(seq ,(substring component 0 i)
+ (or (not (any ,(aref component i)))
+ string-end)))))
+ string-end))
;;; Highlighting matches
@@ -384,7 +381,8 @@ as the value of DISPATCHERS."
when (functionp newstyles) do (setq newstyles (list newstyles))
for regexps = (cl-loop for style in newstyles
for result = (funcall style newcomp)
- when result collect `(regexp ,result))
+ when result collect
+ (if (stringp result) `(regexp ,result) result))
when regexps collect (rx-to-string `(or ,@(delete-dups regexps)))))
;;; Completion style implementation
- [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, 2024/02/15
- [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 <=
- [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