emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/orderless 6b86527b30 6/6: Flex matching: more efficient


From: ELPA Syncer
Subject: [elpa] externals/orderless 6b86527b30 6/6: Flex matching: more efficient regexp, better highlighting
Date: Sat, 17 Sep 2022 20:58:03 -0400 (EDT)

branch: externals/orderless
commit 6b86527b30ef96e047d97e314ac640a410891d1f
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>

    Flex matching: more efficient regexp, better highlighting
    
    Fix #119 using @minad's suggestion.
---
 orderless.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/orderless.el b/orderless.el
index 0d99e35ed7..c6c6450475 100644
--- a/orderless.el
+++ b/orderless.el
@@ -199,8 +199,10 @@ sequence."
   "Match a component in flex style.
 This means the characters in COMPONENT must occur in the
 candidate in that order, but not necessarily consecutively."
-  (orderless--separated-by '(zero-or-more nonl)
-    (cl-loop for char across component collect char)))
+  (rx-to-string
+   `(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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]