Skip to content

Commit c7cb044

Browse files
committed
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.
1 parent 411051c commit c7cb044

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

orderless.el

+2-2
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ The predicate PRED is used to constrain the entries in TABLE."
498498
(prefix (substring string 0 limit))
499499
(pattern (substring string limit))
500500
(`(,fun . ,regexps) (orderless-compile pattern)))
501-
(list prefix regexps (orderless--ignore-case-p regexps)
501+
(list prefix regexps (orderless--ignore-case-p pattern)
502502
(orderless--predicate-normalized-and pred fun))))
503503

504504
;; Thanks to @jakanakaevangeli for writing a version of this function:
@@ -519,7 +519,7 @@ then return (cons REGEXP u); else return nil."
519519
(defun orderless--ignore-case-p (regexps)
520520
"Return non-nil if case should be ignored for REGEXPS."
521521
(if orderless-smart-case
522-
(cl-loop for regexp in regexps
522+
(cl-loop for regexp in (ensure-list regexps)
523523
always (isearch-no-upper-case-p regexp t))
524524
completion-ignore-case))
525525

0 commit comments

Comments
 (0)