From: Juri Linkov Date: Sat, 10 Nov 2007 21:50:49 +0000 (+0000) Subject: (Replacing Match): Describe new `match-substitute-replacement'. X-Git-Tag: emacs-pretest-23.0.90~9789 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fe2848054d42348824e774f9d916b64b1d51e39d;p=emacs.git (Replacing Match): Describe new `match-substitute-replacement'. --- diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 5f52b30d60a..284809bdac1 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2007-11-10 Paul Pogonyshev + + * searching.texi (Replacing Match): Describe new + `match-substitute-replacement'. + 2007-10-31 Richard Stallman * strings.texi (Creating Strings): Null strings from concat not unique. diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 91b57ea4e4f..559f93ef8e3 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -1260,6 +1260,16 @@ calling @code{replace-match} with 1 as @var{subexp} means to replace just the text that matched @samp{\(ba*r\)}. @end defun +@defun match-substitute-replacement replacement &optional fixedcase literal string subexp +This function returns the text that would be inserted into the buffer +by @code{replace-match}, but without modifying the buffer. It is +useful if you want to present the user with actual replacement result, +with constructs like @samp{\@var{n}} or @samp{\&} substituted with +matched groups. Arguments @var{replacement} and optional +@var{fixedcase}, @var{literal}, @var{string} and @var{subexp} have the +same meaning as for @code{replace-match}. +@end defun + @node Simple Match Data @subsection Simple Match Data Access