[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#71879: 30.0.60; Docstring error in NOERROR argument part of re-searc
From: |
Eli Zaretskii |
Subject: |
bug#71879: 30.0.60; Docstring error in NOERROR argument part of re-search-forward |
Date: |
Mon, 01 Jul 2024 20:30:12 +0300 |
> Date: Mon, 01 Jul 2024 16:13:38 +0000
> From: Gerard Vermeulen <gerard.vermeulen@posteo.net>
>
> Hello,
>
> The last "if" clause in the NOERROR part of the re-search-forward
> docstring
> is wrong.
>
> It reads "if it is neither nil nor t, move to the limit of search and
> return nil."
>
> but if NOERROR equals neither nil nor t re-search-forward returns
> the start position of the match (when found) or nil (when no match
> found).
The full text of that part is as follows:
The optional third argument NOERROR indicates how errors are handled
when the search fails. If it is nil or omitted, emit an error; if
it is t, simply return nil and do nothing; if it is neither nil nor
t, move to the limit of search and return nil.
Note the first sentence of the paragraph: this entire paragraph
describes how NOERROR affects the case when the search _fails_. Thus,
the situation where the search succeeds is not relevant to the above
part of the doc string.
So I think this text is accurate and correct.
> By the way: using the-the finds a duplication "is is" in the NEWS
> file but I am unsure whether this merits a bug report.
Fixed, thanks.