branch: externals/orderless
commit f6394f19f3993831dadd91046090d7a2498facca
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
orderless-default-pattern-compiler: Ignore nil components
---
orderless.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/orderless.el b/orderless.el
index 37c4278bfc..921fa0931c 100644
--- a/orderless.el
+++ b/orderless.el
@@ -190,7 +190,7 @@ is determined by the values of `completion-ignore-case',
"Match COMPONENT as a regexp."
(condition-case nil
(progn (string-match-p component "") component)
- (invalid-regexp "\0")))
+ (invalid-regexp nil)))
(defalias 'orderless-literal #'regexp-quote
"Match a component as a literal string.
@@ -397,7 +397,9 @@ compilers."
(rx-to-string
`(or
,@(cl-loop for style in newstyles
- collect `(regexp ,(funcall style newcomp))))))))
+ for result = (funcall style newcomp)
+ if result
+ collect `(regexp ,result)))))))
;;; Completion style implementation