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

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

[elpa] externals/orderless a21ef6d985 070/204: If matching-styles is nil


From: ELPA Syncer
Subject: [elpa] externals/orderless a21ef6d985 070/204: If matching-styles is nil, assume regexp matching
Date: Tue, 11 Jan 2022 12:58:18 -0500 (EST)

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

    If matching-styles is nil, assume regexp matching
---
 orderless.el | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/orderless.el b/orderless.el
index d5edd517a4..58810d07b7 100644
--- a/orderless.el
+++ b/orderless.el
@@ -196,12 +196,15 @@ converted to a list of regexps according to the value of
   "Build regexps to match PATTERN.
 Consults `orderless-component-matching-styles' to decide what to
 match."
-  (cl-loop for component in
-           (split-string pattern orderless-component-separator t)
-           collect
-           (rx-to-string
-            `(or ,@(cl-loop for style in orderless-component-matching-styles
-                            collect `(regexp ,(funcall style component)))))))
+  (let ((components (split-string pattern orderless-component-separator t)))
+    (if orderless-component-matching-styles
+        (cl-loop for component in components
+                 collect
+                 (rx-to-string
+                  `(or
+                    ,@(cl-loop for style in orderless-component-matching-styles
+                               collect `(regexp ,(funcall style component))))))
+      components)))
 
 (defun orderless--prefix+pattern (string table pred)
   "Split STRING into prefix and pattern according to TABLE.



reply via email to

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