diff options
| author | Colin Walters | 2002-05-26 20:42:51 +0000 |
|---|---|---|
| committer | Colin Walters | 2002-05-26 20:42:51 +0000 |
| commit | 588c915a8e2325a1965bc665b9c8aee008b5da98 (patch) | |
| tree | 430688ed66268a3a0c5bb0a88efc0356a5fd082d /lisp/replace.el | |
| parent | 9b5691bb793571322beb6d5abce7f952f0fdc4b4 (diff) | |
| download | emacs-588c915a8e2325a1965bc665b9c8aee008b5da98.tar.gz emacs-588c915a8e2325a1965bc665b9c8aee008b5da98.zip | |
(perform-replace): Document return value. Use `pop'.
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 9ce2db1eca4..82942bc311f 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -967,7 +967,10 @@ just as `query-replace' does. Instead, write a simple loop like this: | |||
| 967 | 967 | ||
| 968 | which will run faster and probably do exactly what you want. Please | 968 | which will run faster and probably do exactly what you want. Please |
| 969 | see the documentation of `replace-match' to find out how to simulate | 969 | see the documentation of `replace-match' to find out how to simulate |
| 970 | `case-replace'." | 970 | `case-replace'. |
| 971 | |||
| 972 | This function returns nil if and only if there were no matches to | ||
| 973 | make, or the user didn't cancel the call." | ||
| 971 | (or map (setq map query-replace-map)) | 974 | (or map (setq map query-replace-map)) |
| 972 | (and query-flag minibuffer-auto-raise | 975 | (and query-flag minibuffer-auto-raise |
| 973 | (raise-frame (window-frame (minibuffer-window)))) | 976 | (raise-frame (window-frame (minibuffer-window)))) |
| @@ -1123,12 +1126,11 @@ see the documentation of `replace-match' to find out how to simulate | |||
| 1123 | (setq done t)) | 1126 | (setq done t)) |
| 1124 | ((eq def 'backup) | 1127 | ((eq def 'backup) |
| 1125 | (if stack | 1128 | (if stack |
| 1126 | (let ((elt (car stack))) | 1129 | (let ((elt (pop stack))) |
| 1127 | (goto-char (car elt)) | 1130 | (goto-char (car elt)) |
| 1128 | (setq replaced (eq t (cdr elt))) | 1131 | (setq replaced (eq t (cdr elt))) |
| 1129 | (or replaced | 1132 | (or replaced |
| 1130 | (set-match-data (cdr elt))) | 1133 | (set-match-data (cdr elt)))) |
| 1131 | (setq stack (cdr stack))) | ||
| 1132 | (message "No previous match") | 1134 | (message "No previous match") |
| 1133 | (ding 'no-terminate) | 1135 | (ding 'no-terminate) |
| 1134 | (sit-for 1))) | 1136 | (sit-for 1))) |