diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2021-03-23 19:40:58 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2021-03-23 19:40:58 +0100 |
| commit | f6394f19f3993831dadd91046090d7a2498facca (patch) | |
| tree | 63201a57780b8e7cad6a9fce7d4489d7a1fce6af /orderless.el | |
| parent | 3440b5aa33c94074b32d0a32032ba192f5f2eea9 (diff) | |
orderless-default-pattern-compiler: Ignore nil components
Diffstat (limited to 'orderless.el')
| -rw-r--r-- | orderless.el | 6 |
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 |
