From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Date: Thu, 13 Feb 2020 20:16:28 +0100 Message-ID: <4942C948-4FF4-4E47-B713-F8D6D60F8A84@acm.org> References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> <4223FF58-0F5C-4DE8-8BE0-7DF40CBF64C9@acm.org> <6aa5c232-e3df-751a-a7dc-30d430924385@cs.ucla.edu> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_1B8D64C6-2886-4D47-8027-152A60198051" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="49368"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Phil Sainty , 37659@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 13 20:17:15 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j2Jz8-000Cj1-PJ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Feb 2020 20:17:14 +0100 Original-Received: from localhost ([::1]:58272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2Jz7-0003g1-EC for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Feb 2020 14:17:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44641) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2Jyx-0003dS-EM for bug-gnu-emacs@gnu.org; Thu, 13 Feb 2020 14:17:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2Jyw-00031d-GT for bug-gnu-emacs@gnu.org; Thu, 13 Feb 2020 14:17:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54498) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2Jyw-000315-Ct for bug-gnu-emacs@gnu.org; Thu, 13 Feb 2020 14:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j2Jyw-0007G4-7R for bug-gnu-emacs@gnu.org; Thu, 13 Feb 2020 14:17:02 -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: Thu, 13 Feb 2020 19:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158162140627872 (code B ref 37659); Thu, 13 Feb 2020 19:17:02 +0000 Original-Received: (at 37659) by debbugs.gnu.org; 13 Feb 2020 19:16:46 +0000 Original-Received: from localhost ([127.0.0.1]:60471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2Jyg-0007FU-73 for submit@debbugs.gnu.org; Thu, 13 Feb 2020 14:16:46 -0500 Original-Received: from mail156c50.megamailservers.eu ([91.136.10.166]:44672 helo=mail51c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2Jyd-0007FK-T8 for 37659@debbugs.gnu.org; Thu, 13 Feb 2020 14:16:44 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1581621392; bh=WbCzUnjBvmdoPiyDQYs47gqk+CJeFmj8ORg4zu89rzs=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=Nh1HfLVBcDVldG5LeOnusAgPzwRiK+loIOypibaC6afZXN3KsMviX75QmfLdSpjDe knC0M24KqMsQSOleuXKLaBTtfuc4y3C9KPN8Yr6XSEaHdie8dAP8b8waYZKkdW5Fx9 MJcg4tREZvD80GiM+xF732pw7j8UhuwFX/vQEW7s= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail51c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 01DJGSvU005597; Thu, 13 Feb 2020 19:16:31 +0000 In-Reply-To: <6aa5c232-e3df-751a-a7dc-30d430924385@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0205.5E45A090.0016, 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=LO0Yv6e9 c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=PY8D7hP_wHavmTO7WfsA:9 a=CjuIK1q_8ugA:10 a=tYfFjs-VskjSegQuIcEA:9 a=B2y7HmGcmWMA:10 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176009 Archived-At: --Apple-Mail=_1B8D64C6-2886-4D47-8027-152A60198051 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 13 feb. 2020 kl. 19.50 skrev Paul Eggert : > Simplest would be to remove it in Emacs 27, and merge that change into = master. Right, introducing it already deprecated doesn't make sense at all. I'll = do it in emacs-27 if Eli doesn't mind too much (patch attached). --Apple-Mail=_1B8D64C6-2886-4D47-8027-152A60198051 Content-Disposition: attachment; filename=0001-Remove-the-optional-KEEP-ORDER-argument-to-regexp-op.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Remove-the-optional-KEEP-ORDER-argument-to-regexp-op.patch" Content-Transfer-Encoding: quoted-printable =46rom=2079ecef631e667650418b187143c4059d7e6eebe6=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Thu,=2013=20Feb=202020=2020:06:48=20+0100=0A= Subject:=20[PATCH]=20Remove=20the=20optional=20KEEP-ORDER=20argument=20= to=20regexp-opt=0A=0AThis=20argument=20was=20added=20for=20the=20'or'=20= clause=20in=20rx,=20but=20it=20turned=20out=0Ato=20be=20a=20bad=20idea=20= (bug#37659),=20and=20there=20seems=20to=20be=20little=20other=20use=0A= for=20it.=0A=0A*=20lisp/emacs-lisp/regexp-opt.el=20(regexp-opt):=20= Remove=20KEEP-ORDER.=0A*=20doc/lispref/searching.texi=20(Regexp=20= Functions):=0A*=20etc/NEWS:=20Remove=20it=20from=20the=20documentation.=0A= *=20test/lisp/emacs-lisp/regexp-opt-tests.el=20= (regexp-opt-test--match-all)=0A(regexp-opt-test--check-perm,=20= regexp-opt-test--explain-perm)=0A(regexp-opt-keep-order,=20= regexp-opt-longest-match):=20Simplify=20test.=0A---=0A=20= doc/lispref/searching.texi=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20= =209=20++---=0A=20etc/NEWS=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=207=20----=0A=20= lisp/emacs-lisp/regexp-opt.el=20=20=20=20=20=20=20=20=20=20=20=20|=2043=20= +++++------------------=0A=20test/lisp/emacs-lisp/regexp-opt-tests.el=20= |=2044=20++++--------------------=0A=204=20files=20changed,=2019=20= insertions(+),=2084=20deletions(-)=0A=0Adiff=20--git=20= a/doc/lispref/searching.texi=20b/doc/lispref/searching.texi=0Aindex=20= 5f4509a8b4..1f6db0643e=20100644=0A---=20a/doc/lispref/searching.texi=0A= +++=20b/doc/lispref/searching.texi=0A@@=20-1745,7=20+1745,7=20@@=20= Regexp=20Functions=0A=20@end=20defun=0A=20=0A=20@cindex=20optimize=20= regexp=0A-@defun=20regexp-opt=20strings=20&optional=20paren=20keep-order=0A= +@defun=20regexp-opt=20strings=20&optional=20paren=0A=20This=20function=20= returns=20an=20efficient=20regular=20expression=20that=20will=20match=0A=20= any=20of=20the=20strings=20in=20the=20list=20@var{strings}.=20=20This=20= is=20useful=20when=20you=0A=20need=20to=20make=20matching=20or=20= searching=20as=20fast=20as=20possible---for=20example,=0A@@=20-1783,11=20= +1783,8=20@@=20Regexp=20Functions=0A=20it=20will=20apply=20to=20the=20= whole=20expression.=0A=20@end=20table=0A=20=0A-The=20optional=20argument=20= @var{keep-order},=20if=20non-@code{nil},=20forces=20the=0A-match=20to=20= be=20performed=20in=20the=20order=20given,=20as=20if=20the=20strings=20= were=20made=0A-into=20a=20regexp=20by=20joining=20them=20with=20the=20= @samp{\|}=20operator.=20=20If=20nil=20or=0A-omitted,=20the=20returned=20= regexp=20will=20always=20match=20the=20longest=20string=0A-possible.=0A= +The=20returned=20regexp=20is=20ordered=20in=20such=20a=20way=20that=20= it=20will=20always=20match=0A+the=20longest=20string=20possible.=0A=20=0A= =20Up=20to=20reordering,=20the=20resulting=20regexp=20of=20= @code{regexp-opt}=20is=0A=20equivalent=20to=20but=20usually=20more=20= efficient=20than=20that=20of=20a=20simplified=0Adiff=20--git=20= a/etc/NEWS=20b/etc/NEWS=0Aindex=20312869fe57..380ac71260=20100644=0A---=20= a/etc/NEWS=0A+++=20b/etc/NEWS=0A@@=20-3526,13=20+3526,6=20@@=20the=20= process.=20=20That=20way=20'make-process'=20can=20start=20remote=20= processes.=0A=20This=20is=20currently=20supported=20on=20GNUish=20hosts=20= and=20on=20modern=20versions=20of=0A=20MS-Windows.=0A=20=0A-+++=0A-**=20= The=20function=20'regexp-opt'=20accepts=20an=20additional=20optional=20= argument.=0A-By=20default,=20the=20regexp=20returned=20by=20'regexp-opt'=20= may=20match=20the=20strings=0A-in=20any=20order.=20=20If=20the=20new=20= third=20argument=20is=20non-nil,=20the=20match=20is=0A-guaranteed=20to=20= be=20performed=20in=20the=20order=20given,=20as=20if=20the=20strings=20= were=0A-made=20into=20a=20regexp=20by=20joining=20them=20with=20'\|'.=0A= -=0A=20+++=0A=20**=20The=20function=20'regexp-opt',=20when=20given=20an=20= empty=20list=20of=20strings,=20now=0A=20returns=20a=20regexp=20that=20= never=20matches=20anything,=20which=20is=20an=20identity=20for=0Adiff=20= --git=20a/lisp/emacs-lisp/regexp-opt.el=20= b/lisp/emacs-lisp/regexp-opt.el=0Aindex=202cce4e6353..35a5fda184=20= 100644=0A---=20a/lisp/emacs-lisp/regexp-opt.el=0A+++=20= b/lisp/emacs-lisp/regexp-opt.el=0A@@=20-84,7=20+84,7=20@@=0A=20;;;=20= Code:=0A=20=0A=20;;;###autoload=0A-(defun=20regexp-opt=20(strings=20= &optional=20paren=20keep-order)=0A+(defun=20regexp-opt=20(strings=20= &optional=20paren)=0A=20=20=20"Return=20a=20regexp=20to=20match=20a=20= string=20in=20the=20list=20STRINGS.=0A=20Each=20member=20of=20STRINGS=20= is=20treated=20as=20a=20fixed=20string,=20not=20as=20a=20regexp.=0A=20= Optional=20PAREN=20specifies=20how=20the=20returned=20regexp=20is=20= surrounded=20by=0A@@=20-114,11=20+114,8=20@@=20regexp-opt=0A=20=20=20=20=20= necessary=20to=20ensure=20that=20a=20postfix=20operator=20appended=20to=20= it=20will=0A=20=20=20=20=20apply=20to=20the=20whole=20expression.=0A=20=0A= -The=20optional=20argument=20KEEP-ORDER,=20if=20non-nil,=20forces=20the=20= match=20to=0A-be=20performed=20in=20the=20order=20given,=20as=20if=20the=20= strings=20were=20made=20into=0A-a=20regexp=20by=20joining=20them=20with=20= the=20`\\|'=20operator.=20=20If=20nil=20or=0A-omitted,=20the=20returned=20= regexp=20is=20will=20always=20match=20the=20longest=0A-string=20= possible.=0A+The=20returned=20regexp=20is=20ordered=20in=20such=20a=20= way=20that=20it=20will=20always=0A+match=20the=20longest=20string=20= possible.=0A=20=0A=20Up=20to=20reordering,=20the=20resulting=20regexp=20= is=20equivalent=20to=20but=0A=20usually=20more=20efficient=20than=20that=20= of=20a=20simplified=20version:=0A@@=20-140,34=20+137,12=20@@=20= regexp-opt=0A=20=09=20=20=20(completion-ignore-case=20nil)=0A=20=09=20=20= =20(completion-regexp-list=20nil)=0A=20=09=20=20=20(open=20(cond=20= ((stringp=20paren)=20paren)=20(paren=20"\\(")))=0A-=09=20=20=20(re=0A-=20= =20=20=20=20=20=20=20=20=20=20=20(cond=0A-=20=20=20=20=20=20=20=20=20=20=20= =20=20;;=20No=20strings:=20return=20an=20unmatchable=20regexp.=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20((null=20strings)=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(concat=20(or=20open=20"\\(?:")=20regexp-unmatchable=20= "\\)"))=0A-=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20The=20= algorithm=20will=20generate=20a=20pattern=20that=20matches=0A-=20=20=20=20= =20=20=20=20=20=20=20=20=20;;=20longer=20strings=20in=20the=20list=20= before=20shorter.=20=20If=20the=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= ;;=20list=20order=20matters,=20then=20no=20string=20must=20come=20after=20= a=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20proper=20prefix=20of=20= that=20string.=20=20To=20check=20this,=20verify=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20;;=20that=20a=20straight=20or-pattern=20matches=20each=20= string=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20entirely.=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20((and=20keep-order=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(let*=20((case-fold-search=20nil)=0A= -=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(alts=20(mapconcat=20#'regexp-quote=20strings=20"\\|")))=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(and=20(let=20((s=20= strings))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(while=20(and=20s=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(string-match=20alts=20(car=20s))=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(=3D=20(match-end=200)=20(length=20(car=20s))))=0A= -=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(setq=20s=20(cdr=20s)))=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20If=20we=20= exited=20early,=20we=20found=20evidence=20that=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= regexp-opt-group=20cannot=20be=20used.=0A-=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20s)=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(concat=20= (or=20open=20"\\(?:")=20alts=20"\\)")))))=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20(t=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (regexp-opt-group=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (delete-dups=20(sort=20(copy-sequence=20strings)=20'string-lessp))=0A-=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(or=20open=20t)=20(not=20= open))))))=0A+=09=20=20=20(re=20(if=20strings=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(regexp-opt-group=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(delete-dups=20(sort=20= (copy-sequence=20strings)=20'string-lessp))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(or=20open=20t)=20(not=20open))=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20No=20strings:=20return=20= an=20unmatchable=20regexp.=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(concat=20(or=20open=20"\\(?:")=20regexp-unmatchable=20"\\)"))))=0A= =20=20=20=20=20=20=20(cond=20((eq=20paren=20'words)=0A=20=09=20=20=20=20=20= (concat=20"\\<"=20re=20"\\>"))=0A=20=09=20=20=20=20((eq=20paren=20= 'symbols)=0Adiff=20--git=20a/test/lisp/emacs-lisp/regexp-opt-tests.el=20= b/test/lisp/emacs-lisp/regexp-opt-tests.el=0Aindex=20= 9b4567c72c..0179ac4f1f=20100644=0A---=20= a/test/lisp/emacs-lisp/regexp-opt-tests.el=0A+++=20= b/test/lisp/emacs-lisp/regexp-opt-tests.el=0A@@=20-47,43=20+47,13=20@@=20= regexp-opt-test--permutations=0A=20=20=20(mapcar=20(lambda=20(i)=20= (regexp-opt-test--permutation=20i=20list))=0A=20=20=20=20=20=20=20=20=20=20= =20(number-sequence=200=20(1-=20(regexp-opt-test--factorial=20(length=20= list))))))=0A=20=0A-(defun=20regexp-opt-test--match-all=20(words=20re)=0A= -=20=20(mapcar=20(lambda=20(w)=20(and=20(string-match=20re=20w)=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (match-string=200=20w)))=0A-=20=20=20=20=20=20=20=20=20=20words))=0A-=0A= -(defun=20regexp-opt-test--check-perm=20(perm)=0A-=20=20(let*=20((ref-re=20= (mapconcat=20#'regexp-quote=20perm=20"\\|"))=0A-=20=20=20=20=20=20=20=20=20= (opt-re=20(regexp-opt=20perm=20nil=20t))=0A-=20=20=20=20=20=20=20=20=20= (ref=20(regexp-opt-test--match-all=20perm=20ref-re))=0A-=20=20=20=20=20=20= =20=20=20(opt=20(regexp-opt-test--match-all=20perm=20opt-re)))=0A-=20=20=20= =20(equal=20opt=20ref)))=0A-=0A-(defun=20regexp-opt-test--explain-perm=20= (perm)=0A-=20=20(let*=20((ref-re=20(mapconcat=20#'regexp-quote=20perm=20= "\\|"))=0A-=20=20=20=20=20=20=20=20=20(opt-re=20(regexp-opt=20perm=20nil=20= t))=0A-=20=20=20=20=20=20=20=20=20(ref=20(regexp-opt-test--match-all=20= perm=20ref-re))=0A-=20=20=20=20=20=20=20=20=20(opt=20= (regexp-opt-test--match-all=20perm=20opt-re)))=0A-=20=20=20=20(concat=20= "\n"=0A-=20=20=20=20=20=20=20=20=20=20=20=20(format=20"Na=C3=AFve=20= regexp:=20=20=20=20=20%s\n"=20ref-re)=0A-=20=20=20=20=20=20=20=20=20=20=20= =20(format=20"Optimized=20regexp:=20%s\n"=20opt-re)=0A-=20=20=20=20=20=20= =20=20=20=20=20=20(format=20"Got:=20=20=20=20=20=20%s\n"=20opt)=0A-=20=20= =20=20=20=20=20=20=20=20=20=20(format=20"Expected:=20%s\n"=20ref))))=0A-=0A= -(put=20'regexp-opt-test--check-perm=20'ert-explainer=20= 'regexp-opt-test--explain-perm)=0A-=0A-(ert-deftest=20= regexp-opt-keep-order=20()=0A-=20=20"Check=20that=20KEEP-ORDER=20works."=0A= -=20=20(dolist=20(perm=20(regexp-opt-test--permutations=20'("abc"=20= "bca"=20"cab")))=0A-=20=20=20=20(should=20(regexp-opt-test--check-perm=20= perm)))=0A-=20=20(dolist=20(perm=20(regexp-opt-test--permutations=20= '("abc"=20"ab"=20"bca"=20"bc")))=0A-=20=20=20=20(should=20= (regexp-opt-test--check-perm=20perm)))=0A-=20=20(dolist=20(perm=20= (regexp-opt-test--permutations=20'("abxy"=20"cdxy")))=0A-=20=20=20=20= (should=20(regexp-opt-test--check-perm=20perm)))=0A-=20=20(dolist=20= (perm=20(regexp-opt-test--permutations=20'("afgx"=20"bfgx"=20"afgy"=20= "bfgy")))=0A-=20=20=20=20(should=20(regexp-opt-test--check-perm=20= perm)))=0A-=20=20(dolist=20(perm=20(regexp-opt-test--permutations=20= '("a"=20"ab"=20"ac"=20"abc")))=0A-=20=20=20=20(should=20= (regexp-opt-test--check-perm=20perm))))=0A+(ert-deftest=20= regexp-opt-longest-match=20()=0A+=20=20"Check=20that=20the=20regexp=20= always=20matches=20as=20much=20as=20possible."=0A+=20=20(let=20((s=20= "abcd"))=0A+=20=20=20=20(dolist=20(perm=20(regexp-opt-test--permutations=20= '("a"=20"ab"=20"ac"=20"abc")))=0A+=20=20=20=20=20=20(should=20(equal=20= (and=20(string-match=20(regexp-opt=20perm)=20s)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(match-string=200=20= s))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "abc")))))=0A=20=0A=20(ert-deftest=20regexp-opt-charset=20()=0A=20=20=20= (should=20(equal=20(regexp-opt-charset=20'(?a=20?b=20?a))=20"[ab]"))=0A= --=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_1B8D64C6-2886-4D47-8027-152A60198051--