diff options
author | Stefan Kangas <stefan@marxist.se> | 2020-10-25 19:18:27 +0100 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2020-10-25 19:18:27 +0100 |
commit | a98bb620c4b4f483694239067b258242c5c7316e (patch) | |
tree | 51a75127c3ea975e37253c6e481cf15a77554a22 /lisp/emacs-lisp | |
parent | 158d2a1f50cfe233af83aa93501f51c9986918f3 (diff) | |
download | emacs-a98bb620c4b4f483694239067b258242c5c7316e.tar.gz emacs-a98bb620c4b4f483694239067b258242c5c7316e.tar.bz2 emacs-a98bb620c4b4f483694239067b258242c5c7316e.zip |
Add section "Replacing Match" to the regexp shortdoc group
* lisp/emacs-lisp/shortdoc.el (regexp): New section "Replacing Match".
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/shortdoc.el | 7 |
1 files changed, 7 insertions, 0 deletions
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")) |