]> git.eshelyaron.com Git - emacs.git/commit
Prevent over-eager rx character range condensation
authorMattias Engdegård <mattiase@acm.org>
Fri, 15 Feb 2019 18:27:48 +0000 (19:27 +0100)
committerMattias Engdegård <mattiase@acm.org>
Sat, 16 Feb 2019 11:43:32 +0000 (12:43 +0100)
commit478bbf7c80e71ff84f0e4e1363bf86e93d9c51c3
tree7d05c376a0299282d291eff879eedcc6f3d2651d
parentaff0c585060b7cc92d52a32978c6aa64cf7e2a5e
Prevent over-eager rx character range condensation

`rx' incorrectly considers character ranges between ASCII and raw bytes to
cover all codes in-between, which includes all non-ASCII Unicode chars.
This causes (any "\000-\377" ?Å) to be simplified to (any "\000-\377"),
which is not at all the same thing: [\000-\377] really means
[\000-\177\200-\377] (Bug#34492).

* lisp/emacs-lisp/rx.el (rx-any-condense-range): Split ranges going
from ASCII to raw bytes.
* test/lisp/emacs-lisp/rx-tests.el (rx-char-any-raw-byte): Add test case.
* etc/NEWS: Mention the overall change (Bug#33205).
etc/NEWS
lisp/emacs-lisp/rx.el
test/lisp/emacs-lisp/rx-tests.el