]> git.eshelyaron.com Git - emacs.git/commit
Allow zero-argument rx `or' and `seq' forms
authorMattias Engdegård <mattiase@acm.org>
Wed, 15 May 2019 20:44:00 +0000 (22:44 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 20 May 2019 15:56:40 +0000 (17:56 +0200)
commitafdc20d73c8588e5a744ecf7bffaf4401a557d20
treefa09854d24edb81160a2d709bd450ea7284d83f1
parentc2cda3ff4025e8c27bdfc2a5279f3b635c8df260
Allow zero-argument rx `or' and `seq' forms

Make the rx `or' and `seq' forms accept zero arguments to produce a
never-matching regexp and an empty string, respectively.

* lisp/emacs-lisp/rx.el: Require cl-extra.
(rx-constituents, rx-or): Permit zero args.
(rx): Amend doc string for `or' and `seq'.
* test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change.
* etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.
etc/NEWS
lisp/emacs-lisp/rx.el
test/lisp/emacs-lisp/rx-tests.el