aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el5
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