diff options
| author | Glenn Morris <rgm@gnu.org> | 2019-08-20 09:04:53 -0700 |
|---|---|---|
| committer | Glenn Morris <rgm@gnu.org> | 2019-08-20 09:04:53 -0700 |
| commit | af103ef3c9d6df07475e2b3a2f846246d7fd2a8b (patch) | |
| tree | a7e0a0cb7db56b68b8b3a0c3c29a6b90d61edff7 /lisp | |
| parent | 989c85e799b7c3a425d3d03f98ecd55d5cf76022 (diff) | |
| parent | 615cff42580a3521c1a4ea7c3ec467eb8259e1c7 (diff) | |
| download | emacs-af103ef3c9d6df07475e2b3a2f846246d7fd2a8b.tar.gz | |
Merge from origin/emacs-26
615cff4 (origin/emacs-26) Fix process filter documentation (Bug#13400)
beb1d22 Fix query-replace-regexp undo feature
# Conflicts:
# test/lisp/replace-tests.el
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/replace.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 7c6c6fc9b7f..ad9be77a79b 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -2728,7 +2728,8 @@ characters." (setq real-match-data (save-excursion (goto-char (match-beginning 0)) - (looking-at search-string) + ;; We must quote the string (Bug#37073) + (looking-at (regexp-quote search-string)) (match-data t (nth 2 elt))) noedit (replace-match-maybe-edit @@ -2738,7 +2739,9 @@ characters." real-match-data (save-excursion (goto-char (match-beginning 0)) - (looking-at next-replacement) + (if regexp-flag + (looking-at next-replacement) + (looking-at (regexp-quote next-replacement))) (match-data t (nth 2 elt)))) ;; Set replaced nil to keep in loop (when (eq def 'undo-all) |
