[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110805: * doc/lispref/searching.t
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110805: * doc/lispref/searching.texi (Replacing Match): Document \? in replace-match. |
Date: |
Wed, 07 Nov 2012 23:46:35 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110805
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Wed 2012-11-07 23:46:35 +0800
message:
* doc/lispref/searching.texi (Replacing Match): Document \? in replace-match.
modified:
doc/lispref/ChangeLog
doc/lispref/searching.texi
etc/NEWS
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog 2012-11-07 09:41:52 +0000
+++ b/doc/lispref/ChangeLog 2012-11-07 15:46:35 +0000
@@ -7,6 +7,8 @@
2012-11-07 Chong Yidong <address@hidden>
+ * searching.texi (Replacing Match): Document \? in replace-match.
+
* variables.texi (Creating Buffer-Local): Document setq-local and
defvar-local.
(Setting Generalized Variables): Arrange table alphabetically.
=== modified file 'doc/lispref/searching.texi'
--- a/doc/lispref/searching.texi 2012-09-22 15:24:26 +0000
+++ b/doc/lispref/searching.texi 2012-11-07 15:46:35 +0000
@@ -1310,22 +1310,31 @@
@table @asis
@item @samp{\&}
@cindex @samp{&} in replacement
address@hidden&} stands for the entire text being replaced.
+This stands for the entire text being replaced.
address@hidden @address@hidden
address@hidden @address@hidden, where @var{n} is a digit
@cindex @address@hidden in replacement
address@hidden@var{n}}, where @var{n} is a digit, stands for the text that
-matched the @var{n}th subexpression in the original regexp.
-Subexpressions are those expressions grouped inside @samp{\(@dots{}\)}.
-If the @var{n}th subexpression never matched, an empty string is substituted.
+This stands for the text that matched the @var{n}th subexpression in
+the original regexp. Subexpressions are those expressions grouped
+inside @samp{\(@dots{}\)}. If the @var{n}th subexpression never
+matched, an empty string is substituted.
@item @samp{\\}
@cindex @samp{\} in replacement
address@hidden stands for a single @samp{\} in the replacement text.
+This stands for a single @samp{\} in the replacement text.
+
address@hidden @samp{\?}
+This stands for itself (for compatibility with @code{replace-regexp}
+and related commands; @pxref{Regexp Replacement,,, emacs, The GNU
+Emacs Manual}).
@end table
-These substitutions occur after case conversion, if any,
-so the strings they substitute are never case-converted.
address@hidden
+Any other character following @samp{\} signals an error.
+
+The substitutions performed by @samp{\&} and @address@hidden occur
+after case conversion, if any. Therefore, the strings they substitute
+are never case-converted.
If @var{subexp} is address@hidden, that says to replace just
subexpression number @var{subexp} of the regexp that was matched, not
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2012-11-07 09:41:52 +0000
+++ b/etc/NEWS 2012-11-07 15:46:35 +0000
@@ -699,6 +699,7 @@
font name as a string. Whether it returns a font spec or a font name
depends on the graphical library.
++++
** If the NEWTEXT arg to `replace-match' contains a substring "\?",
that substring is inserted literally even if the LITERAL arg is
non-nil, instead of causing an error to be signaled.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r110805: * doc/lispref/searching.texi (Replacing Match): Document \? in replace-match.,
Chong Yidong <=