bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34641: rx: (or ...) order unpredictable


From: Mattias Engdegård
Subject: bug#34641: rx: (or ...) order unpredictable
Date: Sat, 2 Mar 2019 15:05:08 +0100

2 mars 2019 kl. 13.33 skrev Eli Zaretskii <eliz@gnu.org>:
> 
> I find the text in NEWS much more clear regarding what happens when
> the new arg is non-nil.  I think what is missing is a more explicit
> description you have in NEWS:
> 
>  If the new third argument is non-nil, the match is
>  guaranteed to be performed in the order given, as if the strings were
>  made into a regexp by joining them with '\|'.
> 
> So I suggest to mention explicitly the "match is guaranteed to be
> performed in the order given" part.

Right; rephrased the doc string and searching.texi.

>> +The optional argument NOREORDER, if nil, allows the returned
> 
> We usually say "if nil or omitted" for optional arguments.

Understood; used in both places.

>> +(defun regexp-opt--contains-prefix (strings)
>> +  "Whether a list of strings contains a proper prefix of one of its 
>> elements.
>> +STRINGS must be sorted and free from duplicates."
> 
> It is usually a good idea to refer to arguments explicitly in the
> first sentence of a doc string.  In this case, I think just up-casing
> STRINGS there should be enough.

Rephrased.

Thanks for the review; revised patch attached.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]