diff doc/lispref/searching.texi @ 86020:a2d2fe78ace5

(Replacing Match): Describe new `match-substitute-replacement'.
author Juri Linkov <juri@jurta.org>
date Sat, 10 Nov 2007 21:50:41 +0000
parents 0ba80d073e27
children 107ccd98fa12
line wrap: on
line diff
--- a/doc/lispref/searching.texi	Sat Nov 10 21:49:19 2007 +0000
+++ b/doc/lispref/searching.texi	Sat Nov 10 21:50:41 2007 +0000
@@ -1260,6 +1260,16 @@
 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