From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#34641: rx: (or ...) order unpredictable Date: Sat, 2 Mar 2019 15:05:08 +0100 Message-ID: <0EAAABCF-8AA5-473A-A1E7-4B18040697D8@acm.org> References: <836B8DC2-9358-40AC-83AF-7C4D960D9A53@acm.org> <83bm31ngzp.fsf@gnu.org> <065957BB-1332-458B-8757-742A81CED4A5@acm.org> <83bm2th2wu.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="144053"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34641@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 02 15:06:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h05HN-000bKI-Bk for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Mar 2019 15:06:17 +0100 Original-Received: from localhost ([127.0.0.1]:55098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h05HM-0004SS-4x for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Mar 2019 09:06:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h05HA-0004Ry-D7 for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2019 09:06:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h05H8-0000rw-A5 for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2019 09:06:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43571) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h05H8-0000rd-5L for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2019 09:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h05H7-0006bN-Ol for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2019 09:06:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Mar 2019 14:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34641 X-GNU-PR-Package: emacs Original-Received: via spool by 34641-submit@debbugs.gnu.org id=B34641.155153551525319 (code B ref 34641); Sat, 02 Mar 2019 14:06:01 +0000 Original-Received: (at 34641) by debbugs.gnu.org; 2 Mar 2019 14:05:15 +0000 Original-Received: from localhost ([127.0.0.1]:57115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h05GM-0006aH-RL for submit@debbugs.gnu.org; Sat, 02 Mar 2019 09:05:15 -0500 Original-Received: from mail234c50.megamailservers.eu ([91.136.10.244]:43996 helo=mail37c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h05GK-0006a6-F5 for 34641@debbugs.gnu.org; Sat, 02 Mar 2019 09:05:13 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1551535510; bh=8K5j7RDRZEQvzAuMQn+xZ0/IV5eVN5qZW//W0AbfQdo=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=XbpdeD0RvDCVVyb+rC3mfnZdfZQ1Mf0lmxkfJGn6NgxFTTjq9Cjo1H32DwDFzSY5P NJwJOD8+Pvb2MGI/LnH5zzHmX4ia+864Z7xDejk1cSO1VQxxHMp2REcc4TDDAB6A6S OMpX8ywGoZMKedqM8+GosJVj3K1Jz8uSZUAF26aA= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] (c83-251-8-17.bredband.comhem.se [83.251.8.17]) (authenticated bits=0) by mail37c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x22E58DN015720; Sat, 2 Mar 2019 14:05:10 +0000 In-Reply-To: <83bm2th2wu.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.102.3) X-CTCH-RefID: str=0001.0A0B020B.5C7A8D96.0022, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=J+uEEjvS c=1 sm=1 tr=0 a=NAHmi3I8mP0S/Y8gRKeQyA==:117 a=NAHmi3I8mP0S/Y8gRKeQyA==:17 a=kj9zAlcOel0A:10 a=mDV3o1hIAAAA:8 a=N1PMelsx6J91yB7L9u4A:9 a=rwJHU9P0dy_ctKNg:21 a=YoD7R8bGwlvDaQ1T:21 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155957 Archived-At: 2 mars 2019 kl. 13.33 skrev Eli Zaretskii : >=20 > 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: >=20 > 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 '\|'. >=20 > 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 >=20 > 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." >=20 > 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.