]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix highlighting in query-replace with non-nil replace-char-fold
authorCharles A. Roelli <charles@aurox.ch>
Tue, 26 Dec 2017 11:46:39 +0000 (12:46 +0100)
committerCharles A. Roelli <charles@aurox.ch>
Tue, 26 Dec 2017 11:46:39 +0000 (12:46 +0100)
* lisp/replace.el (replace-highlight): Bind
'isearch-regexp-function' in the same way that function
'replace-search' does, so as to respect the value of
'replace-char-fold'.  (Bug#24356)

lisp/replace.el

index 80e584517cec9c8d1b6ec140fb8b0d2b619cd8b8..396428f6f28ef39704ed36314c4bd36114f9da8d 100644 (file)
@@ -2212,7 +2212,10 @@ It is called with three arguments, as if it were
   (if query-replace-lazy-highlight
       (let ((isearch-string search-string)
            (isearch-regexp regexp-flag)
-           (isearch-regexp-function delimited-flag)
+           (isearch-regexp-function (or delimited-flag
+                                        (and replace-char-fold
+                                             (not regexp-flag)
+                                             #'char-fold-to-regexp)))
            (isearch-lax-whitespace
             replace-lax-whitespace)
            (isearch-regexp-lax-whitespace