branch: externals/orderless
commit 3440b5aa33c94074b32d0a32032ba192f5f2eea9
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
orderless-regexp: Return "null matcher" if regexp is invalid
Is there a better way to ignore components? Allow the component compilers to
return nil and ignore the nils?
---
orderless.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/orderless.el b/orderless.el
index 0ec8205e9a..37c4278bfc 100644
--- a/orderless.el
+++ b/orderless.el
@@ -187,10 +187,10 @@ is determined by the values of `completion-ignore-case',
;;; Matching styles
(defun orderless-regexp (component)
- "Match a component as a regexp."
+ "Match COMPONENT as a regexp."
(condition-case nil
(progn (string-match-p component "") component)
- (invalid-regexp (regexp-quote component))))
+ (invalid-regexp "\0")))
(defalias 'orderless-literal #'regexp-quote
"Match a component as a literal string.