diff lisp/replace.el @ 60159:0527991ebdf0

(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.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 19 Feb 2005 13:09:37 +0000
parents aa148fbcec2e
children 85f04f438e03
line wrap: on
line diff
--- 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)