diff options
| author | Eli Zaretskii | 2018-04-20 10:18:06 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-04-20 10:18:06 +0300 |
| commit | 5de608f3edb54b4f8d9774e159d0fa99484d3ac8 (patch) | |
| tree | d1cc3c80e4f5b2696619eea5d43d1c66c89c76ed | |
| parent | 06245b625e2b8f42126a93390bd9b8946e09b03e (diff) | |
| download | emacs-5de608f3edb54b4f8d9774e159d0fa99484d3ac8.tar.gz emacs-5de608f3edb54b4f8d9774e159d0fa99484d3ac8.zip | |
Update the documentation of 'perform-replace'
* doc/lispref/searching.texi (Search and Replace): Update the
documentation of 'perform-replace'.
| -rw-r--r-- | doc/lispref/searching.texi | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index e759967aa8a..fca877117d9 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi | |||
| @@ -1751,13 +1751,14 @@ of matching @var{regexp} against a substring of @var{string}. | |||
| 1751 | If you want to write a command along the lines of @code{query-replace}, | 1751 | If you want to write a command along the lines of @code{query-replace}, |
| 1752 | you can use @code{perform-replace} to do the work. | 1752 | you can use @code{perform-replace} to do the work. |
| 1753 | 1753 | ||
| 1754 | @defun perform-replace from-string replacements query-flag regexp-flag delimited-flag &optional repeat-count map start end | 1754 | @defun perform-replace from-string replacements query-flag regexp-flag delimited-flag &optional repeat-count map start end backward region-noncontiguous-p |
| 1755 | This function is the guts of @code{query-replace} and related | 1755 | This function is the guts of @code{query-replace} and related |
| 1756 | commands. It searches for occurrences of @var{from-string} in the | 1756 | commands. It searches for occurrences of @var{from-string} in the |
| 1757 | text between positions @var{start} and @var{end} and replaces some or | 1757 | text between positions @var{start} and @var{end} and replaces some or |
| 1758 | all of them. If @var{start} is @code{nil} (or omitted), point is used | 1758 | all of them. If @var{start} is @code{nil} (or omitted), point is used |
| 1759 | instead, and the end of the buffer's accessible portion is used for | 1759 | instead, and the end of the buffer's accessible portion is used for |
| 1760 | @var{end}. | 1760 | @var{end}. (If the optional argument @var{backward} is |
| 1761 | non-@code{nil}, the search starts at @var{end} and goes backward.) | ||
| 1761 | 1762 | ||
| 1762 | If @var{query-flag} is @code{nil}, it replaces all | 1763 | If @var{query-flag} is @code{nil}, it replaces all |
| 1763 | occurrences; otherwise, it asks the user what to do about each one. | 1764 | occurrences; otherwise, it asks the user what to do about each one. |
| @@ -1789,6 +1790,11 @@ user responses for queries. The argument @var{map}, if | |||
| 1789 | non-@code{nil}, specifies a keymap to use instead of | 1790 | non-@code{nil}, specifies a keymap to use instead of |
| 1790 | @code{query-replace-map}. | 1791 | @code{query-replace-map}. |
| 1791 | 1792 | ||
| 1793 | Non-@code{nil} @var{region-noncontiguous-p} means that the region | ||
| 1794 | between @var{start} and @var{end} is composed of noncontiguous pieces. | ||
| 1795 | The most common example of this is a rectangular region, where the | ||
| 1796 | pieces are separated by newline characters. | ||
| 1797 | |||
| 1792 | This function uses one of two functions to search for the next | 1798 | This function uses one of two functions to search for the next |
| 1793 | occurrence of @var{from-string}. These functions are specified by the | 1799 | occurrence of @var{from-string}. These functions are specified by the |
| 1794 | values of two variables: @code{replace-re-search-function} and | 1800 | values of two variables: @code{replace-re-search-function} and |