From aa2da6ef104b0abf0ee310c9c96ee5451d01bff5 Mon Sep 17 00:00:00 2001
From: Artur Malabarba <bruce.connor.am@gmail.com>
Date: Fri, 26 Jun 2015 19:01:50 +0100
Subject: [PATCH] * lisp/replace.el (replace-search): Fix regexp case
 (bug#20901)

---
 lisp/replace.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/replace.el b/lisp/replace.el
index 65a2b41f1ea..41debdd9cf7 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -2014,6 +2014,7 @@ It is called with three arguments, as if it were
   (let* ((isearch-regexp regexp-flag)
 	 (isearch-word (or delimited-flag
                            (and replace-character-fold
+                                (not regexp-flag)
                                 #'character-fold-to-regexp)))
 	 (isearch-lax-whitespace
 	  replace-lax-whitespace)
-- 
2.39.5