branch: externals/orderless
commit 3f76b7d1a198627c4f69c378b504afbda03145e8
Author: Omar Antolín <[email protected]>
Commit: Omar Antolín <[email protected]>

    Delete duplicate regexps (fix #73)
    
    In the common case where people search for a string with no special
    regexp characters and are using both the orderless-regexp and
    orderless-literal matching styles, a regexp containing blah\|blah was
    produced. This takes care of that case.
---
 orderless.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/orderless.el b/orderless.el
index 2981a2ed81..b3b7688419 100644
--- a/orderless.el
+++ b/orderless.el
@@ -376,7 +376,7 @@ as the value of DISPATCHERS."
    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))))
+   when regexps collect (rx-to-string `(or ,@(delete-dups regexps)))))
 
 ;;; Completion style implementation
 

Reply via email to