From ceee243b82c01b6c1b42cf1a703b7aeae455c713 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 5 May 2023 09:25:12 +0200 Subject: fill reply in compose: handle multi paragraph reply text. --- lisp/mastodon-toot.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 1ee3215..dd54ac2 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -1669,12 +1669,12 @@ Added to `after-change-functions'." (mastodon-tl--buffer-type-eq 'new-toot))) (defun mastodon-toot--fill-reply-in-compose () + "Fill reply text in compose buffer to the width of the divider." (save-excursion (save-match-data - (goto-char (point-min)) - (let* ((fill-column 67) - (prop (text-property-search-forward 'toot-reply))) - (when prop + (let* ((fill-column 67)) + (goto-char (point-min)) + (while-let ((prop (text-property-search-forward 'toot-reply))) (fill-region (prop-match-beginning prop) (point))))))) -- cgit v1.2.3