]> git.eshelyaron.com Git - emacs.git/commit
Fix rx wrong-code bug: ranges starting with ^
authorMattias Engdegård <mattiase@acm.org>
Sun, 30 Jul 2023 13:30:38 +0000 (15:30 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sun, 30 Jul 2023 15:53:14 +0000 (17:53 +0200)
commit5f5d668ac7917d61e9366fe0c3efd7b542671c3d
treede9bc3583caa56b2dd622350fd6d54ac9bd5cff6
parent060766cf2c67314539e3002078add7f3fe3c6f86
Fix rx wrong-code bug: ranges starting with ^

(rx (in (?^ . ?a))) was incorrectly translated to "[^-a]".
Change it so that we get "[_-a^]" instead.

* lisp/emacs-lisp/rx.el (rx--generate-alt): Split ranges starting with
`^` occurring first in a non-negated character alternative.
* test/lisp/emacs-lisp/rx-tests.el (rx-any): Add and adapt tests.
lisp/emacs-lisp/rx.el
test/lisp/emacs-lisp/rx-tests.el