From: Stefan Kangas Date: Sun, 25 Oct 2020 18:18:27 +0000 (+0100) Subject: Add section "Replacing Match" to the regexp shortdoc group X-Git-Tag: emacs-28.0.90~5425 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a98bb620c4b4f483694239067b258242c5c7316e;p=emacs.git Add section "Replacing Match" to the regexp shortdoc group * lisp/emacs-lisp/shortdoc.el (regexp): New section "Replacing Match". --- 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"))