comparison lisp/replace.el @ 90813:e6fdae9180d4

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 698-710) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 216) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-196
author Miles Bader <miles@gnu.org>
date Tue, 24 Apr 2007 21:56:25 +0000
parents 4ef881a120fe 0f67bcedb447
children a66921565bcb
comparison
equal deleted inserted replaced
90812:6137cc8ddf90 90813:e6fdae9180d4
301 301
302 (define-key esc-map [?\C-%] 'query-replace-regexp) 302 (define-key esc-map [?\C-%] 'query-replace-regexp)
303 303
304 (defun query-replace-regexp-eval (regexp to-expr &optional delimited start end) 304 (defun query-replace-regexp-eval (regexp to-expr &optional delimited start end)
305 "Replace some things after point matching REGEXP with the result of TO-EXPR. 305 "Replace some things after point matching REGEXP with the result of TO-EXPR.
306
307 Interactive use of this function is deprecated in favor of the
308 `\\,' feature of `query-replace-regexp'. For non-interactive use, a loop
309 using `search-forward-regexp' and `replace-match' is preferred.
310
306 As each match is found, the user must type a character saying 311 As each match is found, the user must type a character saying
307 what to do with it. For directions, type \\[help-command] at that time. 312 what to do with it. For directions, type \\[help-command] at that time.
308 313
309 TO-EXPR is a Lisp expression evaluated to compute each replacement. It may 314 TO-EXPR is a Lisp expression evaluated to compute each replacement. It may
310 reference `replace-count' to get the number of replacements already made. 315 reference `replace-count' to get the number of replacements already made.
351 (region-beginning)) 356 (region-beginning))
352 (if (and transient-mark-mode mark-active) 357 (if (and transient-mark-mode mark-active)
353 (region-end)))))) 358 (region-end))))))
354 (perform-replace regexp (cons 'replace-eval-replacement to-expr) 359 (perform-replace regexp (cons 'replace-eval-replacement to-expr)
355 t 'literal delimited nil nil start end)) 360 t 'literal delimited nil nil start end))
361
362 (make-obsolete 'query-replace-regexp-eval
363 "for interactive use, use the special `\\,' feature of
364 `query-replace-regexp' instead. Non-interactively, a loop
365 using `search-forward-regexp' and `replace-match' is preferred." "22.1")
356 366
357 (defun map-query-replace-regexp (regexp to-strings &optional n start end) 367 (defun map-query-replace-regexp (regexp to-strings &optional n start end)
358 "Replace some matches for REGEXP with various strings, in rotation. 368 "Replace some matches for REGEXP with various strings, in rotation.
359 The second argument TO-STRINGS contains the replacement strings, 369 The second argument TO-STRINGS contains the replacement strings,
360 separated by spaces. Third arg DELIMITED (prefix arg if interactive), 370 separated by spaces. Third arg DELIMITED (prefix arg if interactive),