emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master a98bb62: Add section "Replacing Match" to the regexp shortdoc gro


From: Stefan Kangas
Subject: master a98bb62: Add section "Replacing Match" to the regexp shortdoc group
Date: Sun, 25 Oct 2020 14:19:31 -0400 (EDT)

branch: master
commit a98bb620c4b4f483694239067b258242c5c7316e
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    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 acc7d13..6cb7aa0 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"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]