]> git.eshelyaron.com Git - emacs.git/commitdiff
(Replacing Match): Describe new `match-substitute-replacement'.
authorJuri Linkov <juri@jurta.org>
Sat, 10 Nov 2007 21:50:49 +0000 (21:50 +0000)
committerJuri Linkov <juri@jurta.org>
Sat, 10 Nov 2007 21:50:49 +0000 (21:50 +0000)
doc/lispref/ChangeLog
doc/lispref/searching.texi

index 5f52b30d60aec7474b7ed4e3857d391e38fd0d7f..284809bdac119734f285f1a80b26fc60a1128196 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-10  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * searching.texi (Replacing Match): Describe new
+       `match-substitute-replacement'.
+
 2007-10-31  Richard Stallman  <rms@gnu.org>
 
        * strings.texi (Creating Strings): Null strings from concat not unique.
index 91b57ea4e4f24dba84b4805e242355c6f37e16fc..559f93ef8e3553c7d846f5fc17fc1e3c3a7cb0a1 100644 (file)
@@ -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