summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2019-06-14 08:43:17 -0400
committerNoam Postavsky <npostavs@gmail.com>2019-06-25 22:00:03 -0400
commitb59ffd2290ff744ca4e7cc2748ba6b66fb2f99f1 (patch)
tree650ab12b77ba2cf9918ebc9bce586ce22ab7d52a /src/search.c
parent29babad7286bff235407e883a4ff61bae49a2e5e (diff)
downloademacs-b59ffd2290ff744ca4e7cc2748ba6b66fb2f99f1.tar.gz
Support (rx (and (regexp EXPR) (literal EXPR))) (Bug#36237)
* lisp/emacs-lisp/rx.el (rx-regexp): Allow non-string forms. (rx-constituents): Add literal constituent, which is like a plain STRING form, but allows arbitrary lisp expressions. (rx-literal): New function. (rx-compile-to-lisp): New variable. (rx--subforms): New helper function for handling subforms, including non-constant case. (rx-group-if, rx-and, rx-or, rx-=, rx->=, rx-repeat, rx-submatch) (rx-submatch-n, rx-kleene, rx-atomic-p): Use it to handle non-constant subforms. (rx): Document new form, wrap non-constant forms with concat call. * test/lisp/emacs-lisp/rx-tests.el (rx-tests--match): New macro. (rx-nonstring-expr, rx-nonstring-expr-non-greedy): New tests. * etc/NEWS: Announce changes.
Diffstat (limited to 'src/search.c')
0 files changed, 0 insertions, 0 deletions