summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2021-03-23 19:40:58 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2021-03-23 19:40:58 +0100
commitf6394f19f3993831dadd91046090d7a2498facca (patch)
tree63201a57780b8e7cad6a9fce7d4489d7a1fce6af
parent3440b5aa33c94074b32d0a32032ba192f5f2eea9 (diff)
orderless-default-pattern-compiler: Ignore nil components
-rw-r--r--orderless.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/orderless.el b/orderless.el
index 37c4278..921fa09 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