Add anychar' as alias to anything' in rx (bug#37659)

* lisp/emacs-lisp/rx.el (rx--translate-symbol, rx--builtin-symbols, rx):
* test/lisp/emacs-lisp/rx-tests.el (rx-atoms):
* doc/lispref/searching.texi (Rx Constructs):
* etc/NEWS:
Add `anychar', an alias for `anything'.  Since `anychar' is more
descriptive (and slightly shorter), treat it as the preferred name.
This commit is contained in:
Mattias Engdegård 2019-10-07 18:07:16 +02:00
parent 2d13a3f68d
commit e5a446b0a7
4 changed files with 11 additions and 7 deletions

View file

@ -184,8 +184,8 @@
"ab")))
(ert-deftest rx-atoms ()
(should (equal (rx anything)
".\\|\n"))
(should (equal (rx anychar anything)
"\\(?:.\\|\n\\)\\(?:.\\|\n\\)"))
(should (equal (rx line-start not-newline nonl any line-end)
"^...$"))
(should (equal (rx bol string-start string-end buffer-start buffer-end