aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-10-09 12:38:52 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-10-09 12:38:52 +0200
commit5b8d8f7c0f21c1a8428c2c8ad1b3f4e71ca5ffd4 (patch)
treea97be9e55f2788aeab62fe8ccf3752b62d3ff586 /lisp
parent7af2f459b7ed7375fd9df1a960d78aeba7e27351 (diff)
FIX filling in formatting reply quote! hurrah!
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-toot.el11
1 files changed, 3 insertions, 8 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index fd7e298..9aeb790 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1686,22 +1686,17 @@ The default is given by `mastodon-toot--default-reply-visibility'."
mastodon-toot--default-reply-visibility
reply-visibility))))
-(defun mastodon-toot--fill-buffer ()
- "Mark buffer, call `fill-region'."
- (mark-whole-buffer) ; lisp code should not set mark
- ;; (fill-region (point-min) (point-max)) ; but this doesn't work
- (fill-region (region-beginning) (region-end)))
-
(defun mastodon-toot--render-reply-region-str (str)
"Refill STR and prefix all lines with >, as reply-quote text."
(with-temp-buffer
(insert str)
;; unfill first:
(let ((fill-column (point-max)))
- (mastodon-toot--fill-buffer))
+ (fill-region (point-min) (point-max)))
;; then fill:
- (mastodon-toot--fill-buffer)
+ (fill-region (point-min) (point-max))
;; add our own prefix, pauschal:
+ (goto-char (point-min))
(save-match-data
(while (re-search-forward "^" nil t)
(replace-match " > ")))