# HG changeset patch # User David Kastrup # Date 1176852253 0 # Node ID 0f67bcedb4477b30e15256280d89b21b58149371 # Parent 1f5115cdbed555149e82398134788ce532ab01e4 * NEWS: Mention `query-replace-regexp-eval' being deprecated. * replace.el (query-replace-regexp-eval): Deprecate. diff -r 1f5115cdbed5 -r 0f67bcedb447 etc/ChangeLog --- a/etc/ChangeLog Tue Apr 17 20:48:43 2007 +0000 +++ b/etc/ChangeLog Tue Apr 17 23:24:13 2007 +0000 @@ -1,3 +1,7 @@ +2007-04-17 David Kastrup + + * NEWS: Mention `query-replace-regexp-eval' being deprecated. + 2007-04-15 Glenn Morris * FTP: Make it a duplicate of ../FTP. diff -r 1f5115cdbed5 -r 0f67bcedb447 etc/NEWS --- a/etc/NEWS Tue Apr 17 20:48:43 2007 +0000 +++ b/etc/NEWS Tue Apr 17 23:24:13 2007 +0000 @@ -633,12 +633,12 @@ *** When used interactively, the commands `query-replace-regexp' and `replace-regexp' allow \,expr to be used in a replacement string, where expr is an arbitrary Lisp expression evaluated at replacement -time. In many cases, this will be more convenient than using -`query-replace-regexp-eval'. `\#' in a replacement string now refers -to the count of replacements already made by the replacement command. -All regular expression replacement commands now allow `\?' in the -replacement string to specify a position where the replacement string -can be edited for each replacement. +time. `\#' in a replacement string now refers to the count of +replacements already made by the replacement command. All regular +expression replacement commands now allow `\?' in the replacement +string to specify a position where the replacement string can be +edited for each replacement. `query-replace-regexp-eval' is now +deprecated since it offers no additional functionality. +++ *** query-replace uses isearch lazy highlighting when the new user option diff -r 1f5115cdbed5 -r 0f67bcedb447 lisp/ChangeLog --- a/lisp/ChangeLog Tue Apr 17 20:48:43 2007 +0000 +++ b/lisp/ChangeLog Tue Apr 17 23:24:13 2007 +0000 @@ -1,3 +1,7 @@ +2007-04-17 David Kastrup + + * replace.el (query-replace-regexp-eval): Deprecate. + 2007-04-17 Alan Mackenzie * progmodes/cc-cmds.el (c-beginning-of-defun): With -ve arg and diff -r 1f5115cdbed5 -r 0f67bcedb447 lisp/replace.el --- a/lisp/replace.el Tue Apr 17 20:48:43 2007 +0000 +++ b/lisp/replace.el Tue Apr 17 23:24:13 2007 +0000 @@ -303,6 +303,11 @@ (defun query-replace-regexp-eval (regexp to-expr &optional delimited start end) "Replace some things after point matching REGEXP with the result of TO-EXPR. + +Interactive use of this function is deprecated in favor of the +`\\,' feature of `query-replace-regexp'. For non-interactive use, a loop +using `search-forward-regexp' and `replace-match' is preferred. + As each match is found, the user must type a character saying what to do with it. For directions, type \\[help-command] at that time. @@ -354,6 +359,11 @@ (perform-replace regexp (cons 'replace-eval-replacement to-expr) t 'literal delimited nil nil start end)) +(make-obsolete 'query-replace-regexp-eval + "for interactive use, use the special `\\,' feature of +`query-replace-regexp' instead. Non-interactively, a loop +using `search-forward-regexp' and `replace-match' is preferred." "22.1") + (defun map-query-replace-regexp (regexp to-strings &optional n start end) "Replace some matches for REGEXP with various strings, in rotation. The second argument TO-STRINGS contains the replacement strings,