emacs/test/lisp/emacs-lisp
Mattias Engdegård da758046da rx: fix `or' ordering by adding argument to regexp-opt
The rx `or' form may reorder its arguments in an unpredictable way,
contrary to user expectation, since it sometimes uses `regexp-opt'.
Add a NOREORDER option to `regexp-opt' for preventing it from
producing a reordered regexp (Bug#34641).

* doc/lispref/searching.texi (Regular Expression Functions):
* etc/NEWS (Lisp Changes in Emacs 27.1):
Describe the new regexp-opt NOREORDER argument.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt): Add NOREORDER.
Make no attempt at regexp improvement if the set of strings contains
a prefix of another string.
(regexp-opt--contains-prefix): New.
* lisp/emacs-lisp/rx.el (rx-or): Call regexp-opt with NOREORDER.
* test/lisp/emacs-lisp/rx-tests.el: Test rx `or' form match order.
2019-03-02 15:35:28 +01:00
..
edebug-resources Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
eieio-tests Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
faceup-resources Update more copyright years 2018-12-31 18:47:22 -08:00
faceup-tests Update more copyright years 2018-12-31 18:47:22 -08:00
package-resources Don't use IP 0.0.0.0 for package test server (Bug#22582) 2017-02-25 12:56:09 -05:00
shadow-resources Handle case-insensitive filenames for load-path shadows (Bug#5845) 2018-01-18 16:26:52 -05:00
testcover-resources Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
backtrace-tests.el Update more copyright years 2018-12-31 18:47:22 -08:00
benchmark-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
bytecomp-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
cconv-tests.el Update more copyright years 2018-12-31 18:47:22 -08:00
checkdoc-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
cl-extra-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
cl-generic-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
cl-lib-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
cl-macs-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
cl-preloaded-tests.el Update more copyright years 2018-12-31 18:47:22 -08:00
cl-print-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
cl-seq-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
cl-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
derived-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
edebug-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
ert-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
ert-x-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
generator-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
gv-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
let-alist-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
lisp-mode-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
lisp-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
map-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
nadvice-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
package-tests.el * test/lisp/emacs-lisp/package-tests.el: Allow extra extras 2019-02-10 18:12:05 -05:00
pcase-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
pp-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
regexp-opt-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
ring-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
rmc-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
rx-tests.el rx: fix `or' ordering by adding argument to regexp-opt 2019-03-02 15:35:28 +01:00
seq-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
shadow-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
subr-x-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
tabulated-list-test.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
testcover-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
text-property-search-tests.el Update more copyright years 2018-12-31 18:47:22 -08:00
thunk-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
timer-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00