summaryrefslogtreecommitdiff
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-08-05 14:07:00 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-08-05 14:07:00 -0700
commit1a86b5d6074d26d1a3a978cb52b2147b6f359694 (patch)
tree5b609435fb29b6f62766ddd51d8649013913970e /lisp/replace.el
parentc5823cdae3de078e6db58df25769011ef3e52f36 (diff)
parentd4c6774f40b6ae1fad091f66e8e43913bc9a2724 (diff)
downloademacs-1a86b5d6074d26d1a3a978cb52b2147b6f359694.tar.gz
Merge from origin/emacs-25
d4c6774 Fix missing point information in undo 3a9d629 Avoid crashes when buffer modification hooks clobber match data 178b2f5 Note combine-and-quote-strings doesn't shell quote dec7567 Explain when package-initialize isn't called 113d1e2 Fix escaping in sh-indent-after-continuation docstr 80e2044 ; * etc/NEWS: Improve previous change. 5bb9e6c ; * etc/NEWS: Document how to avoid horizontal scroll bars. 38f4b8e Clarify the documentation of back-references in replacements
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 9e2d521baf0..e6124f44c9f 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -391,9 +391,10 @@ replace backward.
Fourth and fifth arg START and END specify the region to operate on.
-In TO-STRING, `\\&' stands for whatever matched the whole of REGEXP,
-and `\\=\\N' (where N is a digit) stands for
-whatever what matched the Nth `\\(...\\)' in REGEXP.
+In TO-STRING, `\\&' or `\\0' stands for whatever matched the whole of
+REGEXP, and `\\=\\N' (where N is a digit) stands for whatever matched
+the Nth `\\(...\\)' (1-based) in REGEXP. The `\\(...\\)' groups are
+counted from 1.
`\\?' lets you edit the replacement text in the minibuffer
at the given position for each replacement.
@@ -451,7 +452,9 @@ If the result of TO-EXPR is not a string, it is converted to one using
For convenience, when entering TO-EXPR interactively, you can use `\\&' or
`\\0' to stand for whatever matched the whole of REGEXP, and `\\N' (where
-N is a digit) to stand for whatever matched the Nth `\\(...\\)' in REGEXP.
+N is a digit) to stand for whatever matched the Nth `\\(...\\)' (1-based)
+in REGEXP.
+
Use `\\#&' or `\\#N' if you want a number instead of a string.
In interactive use, `\\#' in itself stands for `replace-count'.
@@ -635,9 +638,9 @@ replace backward.
Fourth and fifth arg START and END specify the region to operate on.
-In TO-STRING, `\\&' stands for whatever matched the whole of REGEXP,
-and `\\=\\N' (where N is a digit) stands for
-whatever what matched the Nth `\\(...\\)' in REGEXP.
+In TO-STRING, `\\&' or `\\0' stands for whatever matched the whole of
+REGEXP, and `\\=\\N' (where N is a digit) stands for
+whatever matched the Nth `\\(...\\)' (1-based) in REGEXP.
`\\?' lets you edit the replacement text in the minibuffer
at the given position for each replacement.