From a98bb620c4b4f483694239067b258242c5c7316e Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 25 Oct 2020 19:18:27 +0100 Subject: [PATCH] Add section "Replacing Match" to the regexp shortdoc group * lisp/emacs-lisp/shortdoc.el (regexp): New section "Replacing Match". --- lisp/emacs-lisp/shortdoc.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index acc7d13195e..6cb7aa0282b 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -646,6 +646,13 @@ There can be any number of :example/:result elements." (looking-at-p :no-eval (looking-at "f[0-9]") :eg-result t) + "Replacing Match" + (replace-match + :no-eval (replace-match "new") + :eg-result nil) + (match-substitute-replacement + :no-eval (match-substitute-replacement "new") + :eg-result "new") "Utilities" (regexp-quote :eval (regexp-quote "foo.*bar")) -- 2.39.2