diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-10-10 10:28:51 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-10-10 10:28:51 +0200 |
commit | 6d20b69857f207963a6f9be8528c1c7e84d52c7e (patch) | |
tree | 16fdb6d6fa5244707722b951d8c1916c52c2b11d /lisp/mastodon-toot.el | |
parent | 6d2865f5034043be7f3653f44f533ebb969e79c5 (diff) | |
parent | 5b8d8f7c0f21c1a8428c2c8ad1b3f4e71ca5ffd4 (diff) |
Merge branch 'develop' into unread-notifs
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 8dfee74..9aeb790 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -1673,7 +1673,7 @@ REPLY-TEXT is the text of the toot being replied to." 'read-only "Edit your message below." 'toot-post-header t)) ;; allow us to enter text after read-only header: - (propertize "\n" + (propertize "\n\n" 'rear-nonsticky t)))) (defun mastodon-toot--most-restrictive-visibility (reply-visibility) @@ -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 " > "))) |