Subject: bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in return value [PATCH]

From: Eli Zaretskii <[email-masked]>
Date: Wed, 26 Jun 2019 18:17:13 +0300

> From: Mattias Engdegård <[email-masked]>
> Date: Wed, 26 Jun 2019 11:31:01 +0200
> Cc: [email-masked]
> 
> diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
> index 33455114da..86a907021c 100644
> --- a/doc/lispref/searching.texi
> +++ b/doc/lispref/searching.texi
> @@ -1790,8 +1790,8 @@ Search and Replace
>  This function copies @var{string} and searches it for matches for
>  @var{regexp}, and replaces them with @var{rep}.  It returns the
>  modified copy.  If @var{start} is non-@code{nil}, the search for
> -matches starts at that index in @var{string}, so matches starting
> -before that index are not changed.
> +matches starts at that index in @var{string}, and the returned value
> +does not include first @var{start} characters of @var{string}.

For the manual, I'd expand a bit on this, and explained how to get the
result you thought you will when using non-nil START (by concatenating
with the initial substring).

Thanks.