emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/anzu 72e86131a2 243/288: Merge pull request #75 from syohe


From: ELPA Syncer
Subject: [nongnu] elpa/anzu 72e86131a2 243/288: Merge pull request #75 from syohex/user-case-fold-search
Date: Thu, 6 Jan 2022 03:58:57 -0500 (EST)

branch: elpa/anzu
commit 72e86131a23b27ff0304727edf4ed1bdce83f299
Merge: 174b940c7e 11544ea75c
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #75 from syohex/user-case-fold-search
    
    Consider user's case-fold-search
---
 anzu.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/anzu.el b/anzu.el
index 73a2e388b0..05c42a815e 100644
--- a/anzu.el
+++ b/anzu.el
@@ -161,8 +161,9 @@
   (list :count count :overflow overflow :positions positions))
 
 (defsubst anzu--case-fold-search (input)
-  (let ((case-fold-search nil))
-    (not (string-match-p "[A-Z]" input))))
+  (when case-fold-search
+    (let ((case-fold-search nil))
+      (not (string-match-p "[A-Z]" input)))))
 
 (defsubst anzu--word-search-p ()
   (and (not (memq anzu--last-command anzu-regexp-search-commands))
@@ -763,7 +764,7 @@
           (setq anzu--state 'replace anzu--current-position 0
                 anzu--replaced-markers (reverse anzu--replaced-markers)
                 clear-overlay t)
-          (let ((case-fold-search (not at-cursor)))
+          (let ((case-fold-search (and case-fold-search (not at-cursor))))
             (if use-regexp
                 (apply #'perform-replace 
(anzu--construct-perform-replace-arguments
                                           from to delimited beg end backward 
query))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]