]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/searching.texi
Merge from emacs--rel--22
[gnu-emacs] / doc / lispref / searching.texi
index 70926478ea7a749b7c81a790b288a3e09d5f8a01..9b54aa18b088a5f85cb4b419c0d73d3188def404 100644 (file)
@@ -1,9 +1,9 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
 @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001,
-@c   2002, 2003, 2004, 2005, 2006, 2007  Free Software Foundation, Inc.
+@c   2002, 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
-@setfilename ../info/searching
+@setfilename ../../info/searching
 @node Searching and Matching, Syntax Tables, Non-ASCII Characters, Top
 @chapter Searching and Matching
 @cindex searching
@@ -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