diff options
| author | Omar Antolín <omar.antolin@gmail.com> | 2020-04-24 14:45:40 -0500 |
|---|---|---|
| committer | Omar Antolín <omar.antolin@gmail.com> | 2020-04-24 14:45:40 -0500 |
| commit | a21ef6d985482625133013a2f5af25aee7673979 (patch) | |
| tree | 2937646f9fdffc3f85372344b2bc4d672d44bd3e | |
| parent | f4fa6a9d56ec7f58b70f0b9949d71e175cf76d30 (diff) | |
If matching-styles is nil, assume regexp matching
| -rw-r--r-- | orderless.el | 15 |
1 files 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. |
