GNU bug report logs -
#36372
27.0.50; replace-regexp-in-string skips START first chars in return value
Previous Next
Reported by: Mattias Engdegård <mattiase <at> acm.org>
Date: Tue, 25 Jun 2019 12:41:02 UTC
Severity: normal
Found in version 27.0.50
Done: Mattias Engdegård <mattiase <at> acm.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Mattias Engdegård <mattiase <at> acm.org>
> Date: Wed, 26 Jun 2019 11:31:01 +0200
> Cc: 36372 <at> debbugs.gnu.org
>
> 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.
This bug report was last modified 5 years and 331 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.