From 5a78b471034e492c43f0bdc869f1fde99c13cdf0 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Wed, 21 Jul 1999 23:01:38 +0000 Subject: [PATCH] (perform-replace): Turn off case-fold-search if FROM-STRING argument has uppercase in it. --- lisp/replace.el | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.39.5