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

From: Mattias Engdegård <[email-masked]>
Date: Fri, 14 Feb 2020 21:49:01 +0100

14 feb. 2020 kl. 17.15 skrev Paul Eggert <[email-masked]>:

> 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.