summaryrefslogtreecommitdiff
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1999-07-21 23:01:38 +0000
committerKarl Heuer <kwzh@gnu.org>1999-07-21 23:01:38 +0000
commit5a78b471034e492c43f0bdc869f1fde99c13cdf0 (patch)
tree64018d440c635b668512b5c59199eded9df44e35 /lisp/replace.el
parentb412189cca6aa9a521540b3a1dd61598b7d5bed4 (diff)
downloademacs-5a78b471034e492c43f0bdc869f1fde99c13cdf0.tar.gz
emacs-5a78b471034e492c43f0bdc869f1fde99c13cdf0.tar.bz2
emacs-5a78b471034e492c43f0bdc869f1fde99c13cdf0.zip
(perform-replace): Turn off case-fold-search
if FROM-STRING argument has uppercase in it.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 5412b127624..4921fd1fd4f 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -703,6 +703,9 @@ which will run faster and probably do exactly what you want."
(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 (not regexp-flag))
(search-function (if regexp-flag 're-search-forward 'search-forward))
(search-string from-string)