]> git.eshelyaron.com Git - emacs.git/commit
Disallow reversed char ranges in `rx'
authorMattias Engdegård <mattiase@acm.org>
Tue, 12 Mar 2019 13:39:47 +0000 (14:39 +0100)
committerMattias Engdegård <mattiase@acm.org>
Tue, 19 Mar 2019 19:30:15 +0000 (20:30 +0100)
commit3ed1621d843e057ad879fbed3605d32f55a065b9
treee4bd97bb649e9b6c05a0601eba5ef754f0d3310c
parentc0936672876bccc15e7899e83d8ab99910f8feee
Disallow reversed char ranges in `rx'

(any "a-Z0-9") generated "[0-9]", and (any (?9 . ?0)) generated "[9-0]".
Reversed ranges are either mistakes or abuse.  Neither should be allowed.

etc/NEWS: Explain the change.
lisp/emacs-lisp/rx.el (rx): Document.
(rx-check-any-string, rx-check-any): Add error checks for reversed ranges.
test/lisp/emacs-lisp/rx-tests.el (rx-char-any-range-bad): New test.
etc/NEWS
lisp/emacs-lisp/rx.el
test/lisp/emacs-lisp/rx-tests.el