summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2019-05-15 22:44:00 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2019-05-20 17:56:40 +0200
commitafdc20d73c8588e5a744ecf7bffaf4401a557d20 (patch)
treefa09854d24edb81160a2d709bd450ea7284d83f1 /etc
parentc2cda3ff4025e8c27bdfc2a5279f3b635c8df260 (diff)
downloademacs-afdc20d73c8588e5a744ecf7bffaf4401a557d20.tar.gz
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.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 9ca98c370e6..72702a9aaac 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1321,6 +1321,12 @@ when given in a string. Previously, '(any "\x80-\xff")' would match
characters U+0080...U+00FF. Now the expression matches raw bytes in
the 128...255 range, as expected.
+*** The rx 'or' and 'seq' forms no longer require any arguments.
+(or) produces a regexp that never matches anything, while (seq)
+matches the empty string, each being an identity for the operation.
+This also works for their aliases: '|' for 'or'; ':', 'and' and
+'sequence' for 'seq'.
+
** Frames
+++