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

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

bug#37659: rx additions: anychar, unmatchable, unordered-or


From: Mattias Engdegård
Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or
Date: Fri, 14 Feb 2020 21:49:01 +0100

14 feb. 2020 kl. 17.15 skrev Paul Eggert <address@hidden>:

> How about this idea: if the compositionality patch affects only forms 
> introduced in Emacs 27, then it's OK to put it into Emacs 27. If it affects 
> forms that have been around since Emacs 26, it might be safer to put the 
> patch into the master branch.

It is a reasonable criterion. In theory the patch might affect existing code, 
since it enables maximal matching for nested 'or' trees of string literals. The 
expression

(rx (or (or "a" "abc") (or "ab" "abcd")))

will currently not match the whole string "abcd", but with the patch, it would, 
as if flattened. The reasoning is that this is more useful, composable, and 
always what the user wants.

Whether this makes a difference for actually existing code is anyone's guess.






reply via email to

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