1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

(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.
This commit is contained in:
Eli Zaretskii 2005-02-19 13:12:21 +00:00
parent 7363960176
commit 2511035dc7
2 changed files with 10 additions and 3 deletions

View file

@ -1,4 +1,8 @@
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.

View file

@ -115,8 +115,11 @@ wants to replace FROM with TO."
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)