diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-05 09:25:12 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-05 09:25:12 +0200 |
commit | ceee243b82c01b6c1b42cf1a703b7aeae455c713 (patch) | |
tree | 4fbcdc23e4a1057429e6e9a311398c4c9e20a101 | |
parent | cde7c92d0b0c92fe0f997a1616453287d731af59 (diff) |
fill reply in compose: handle multi paragraph reply text.
-rw-r--r-- | lisp/mastodon-toot.el | 8 |
1 files changed, 4 insertions, 4 deletions
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))))))) |