diff options
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index ba3d5fcfbf4..d5ccd8723c2 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -217,7 +217,7 @@ Fourth and fifth arg START and END specify the region to operate on. | |||
| 217 | 217 | ||
| 218 | To customize possible responses, change the \"bindings\" in `query-replace-map'." | 218 | To customize possible responses, change the \"bindings\" in `query-replace-map'." |
| 219 | (interactive (let ((common | 219 | (interactive (let ((common |
| 220 | (query-replace-read-args | 220 | (query-replace-read-args |
| 221 | (if (and transient-mark-mode mark-active) | 221 | (if (and transient-mark-mode mark-active) |
| 222 | "Query replace in region" | 222 | "Query replace in region" |
| 223 | "Query replace") | 223 | "Query replace") |
| @@ -281,7 +281,7 @@ text, TO-STRING is actually made a list instead of a string. | |||
| 281 | Use \\[repeat-complex-command] after this command for details." | 281 | Use \\[repeat-complex-command] after this command for details." |
| 282 | (interactive | 282 | (interactive |
| 283 | (let ((common | 283 | (let ((common |
| 284 | (query-replace-read-args | 284 | (query-replace-read-args |
| 285 | (if (and transient-mark-mode mark-active) | 285 | (if (and transient-mark-mode mark-active) |
| 286 | "Query replace regexp in region" | 286 | "Query replace regexp in region" |
| 287 | "Query replace regexp") | 287 | "Query replace regexp") |
| @@ -431,7 +431,7 @@ which will run faster and will not set the mark or print anything. | |||
| 431 | and TO-STRING is also null.)" | 431 | and TO-STRING is also null.)" |
| 432 | (interactive | 432 | (interactive |
| 433 | (let ((common | 433 | (let ((common |
| 434 | (query-replace-read-args | 434 | (query-replace-read-args |
| 435 | (if (and transient-mark-mode mark-active) | 435 | (if (and transient-mark-mode mark-active) |
| 436 | "Replace string in region" | 436 | "Replace string in region" |
| 437 | "Replace string") | 437 | "Replace string") |
| @@ -489,10 +489,10 @@ What you probably want is a loop like this: | |||
| 489 | which will run faster and will not set the mark or print anything." | 489 | which will run faster and will not set the mark or print anything." |
| 490 | (interactive | 490 | (interactive |
| 491 | (let ((common | 491 | (let ((common |
| 492 | (query-replace-read-args | 492 | (query-replace-read-args |
| 493 | (if (and transient-mark-mode mark-active) | 493 | (if (and transient-mark-mode mark-active) |
| 494 | "Replace regexp in region" | 494 | "Replace regexp in region" |
| 495 | "Replace regexp") | 495 | "Replace regexp") |
| 496 | t))) | 496 | t))) |
| 497 | (list (nth 0 common) (nth 1 common) (nth 2 common) | 497 | (list (nth 0 common) (nth 1 common) (nth 2 common) |
| 498 | (if (and transient-mark-mode mark-active) | 498 | (if (and transient-mark-mode mark-active) |
| @@ -1268,12 +1268,7 @@ but coerced to the correct value of INTEGERS." | |||
| 1268 | (and (eq new reuse) | 1268 | (and (eq new reuse) |
| 1269 | (eq (null integers) (markerp (car reuse))) | 1269 | (eq (null integers) (markerp (car reuse))) |
| 1270 | new))) | 1270 | new))) |
| 1271 | (match-data integers | 1271 | (match-data integers reuse t))) |
| 1272 | (prog1 reuse | ||
| 1273 | (while reuse | ||
| 1274 | (if (markerp (car reuse)) | ||
| 1275 | (set-marker (car reuse) nil)) | ||
| 1276 | (setq reuse (cdr reuse))))))) | ||
| 1277 | 1272 | ||
| 1278 | (defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data) | 1273 | (defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data) |
| 1279 | "Make a replacement with `replace-match', editing `\\?'. | 1274 | "Make a replacement with `replace-match', editing `\\?'. |