diff options
author | Holger Dürer <me@hdurer.net> | 2017-05-16 21:44:10 +0100 |
---|---|---|
committer | Johnson Denen <johnson.denen@gmail.com> | 2017-05-18 10:21:21 -0400 |
commit | c0708e9338de45415c0b70019cf45ee9a5bad230 (patch) | |
tree | b70ac8edcc22352bbcff4cdf56710961f85c86f2 /lisp/mastodon-toot.el | |
parent | fe8e4386eacb358df0e16dc5bd37dde4f4d6d57c (diff) |
Replace uses of replace-regexp with search-forward and replace-match.
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index ffe6454..296f95f 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -56,7 +56,10 @@ Remove MARKER if RM is non-nil." (let ((inhibit-read-only t) (bol (progn (move-beginning-of-line nil) (point))) (eol (progn (move-end-of-line nil) (point)))) - (when rm (replace-regexp (format "(%s) " marker) "" nil bol eol)) + (when rm + (goto-char bol) + (if (search-forward (format "(%s) " marker) eol t) + (replace-match ""))) (move-beginning-of-line nil) (mastodon-tl--goto-next-toot) (unless rm |