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

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

[nongnu] elpa/iedit b2bffd978c 184/301: Merge pull request #54 from Vifo


From: ELPA Syncer
Subject: [nongnu] elpa/iedit b2bffd978c 184/301: Merge pull request #54 from Vifon/iedit-replace-occurences_default-case
Date: Mon, 10 Jan 2022 22:59:01 -0500 (EST)

branch: elpa/iedit
commit b2bffd978ce3405c736068c9539b2c9cc650a269
Merge: d335d6842a 8d20094a11
Author: victorhge <victorhge@gmail.com>
Commit: victorhge <victorhge@gmail.com>

    Merge pull request #54 from Vifon/iedit-replace-occurences_default-case
    
    Use the original case in the iedit-replace default value
---
 iedit-lib.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/iedit-lib.el b/iedit-lib.el
index bac0279e83..085db7e8ea 100644
--- a/iedit-lib.el
+++ b/iedit-lib.el
@@ -589,19 +589,20 @@ This function preserves case."
   (iedit-barf-if-buffering)
   (let* ((ov (iedit-find-current-occurrence-overlay))
          (offset (- (point) (overlay-start ov)))
-         (from-string (downcase (buffer-substring-no-properties
-                                 (overlay-start ov)
-                                 (overlay-end ov))))
+         (from-string (buffer-substring-no-properties
+                       (overlay-start ov)
+                       (overlay-end ov)))
+         (from-string-lowercase (downcase from-string))
          (to-string (read-string "Replace with: "
                                  nil nil
                                  from-string
                                  nil)))
     (iedit-apply-on-occurrences
-     (lambda (beg end from-string to-string)
+     (lambda (beg end from-string-lowercase to-string)
        (goto-char beg)
-       (search-forward from-string end)
+       (search-forward from-string-lowercase end)
        (replace-match to-string nil))
-     from-string to-string)
+     from-string-lowercase to-string)
     (goto-char (+ (overlay-start ov) offset))))
 
 (defun iedit-blank-occurrences()



reply via email to

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