branch: externals/orderless
commit 6b86527b30ef96e047d97e314ac640a410891d1f
Author: Omar Antolín <[email protected]>
Commit: Omar Antolín <[email protected]>
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.