diff options
Diffstat (limited to 'lisp/replace.el')
| -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." | |||
| 2728 | (setq real-match-data | 2728 | (setq real-match-data |
| 2729 | (save-excursion | 2729 | (save-excursion |
| 2730 | (goto-char (match-beginning 0)) | 2730 | (goto-char (match-beginning 0)) |
| 2731 | (looking-at search-string) | 2731 | ;; We must quote the string (Bug#37073) |
| 2732 | (looking-at (regexp-quote search-string)) | ||
| 2732 | (match-data t (nth 2 elt))) | 2733 | (match-data t (nth 2 elt))) |
| 2733 | noedit | 2734 | noedit |
| 2734 | (replace-match-maybe-edit | 2735 | (replace-match-maybe-edit |
| @@ -2738,7 +2739,9 @@ characters." | |||
| 2738 | real-match-data | 2739 | real-match-data |
| 2739 | (save-excursion | 2740 | (save-excursion |
| 2740 | (goto-char (match-beginning 0)) | 2741 | (goto-char (match-beginning 0)) |
| 2741 | (looking-at next-replacement) | 2742 | (if regexp-flag |
| 2743 | (looking-at next-replacement) | ||
| 2744 | (looking-at (regexp-quote next-replacement))) | ||
| 2742 | (match-data t (nth 2 elt)))) | 2745 | (match-data t (nth 2 elt)))) |
| 2743 | ;; Set replaced nil to keep in loop | 2746 | ;; Set replaced nil to keep in loop |
| 2744 | (when (eq def 'undo-all) | 2747 | (when (eq def 'undo-all) |