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

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

[nongnu] elpa/iedit 232cd0e5ec 146/301: tweak to use isearch case sensit


From: ELPA Syncer
Subject: [nongnu] elpa/iedit 232cd0e5ec 146/301: tweak to use isearch case sensitivity
Date: Mon, 10 Jan 2022 22:58:58 -0500 (EST)

branch: elpa/iedit
commit 232cd0e5ec96c65db7702ee13adc7d5346363449
Author: mbneedham <mbneedham@gmail.com>
Commit: mbneedham <mbneedham@gmail.com>

    tweak to use isearch case sensitivity
    
    have iedit-mode use the same case sensitivity as isearch if we enter the 
mode from a search.
    also a partial bugfix for when the search has no results
---
 iedit.el | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/iedit.el b/iedit.el
index d17fa4a55d..4f4e2f3b84 100644
--- a/iedit.el
+++ b/iedit.el
@@ -356,15 +356,18 @@ Keymap used within overlays:
   (if (or isearch-regexp isearch-word)
       nil
     (setq iedit-initial-string-local isearch-string))
-  (isearch-exit)
-  (setq mark-active nil)
-  (run-hooks 'deactivate-mark-hook)
-  (iedit-start regexp (point-min) (point-max))
-  ;; TODO: reconsider how to avoid the loop in iedit-same-length
-  (if (iedit-same-length)
-      nil
-    (iedit-done)
-    (message "Matches are not the same length.")))
+  (let ((iedit-case-sensitive (not isearch-case-fold-search)))
+    (isearch-exit)
+    (setq mark-active nil)
+    (run-hooks 'deactivate-mark-hook)
+    (iedit-start regexp (point-min) (point-max))
+    ;; TODO: reconsider how to avoid the loop in iedit-same-length
+    (cond ((not iedit-occurrences-overlays) 
+           (message "No matches found")
+           (iedit-done))
+          ((not (iedit-same-length))
+           (message "Matches are not the same length.")
+           (iedit-done)))))
 
 (defun iedit-start (occurrence-regexp beg end)
   "Start Iedit mode for the `occurrence-regexp' in the current buffer."



reply via email to

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