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

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

[nongnu] elpa/anzu 61cb32aa61 278/288: reapply #93 by hand


From: ELPA Syncer
Subject: [nongnu] elpa/anzu 61cb32aa61 278/288: reapply #93 by hand
Date: Thu, 6 Jan 2022 03:59:00 -0500 (EST)

branch: elpa/anzu
commit 61cb32aa61f9bd088c519ea3cc96b81e241efed7
Author: Neil Okamoto <neil.okamoto@gmail.com>
Commit: Neil Okamoto <neil.okamoto@gmail.com>

    reapply #93 by hand
    
    doing by hand to ensure all the changes apply properly
---
 anzu.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/anzu.el b/anzu.el
index 72fe2841cb..1a0663a0f3 100644
--- a/anzu.el
+++ b/anzu.el
@@ -163,10 +163,10 @@
 (defsubst anzu--construct-position-info (count overflow positions)
   (list :count count :overflow overflow :positions positions))
 
-(defsubst anzu--case-fold-search (input)
-  (when isearch-case-fold-search
-    (let ((case-fold-search nil))
-      (not (string-match-p "[A-Z]" input)))))
+(defsubst anzu--case-fold-search ()
+  (if isearch-mode
+      isearch-case-fold-search
+    case-fold-search))
 
 (defsubst anzu--word-search-p ()
   (and (not (memq anzu--last-command anzu-regexp-search-commands))
@@ -206,7 +206,7 @@
                                  (with-no-warnings
                                    (migemo-forward word bound noerror count)))
                              #'re-search-forward))
-              (case-fold-search (anzu--case-fold-search input)))
+              (case-fold-search (anzu--case-fold-search)))
           (while (and (not finish) (funcall search-func input nil t))
             (push (cons (match-beginning 0) (match-end 0)) positions)
             (cl-incf count)
@@ -398,7 +398,7 @@
                 (step (if backward -1 1))
                 (case-fold-search (if case-sensitive
                                       nil
-                                    (anzu--case-fold-search str))))
+                                    (anzu--case-fold-search))))
             (while (and (not finish) (funcall search-func str replace-end t))
               (cl-incf count)
               (let ((beg (match-beginning 0))
@@ -585,7 +585,7 @@
     (unless (string= content anzu--last-replace-input)
       (setq anzu--last-replace-input content)
       (with-current-buffer buf
-        (let ((case-fold-search (anzu--case-fold-search from)))
+        (let ((case-fold-search (anzu--case-fold-search)))
           (dolist (ov (anzu--overlays-in-range beg (min end overlay-limit)))
             (let ((replace-evaled
                    (if (not use-regexp)



reply via email to

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