aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorMattias EngdegÄrd2019-09-25 14:29:50 -0700
committerPaul Eggert2019-09-25 14:29:50 -0700
commit07367e5b95fe31f3d4e994b42b081075501b9b60 (patch)
tree7d26251a300462083d971aa3aa9880cc23c423a1 /etc
parent2ed71227c626c6cfdc684948644ccf3d9eaeb15b (diff)
downloademacs-07367e5b95fe31f3d4e994b42b081075501b9b60.tar.gz
emacs-07367e5b95fe31f3d4e994b42b081075501b9b60.zip
Add rx extension mechanism
Add a built-in set of extension macros: `rx-define', `rx-let' and `rx-let-eval'. * lisp/emacs-lisp/rx.el (rx-constituents, rx-to-string): Doc updates. (rx--builtin-symbols, rx--builtin-names, rx--local-definitions) (rx--lookup-def, rx--substitute, rx--expand-template) (rx--make-binding, rx--make-named-binding, rx--extend-local-defs) (rx-let-eval, rx-let, rx-define): New. (rx--translate-symbol, rx--translate-form): Use extensions if any. (rx): Use local definitions. * test/lisp/emacs-lisp/rx-tests.el (rx-let, rx-define) (rx-to-string-define, rx-let-define, rx-let-eval): New. * etc/NEWS (Changes in Specialized Modes and Packages): * doc/lispref/searching.texi (Rx Notation, Rx Functions, Extending Rx): Add node about rx extensions.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 96b2cb129bd..9a0b6333e43 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1725,6 +1725,10 @@ This also works for their aliases: '|' for 'or'; ':', 'and' and
1725In this case, 'rx' will generate code which produces a regexp string 1725In this case, 'rx' will generate code which produces a regexp string
1726at run time, instead of a constant string. 1726at run time, instead of a constant string.
1727 1727
1728---
1729*** New rx extension mechanism: 'rx-define', 'rx-let', 'rx-let-eval'.
1730These macros add new forms to the rx notation.
1731
1728** Frames 1732** Frames
1729 1733
1730+++ 1734+++