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 de3577913c1..eb9f592f01d 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -115,8 +115,11 @@ wants to replace FROM with TO." | |||
| 115 | query-replace-from-history-variable | 115 | query-replace-from-history-variable |
| 116 | nil t t)))) | 116 | nil t t)))) |
| 117 | (if (and (zerop (length from)) lastto lastfrom) | 117 | (if (and (zerop (length from)) lastto lastfrom) |
| 118 | (cons lastfrom | 118 | (progn |
| 119 | (query-replace-compile-replacement lastto regexp-flag)) | 119 | (cons lastfrom |
| 120 | (query-replace-compile-replacement lastto regexp-flag)) | ||
| 121 | (set query-replace-from-history-variable | ||
| 122 | (cdr (symbol-value query-replace-from-history-variable)))) | ||
| 120 | ;; Warn if user types \n or \t, but don't reject the input. | 123 | ;; Warn if user types \n or \t, but don't reject the input. |
| 121 | (and regexp-flag | 124 | (and regexp-flag |
| 122 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from) | 125 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from) |