[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/anzu 177a328830 266/288: Fix issue #93
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/anzu 177a328830 266/288: Fix issue #93 |
Date: |
Thu, 6 Jan 2022 03:58:59 -0500 (EST) |
branch: elpa/anzu
commit 177a3288302f6be7db71d3b2225a43b2cd525dc8
Author: Andrea Greselin <greselin.andrea@gmail.com>
Commit: Andrea Greselin <greselin.andrea@gmail.com>
Fix issue #93
Change ‘anzu--case-fold-search’ and refresh cached result after
invoking ‘isearch-toggle-case-fold’ (‘M-c’).
---
anzu.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/anzu.el b/anzu.el
index d9dfb24233..c2993b1eb5 100644
--- a/anzu.el
+++ b/anzu.el
@@ -164,10 +164,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))
@@ -207,7 +207,7 @@
(ignore-errors
(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)
@@ -236,7 +236,8 @@
(defun anzu--use-result-cache-p (input)
(and (eq (anzu--isearch-regexp-function) (car anzu--last-search-state))
(eq isearch-regexp (cdr anzu--last-search-state))
- (string= input anzu--last-isearch-string)))
+ (string= input anzu--last-isearch-string)
+ (not (eq last-command 'isearch-toggle-case-fold))))
(defun anzu--update (query)
(when (>= (length query) anzu-minimum-input-length)
@@ -395,7 +396,7 @@
(finish nil)
(case-fold-search (if case-sensitive
nil
- (anzu--case-fold-search str))))
+ (anzu--case-fold-search))))
(while (and (not finish) (re-search-forward str replace-end t))
(cl-incf count)
(let ((beg (match-beginning 0))
@@ -580,7 +581,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)
- [nongnu] elpa/anzu 1e5c3ca0b7 231/288: Use #' instead of ' for detecting typo, (continued)
- [nongnu] elpa/anzu 1e5c3ca0b7 231/288: Use #' instead of ' for detecting typo, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 3845ead349 248/288: Untabify, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 4992a0c23c 223/288: Fix typo, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 72e86131a2 243/288: Merge pull request #75 from syohex/user-case-fold-search, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 7b8146c1eb 254/288: Improve alt attribute of images, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 6fded24b36 224/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu f2914907e9 255/288: Update minimum Emacs version, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 13401ab3c6 249/288: Don't search over bound, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu d257c79a7a 258/288: Merge pull request #85 from syohex/add-docstrings, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 0dbefcdd1f 252/288: Enforce use of spaces for indentation, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 177a328830 266/288: Fix issue #93,
ELPA Syncer <=
- [nongnu] elpa/anzu a5a22fd537 280/288: release 0.63, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 9d334a4e37 265/288: replaced string should be compiled at regexp replace, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu ffbe938d60 268/288: perform elisp-lint in circleci, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 7dc4abe0a0 274/288: Merge branch 'master' into fix93, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu e4c2728734 270/288: fix check-declare error by eliminating declare-function, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu ee6a6448df 277/288: Merge pull request #107 from emacsorphanage/revert-104-fix93, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 71a1a88dcd 275/288: Merge pull request #104 from agreselin/fix93, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 2e69955da9 271/288: clean up "make lint" rule in Makefile, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 592f8ee6d0 263/288: Merge pull request #95 from syohex/emacs-27-bug, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 7b8688c84d 282/288: default anzu-search-threshold and anzu-replace-threshold is 1000, ELPA Syncer, 2022/01/06