changeset 82072:7894e62e5b10

(perform-replace): Use isearch-no-upper-case-p.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 23 Jul 2007 21:32:32 +0000
parents dd207a898aee
children 38a46faaf8c1
files lisp/ChangeLog lisp/replace.el
diffstat 2 files changed, 31 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Jul 23 21:27:10 2007 +0000
+++ b/lisp/ChangeLog	Mon Jul 23 21:32:32 2007 +0000
@@ -1,3 +1,7 @@
+2007-07-23   Christopher J. Madsen  <cjm@cjmweb.net>
+
+	* replace.el (perform-replace): Use isearch-no-upper-case-p.
+
 2007-07-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* vc-hooks.el (vc-mode-line-map): New const.
--- a/lisp/replace.el	Mon Jul 23 21:27:10 2007 +0000
+++ b/lisp/replace.el	Mon Jul 23 21:32:32 2007 +0000
@@ -1408,38 +1408,36 @@
   (or map (setq map query-replace-map))
   (and query-flag minibuffer-auto-raise
        (raise-frame (window-frame (minibuffer-window))))
-  (let ((nocasify (not (and case-fold-search case-replace
-			    (string-equal from-string
-					  (downcase from-string)))))
-	(case-fold-search (and case-fold-search
-			       (string-equal from-string
-					     (downcase from-string))))
-	(literal (or (not regexp-flag) (eq regexp-flag 'literal)))
-	(search-function (if regexp-flag 're-search-forward 'search-forward))
-	(search-string from-string)
-	(real-match-data nil)		; the match data for the current match
-	(next-replacement nil)
-	;; This is non-nil if we know there is nothing for the user
-	;; to edit in the replacement.
-	(noedit nil)
-	(keep-going t)
-	(stack nil)
-	(replace-count 0)
-	(nonempty-match nil)
+  (let* ((case-fold-search
+          (and case-fold-search
+               (isearch-no-upper-case-p from-string regexp-flag)))
+         (nocasify (not (and case-replace case-fold-search)))
+         (literal (or (not regexp-flag) (eq regexp-flag 'literal)))
+         (search-function (if regexp-flag 're-search-forward 'search-forward))
+         (search-string from-string)
+         (real-match-data nil)       ; The match data for the current match.
+         (next-replacement nil)
+         ;; This is non-nil if we know there is nothing for the user
+         ;; to edit in the replacement.
+         (noedit nil)
+         (keep-going t)
+         (stack nil)
+         (replace-count 0)
+         (nonempty-match nil)
 
-	;; If non-nil, it is marker saying where in the buffer to stop.
-	(limit nil)
+         ;; If non-nil, it is marker saying where in the buffer to stop.
+         (limit nil)
 
-	;; Data for the next match.  If a cons, it has the same format as
-	;; (match-data); otherwise it is t if a match is possible at point.
-	(match-again t)
+         ;; Data for the next match.  If a cons, it has the same format as
+         ;; (match-data); otherwise it is t if a match is possible at point.
+         (match-again t)
 
-	(message
-	 (if query-flag
-	     (apply 'propertize
-		    (substitute-command-keys
-		     "Query replacing %s with %s: (\\<query-replace-map>\\[help] for help) ")
-		    minibuffer-prompt-properties))))
+         (message
+          (if query-flag
+              (apply 'propertize
+                     (substitute-command-keys
+                      "Query replacing %s with %s: (\\<query-replace-map>\\[help] for help) ")
+                     minibuffer-prompt-properties))))
 
     ;; If region is active, in Transient Mark mode, operate on region.
     (when start