]> git.eshelyaron.com Git - emacs.git/commit
Add rx extension mechanism
authorMattias EngdegÄrd <mattiase@acm.org>
Wed, 25 Sep 2019 21:29:50 +0000 (14:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 25 Sep 2019 21:29:50 +0000 (14:29 -0700)
commit07367e5b95fe31f3d4e994b42b081075501b9b60
tree7d26251a300462083d971aa3aa9880cc23c423a1
parent2ed71227c626c6cfdc684948644ccf3d9eaeb15b
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.
doc/lispref/searching.texi
etc/NEWS
lisp/emacs-lisp/rx.el
test/lisp/emacs-lisp/rx-tests.el