diff options
| author | Juri Linkov | 2005-08-09 21:39:09 +0000 |
|---|---|---|
| committer | Juri Linkov | 2005-08-09 21:39:09 +0000 |
| commit | 90c9fc2aae05ab5017d6dab6fb11a72284259c2d (patch) | |
| tree | 6e5ad0c39688f590574fab4527f1ebf6f3c46518 /lisp | |
| parent | 0751a7049a4a913cda0a3d0b005ff362578a2001 (diff) | |
| download | emacs-90c9fc2aae05ab5017d6dab6fb11a72284259c2d.tar.gz emacs-90c9fc2aae05ab5017d6dab6fb11a72284259c2d.zip | |
(query-replace-read-from, query-replace-read-to)
(query-replace-read-args): Rename arg `string' to `prompt'.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/replace.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index ea1bd53e688..33162b02d3c 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -88,7 +88,7 @@ is highlighted lazily using isearch lazy highlighting (see | |||
| 88 | (defun query-replace-descr (string) | 88 | (defun query-replace-descr (string) |
| 89 | (mapconcat 'isearch-text-char-description string "")) | 89 | (mapconcat 'isearch-text-char-description string "")) |
| 90 | 90 | ||
| 91 | (defun query-replace-read-from (string regexp-flag) | 91 | (defun query-replace-read-from (prompt regexp-flag) |
| 92 | "Query and return the `from' argument of a query-replace operation. | 92 | "Query and return the `from' argument of a query-replace operation. |
| 93 | The return value can also be a pair (FROM . TO) indicating that the user | 93 | The return value can also be a pair (FROM . TO) indicating that the user |
| 94 | wants to replace FROM with TO." | 94 | wants to replace FROM with TO." |
| @@ -107,10 +107,10 @@ wants to replace FROM with TO." | |||
| 107 | query-replace-from-history-variable)))) | 107 | query-replace-from-history-variable)))) |
| 108 | (read-from-minibuffer | 108 | (read-from-minibuffer |
| 109 | (if (and lastto lastfrom) | 109 | (if (and lastto lastfrom) |
| 110 | (format "%s (default %s -> %s): " string | 110 | (format "%s (default %s -> %s): " prompt |
| 111 | (query-replace-descr lastfrom) | 111 | (query-replace-descr lastfrom) |
| 112 | (query-replace-descr lastto)) | 112 | (query-replace-descr lastto)) |
| 113 | (format "%s: " string)) | 113 | (format "%s: " prompt)) |
| 114 | nil nil nil | 114 | nil nil nil |
| 115 | query-replace-from-history-variable | 115 | query-replace-from-history-variable |
| 116 | nil t t)))) | 116 | nil t t)))) |
| @@ -173,22 +173,22 @@ the original string if not." | |||
| 173 | to)) | 173 | to)) |
| 174 | 174 | ||
| 175 | 175 | ||
| 176 | (defun query-replace-read-to (from string regexp-flag) | 176 | (defun query-replace-read-to (from prompt regexp-flag) |
| 177 | "Query and return the `to' argument of a query-replace operation." | 177 | "Query and return the `to' argument of a query-replace operation." |
| 178 | (query-replace-compile-replacement | 178 | (query-replace-compile-replacement |
| 179 | (save-excursion | 179 | (save-excursion |
| 180 | (read-from-minibuffer | 180 | (read-from-minibuffer |
| 181 | (format "%s %s with: " string (query-replace-descr from)) | 181 | (format "%s %s with: " prompt (query-replace-descr from)) |
| 182 | nil nil nil | 182 | nil nil nil |
| 183 | query-replace-to-history-variable from t t)) | 183 | query-replace-to-history-variable from t t)) |
| 184 | regexp-flag)) | 184 | regexp-flag)) |
| 185 | 185 | ||
| 186 | (defun query-replace-read-args (string regexp-flag &optional noerror) | 186 | (defun query-replace-read-args (prompt regexp-flag &optional noerror) |
| 187 | (unless noerror | 187 | (unless noerror |
| 188 | (barf-if-buffer-read-only)) | 188 | (barf-if-buffer-read-only)) |
| 189 | (let* ((from (query-replace-read-from string regexp-flag)) | 189 | (let* ((from (query-replace-read-from prompt regexp-flag)) |
| 190 | (to (if (consp from) (prog1 (cdr from) (setq from (car from))) | 190 | (to (if (consp from) (prog1 (cdr from) (setq from (car from))) |
| 191 | (query-replace-read-to from string regexp-flag)))) | 191 | (query-replace-read-to from prompt regexp-flag)))) |
| 192 | (list from to current-prefix-arg))) | 192 | (list from to current-prefix-arg))) |
| 193 | 193 | ||
| 194 | (defun query-replace (from-string to-string &optional delimited start end) | 194 | (defun query-replace (from-string to-string &optional delimited start end) |