diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2024-04-29 12:35:55 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2024-04-29 14:29:53 +0200 |
commit | 3be382311fa03b9ec9c571b5e5737ff2d51bc2d3 (patch) | |
tree | 41d40c44fdf4a446e9707cc97138914c214cccb5 /test/lisp/emacs-lisp/rx-tests.el | |
parent | f906ce5543818f2cba08dd2c7b94e4ba566ce64c (diff) | |
download | emacs-3be382311fa03b9ec9c571b5e5737ff2d51bc2d3.tar.gz emacs-3be382311fa03b9ec9c571b5e5737ff2d51bc2d3.tar.bz2 emacs-3be382311fa03b9ec9c571b5e5737ff2d51bc2d3.zip |
Declare the variable `rx-constituents` obsolete.
It has been effectively obsolete since Emacs 27, when the modern
extension mechanism was introduced.
* lisp/emacs-lisp/rx.el (rx-constituents): Make obsolete.
* test/lisp/emacs-lisp/rx-tests.el (rx-constituents): Suppress warning.
* etc/NEWS: Announce.
Diffstat (limited to 'test/lisp/emacs-lisp/rx-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/rx-tests.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/test/lisp/emacs-lisp/rx-tests.el b/test/lisp/emacs-lisp/rx-tests.el index 072209bcbcc..1bb79f72671 100644 --- a/test/lisp/emacs-lisp/rx-tests.el +++ b/test/lisp/emacs-lisp/rx-tests.el @@ -619,18 +619,19 @@ "[^amz]\\S_")))) (ert-deftest rx-constituents () - (let ((rx-constituents - (append '((beta . gamma) - (gamma . "a*b") - (delta . ((lambda (form) - (regexp-quote (format "<%S>" form))) - 1 nil symbolp)) - (epsilon . delta)) - rx-constituents))) - (should (equal (rx-to-string '(seq (+ beta) nonl gamma) t) - "\\(?:a*b\\)+.\\(?:a*b\\)")) - (should (equal (rx-to-string '(seq (delta a b c) (* (epsilon d e))) t) - "\\(?:<(delta a b c)>\\)\\(?:<(epsilon d e)>\\)*")))) + (with-suppressed-warnings ((obsolete rx-constituents)) + (let ((rx-constituents + (append '((beta . gamma) + (gamma . "a*b") + (delta . ((lambda (form) + (regexp-quote (format "<%S>" form))) + 1 nil symbolp)) + (epsilon . delta)) + rx-constituents))) + (should (equal (rx-to-string '(seq (+ beta) nonl gamma) t) + "\\(?:a*b\\)+.\\(?:a*b\\)")) + (should (equal (rx-to-string '(seq (delta a b c) (* (epsilon d e))) t) + "\\(?:<(delta a b c)>\\)\\(?:<(epsilon d e)>\\)*"))))) (ert-deftest rx-compat () "Test old symbol retained for compatibility (bug#37517)." |