From a21ef6d985482625133013a2f5af25aee7673979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20Antol=C3=ADn?= Date: Fri, 24 Apr 2020 14:45:40 -0500 Subject: 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 d5edd51..58810d0 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. -- cgit v1.0