aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2007-07-23 21:32:32 +0000
committerStefan Monnier2007-07-23 21:32:32 +0000
commit26cc71affcdc326491cfd936c43eb90522a06ca0 (patch)
treef3a1b98f00d1b07afe101244ec41c5511e804ee9
parent1f2e1c75423c6bd53e24c1d49d4ced881caf724a (diff)
downloademacs-26cc71affcdc326491cfd936c43eb90522a06ca0.tar.gz
emacs-26cc71affcdc326491cfd936c43eb90522a06ca0.zip
(perform-replace): Use isearch-no-upper-case-p.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/replace.el62
2 files changed, 34 insertions, 32 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 957c05fba4e..264bd2ae9ec 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12007-07-23 Christopher J. Madsen <cjm@cjmweb.net>
2
3 * replace.el (perform-replace): Use isearch-no-upper-case-p.
4
12007-07-23 Stefan Monnier <monnier@iro.umontreal.ca> 52007-07-23 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * vc-hooks.el (vc-mode-line-map): New const. 7 * vc-hooks.el (vc-mode-line-map): New const.
diff --git a/lisp/replace.el b/lisp/replace.el
index 5d4c2a2eba6..32c170430b9 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1408,38 +1408,36 @@ make, or the user didn't cancel the call."
1408 (or map (setq map query-replace-map)) 1408 (or map (setq map query-replace-map))
1409 (and query-flag minibuffer-auto-raise 1409 (and query-flag minibuffer-auto-raise
1410 (raise-frame (window-frame (minibuffer-window)))) 1410 (raise-frame (window-frame (minibuffer-window))))
1411 (let ((nocasify (not (and case-fold-search case-replace 1411 (let* ((case-fold-search
1412 (string-equal from-string 1412 (and case-fold-search
1413 (downcase from-string))))) 1413 (isearch-no-upper-case-p from-string regexp-flag)))
1414 (case-fold-search (and case-fold-search 1414 (nocasify (not (and case-replace case-fold-search)))
1415 (string-equal from-string 1415 (literal (or (not regexp-flag) (eq regexp-flag 'literal)))
1416 (downcase from-string)))) 1416 (search-function (if regexp-flag 're-search-forward 'search-forward))
1417 (literal (or (not regexp-flag) (eq regexp-flag 'literal))) 1417 (search-string from-string)
1418 (search-function (if regexp-flag 're-search-forward 'search-forward)) 1418 (real-match-data nil) ; The match data for the current match.
1419 (search-string from-string) 1419 (next-replacement nil)
1420 (real-match-data nil) ; the match data for the current match 1420 ;; This is non-nil if we know there is nothing for the user
1421 (next-replacement nil) 1421 ;; to edit in the replacement.
1422 ;; This is non-nil if we know there is nothing for the user 1422 (noedit nil)
1423 ;; to edit in the replacement. 1423 (keep-going t)
1424 (noedit nil) 1424 (stack nil)
1425 (keep-going t) 1425 (replace-count 0)
1426 (stack nil) 1426 (nonempty-match nil)
1427 (replace-count 0) 1427
1428 (nonempty-match nil) 1428 ;; If non-nil, it is marker saying where in the buffer to stop.
1429 1429 (limit nil)
1430 ;; If non-nil, it is marker saying where in the buffer to stop. 1430
1431 (limit nil) 1431 ;; Data for the next match. If a cons, it has the same format as
1432 1432 ;; (match-data); otherwise it is t if a match is possible at point.
1433 ;; Data for the next match. If a cons, it has the same format as 1433 (match-again t)
1434 ;; (match-data); otherwise it is t if a match is possible at point. 1434
1435 (match-again t) 1435 (message
1436 1436 (if query-flag
1437 (message 1437 (apply 'propertize
1438 (if query-flag 1438 (substitute-command-keys
1439 (apply 'propertize 1439 "Query replacing %s with %s: (\\<query-replace-map>\\[help] for help) ")
1440 (substitute-command-keys 1440 minibuffer-prompt-properties))))
1441 "Query replacing %s with %s: (\\<query-replace-map>\\[help] for help) ")
1442 minibuffer-prompt-properties))))
1443 1441
1444 ;; If region is active, in Transient Mark mode, operate on region. 1442 ;; If region is active, in Transient Mark mode, operate on region.
1445 (when start 1443 (when start