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

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

[nongnu] elpa/iedit 97ad9d0600 254/301: removed downcasing the from-stri


From: ELPA Syncer
Subject: [nongnu] elpa/iedit 97ad9d0600 254/301: removed downcasing the from-string in iedit-lib.el/iedit-replace-occurrences to allow case sensitivity.
Date: Mon, 10 Jan 2022 22:59:08 -0500 (EST)

branch: elpa/iedit
commit 97ad9d0600bb923fa4d51eb3f2b796af719beae7
Author: teymuri <ateymuri63@gmail.com>
Commit: Victor <victorhge@gmail.com>

    removed downcasing the from-string in 
iedit-lib.el/iedit-replace-occurrences to allow case sensitivity.
---
 iedit-lib.el | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/iedit-lib.el b/iedit-lib.el
index 88ef3fcbbd..fd1de2fb4f 100644
--- a/iedit-lib.el
+++ b/iedit-lib.el
@@ -697,9 +697,9 @@ value of `iedit-occurrence-context-lines' is used for this 
time."
   (iedit-barf-if-buffering)
   (iedit-apply-on-occurrences 'downcase-region))
 
+;;; Don't downcase from-string to allow case freedom!
 (defun iedit-replace-occurrences(&optional to-string)
-  "Replace occurrences with STRING.
-This function preserves case."
+  "Replace occurrences with STRING."
   (interactive "*")
   (iedit-barf-if-buffering)
   (let* ((ov (iedit-find-current-occurrence-overlay))
@@ -707,7 +707,6 @@ This function preserves case."
          (from-string (buffer-substring-no-properties
                        (overlay-start ov)
                        (overlay-end ov)))
-         (from-string-lowercase (downcase from-string))
          (to-string (if (not to-string)
                       (read-string "Replace with: "
                                  nil nil
@@ -715,11 +714,11 @@ This function preserves case."
                                  nil)
                       to-string)))
     (iedit-apply-on-occurrences
-     (lambda (beg end from-string-lowercase to-string)
+     (lambda (beg end from-string to-string)
        (goto-char beg)
-       (search-forward from-string-lowercase end)
+       (search-forward from-string end)
        (replace-match to-string nil))
-     from-string-lowercase to-string)
+     from-string to-string)
     (goto-char (+ (overlay-start ov) offset))))
 
 (defun iedit-blank-occurrences()



reply via email to

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