query-replace-from-history-variable to handle the case of an empty
string entered to accept the suggested default.
-2005-02-19 Eli Zaretskii <eliz@gnu.org>
+2005-02-19 Michael Mauger <mmaug@yahoo.com>
+
+ * replace.el (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.
* net/tramp.el (tramp-file-name-for-operation): Use
dired-call-process instead of dired-call-process-command.
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)