summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2019-09-29 16:59:58 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2019-09-29 17:08:43 +0200
commit2fa33eb6ee20e48a4c6488bb0d55b3c1c9a1f721 (patch)
treed58330914fcf182f48d8a926874b3a08d5adf316 /test/lisp/emacs-lisp
parent9d7fae5ab198f7f33ebb3e791475b4e1a0082f61 (diff)
downloademacs-2fa33eb6ee20e48a4c6488bb0d55b3c1c9a1f721.tar.gz
emacs-2fa33eb6ee20e48a4c6488bb0d55b3c1c9a1f721.tar.bz2
emacs-2fa33eb6ee20e48a4c6488bb0d55b3c1c9a1f721.zip
Add `rx-submatch-n' for compatibility (bug#37517)
It was an internal symbol in the old `rx' implementation, used in old versions of the `flycheck' package. * lisp/emacs-lisp/rx.el (rx-submatch-n): Alias of `rx-to-string'. * test/lisp/emacs-lisp/rx-tests.el (rx-compat): Test it.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r--test/lisp/emacs-lisp/rx-tests.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/rx-tests.el b/test/lisp/emacs-lisp/rx-tests.el
index 11de4771dea..76dcf419428 100644
--- a/test/lisp/emacs-lisp/rx-tests.el
+++ b/test/lisp/emacs-lisp/rx-tests.el
@@ -416,5 +416,8 @@
(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)."
+ (should (equal (rx-submatch-n '(group-n 3 (+ nonl) eol)) "\\(?3:.+$\\)")))
(provide 'rx-tests)