summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Antolín <omar.antolin@gmail.com>2021-03-23 17:41:13 -0600
committerOmar Antolín <omar.antolin@gmail.com>2021-03-23 17:41:13 -0600
commit44935d8962be5724d8a3a4358ce0a4222450ee26 (patch)
tree0fa8a4b0f16cbe0c35a97e2041894aa7ce966bd2
parentd6eb575714f2d86ec7b0d5c42f9acb23ac439a02 (diff)
Fix bug when all matching styles return nil
-rw-r--r--orderless.el14
1 files changed, 5 insertions, 9 deletions
diff --git a/orderless.el b/orderless.el
index 921fa09..ce34d49 100644
--- a/orderless.el
+++ b/orderless.el
@@ -391,15 +391,11 @@ compilers."
for component in components and index from 0
for (newstyles . newcomp) = (orderless-dispatch
dispatchers styles component index total)
- collect
- (if (functionp newstyles)
- (funcall newstyles newcomp)
- (rx-to-string
- `(or
- ,@(cl-loop for style in newstyles
- for result = (funcall style newcomp)
- if result
- collect `(regexp ,result)))))))
+ when (functionp newstyles) do (setq newstyles (list newstyles))
+ for regexps = (cl-loop for style in newstyles
+ for result = (funcall style newcomp)
+ when result collect `(regexp ,result))
+ when regexps collect (rx-to-string `(or ,@regexps))))
;;; Completion style implementation