]> git.eshelyaron.com Git - emacs.git/commit
Allow characters and single-char strings in rx charsets
authorMattias Engdegård <mattiase@acm.org>
Fri, 13 Dec 2019 12:10:58 +0000 (13:10 +0100)
committerMattias Engdegård <mattiase@acm.org>
Fri, 13 Dec 2019 12:30:14 +0000 (13:30 +0100)
commit82b4e48c590cf2c0448a751e641b0ee7a6a02438
tree55da830604ce9ebe4a5aa626bec285fb688578a3
parentb04086adf649b18cf5309dd43aa638fc7b3cd4a0
Allow characters and single-char strings in rx charsets

The `not' and `intersection' forms, and `or' inside these forms,
now accept characters and single-character strings as arguments.
Previously, they had to be wrapped in `any' forms.
This does not add expressive power but is a convenience and is easily
understood.

* doc/lispref/searching.texi (Rx Constructs): Amend the documentation.
* etc/NEWS: Announce the change.
* lisp/emacs-lisp/rx.el (rx--charset-p, rx--translate-not)
(rx--charset-intervals, rx): Accept characters and 1-char strings in
more places.
* test/lisp/emacs-lisp/rx-tests.el (rx-not, rx-charset-or)
(rx-def-in-charset-or, rx-intersection): Test the change.
doc/lispref/searching.texi
etc/NEWS
lisp/emacs-lisp/rx.el
test/lisp/emacs-lisp/rx-tests.el