Mercurial > emacs
diff lisp/replace.el @ 20860:1432a2b3c44e
(occur): Apply default by hand after read-from-minibuffer.
No need to clear text props from the result.
(query-replace-read-args, map-query-replace-regexp):
Offer the FROM arg as the default for the TO arg.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sun, 08 Feb 1998 07:34:28 +0000 |
| parents | 24a1fcdc31d7 |
| children | 59f75e1f5541 |
line wrap: on
line diff
--- a/lisp/replace.el Sat Feb 07 05:04:28 1998 +0000 +++ b/lisp/replace.el Sun Feb 08 07:34:28 1998 +0000 @@ -63,7 +63,7 @@ nil t))) (setq to (read-from-minibuffer (format "%s %s with: " string from) nil nil nil - query-replace-to-history-variable nil t)) + query-replace-to-history-variable from t)) (list from to current-prefix-arg))) (defun query-replace (from-string to-string &optional arg) @@ -142,7 +142,7 @@ (format "Query replace %s with (space-separated strings): " from) nil nil nil - 'query-replace-history nil t)) + 'query-replace-history from t)) (list from to current-prefix-arg))) (let (replacements) (if (listp to-strings) @@ -423,7 +423,8 @@ default) "List lines matching regexp: ") nil nil nil 'regexp-history default t))) - (set-text-properties 0 (length input) nil input) + (and (equal input "") default + (setq input default)) input) current-prefix-arg)) (let ((nlines (if nlines
