projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
158d2a1
)
Add section "Replacing Match" to the regexp shortdoc group
author
Stefan Kangas
<stefan@marxist.se>
Sun, 25 Oct 2020 18:18:27 +0000
(19:18 +0100)
committer
Stefan Kangas
<stefan@marxist.se>
Sun, 25 Oct 2020 18:18:27 +0000
(19:18 +0100)
* lisp/emacs-lisp/shortdoc.el (regexp): New section "Replacing Match".
lisp/emacs-lisp/shortdoc.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/shortdoc.el
b/lisp/emacs-lisp/shortdoc.el
index acc7d13195ea0a19a0e148035764985160e6415f..6cb7aa0282bc7b422f1ca321d21192129989dc68 100644
(file)
--- 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"))