# HG changeset patch # User Eli Zaretskii # Date 1108818577 0 # Node ID 0527991ebdf0157c0a84c4e13ba00f91327c300e # Parent 7c92649144acc79d8e1b96eb5fa2be4f4329decf (query-replace-read-from): Set the value of query-replace-from-history-variable to handle the case of an empty string entered to accept the suggested default. diff -r 7c92649144ac -r 0527991ebdf0 lisp/replace.el --- a/lisp/replace.el Sat Feb 19 12:56:21 2005 +0000 +++ b/lisp/replace.el Sat Feb 19 13:09:37 2005 +0000 @@ -115,8 +115,11 @@ query-replace-from-history-variable nil t t)))) (if (and (zerop (length from)) lastto lastfrom) - (cons lastfrom - (query-replace-compile-replacement lastto regexp-flag)) + (progn + (cons lastfrom + (query-replace-compile-replacement lastto regexp-flag)) + (set query-replace-from-history-variable + (cdr (symbol-value query-replace-from-history-variable)))) ;; Warn if user types \n or \t, but don't reject the input. (and regexp-flag (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from)