branch: externals/orderless commit c7cb04499d94ee1c17affb29b1cfcd2a45116c97 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Relax the smart-case heuristic; Check the whole pattern By not only checking the compiled regexp, smart case is also toggled when matching on annotations, e.g., &Lv as in #184. --- orderless.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orderless.el b/orderless.el index f521c4ca69..c3e6f6b60a 100644 --- a/orderless.el +++ b/orderless.el @@ -498,7 +498,7 @@ The predicate PRED is used to constrain the entries in TABLE." (prefix (substring string 0 limit)) (pattern (substring string limit)) (`(,fun . ,regexps) (orderless-compile pattern))) - (list prefix regexps (orderless--ignore-case-p regexps) + (list prefix regexps (orderless--ignore-case-p pattern) (orderless--predicate-normalized-and pred fun)))) ;; Thanks to @jakanakaevangeli for writing a version of this function: @@ -519,7 +519,7 @@ then return (cons REGEXP u); else return nil." (defun orderless--ignore-case-p (regexps) "Return non-nil if case should be ignored for REGEXPS." (if orderless-smart-case - (cl-loop for regexp in regexps + (cl-loop for regexp in (ensure-list regexps) always (isearch-no-upper-case-p regexp t)) completion-ignore-case))