aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2023-11-11 12:10:16 +0100
committermarty hiatt <martianhiatus@riseup.net>2023-11-11 12:10:16 +0100
commitff4d7a5ae47c873e2a9f0920cb53f28fd1a4fa5a (patch)
tree39e85e9821ae6c90ca13806ff5461072bae2fc6f /lisp/mastodon-toot.el
parente5c9f403b6e71407b6e8e14a72a0d08848970213 (diff)
docstrings/comments for quote-reply issues
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 6b2f791..7833e47 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1085,7 +1085,9 @@ If TAGS, we search for tags, else we search for handles."
(defun mastodon-toot--reply ()
"Reply to toot at `point'.
Customize `mastodon-toot-display-orig-in-reply-buffer' to display
-text of the toot being replied to in the compose buffer."
+text of the toot being replied to in the compose buffer.
+If the region is active, inject it into the reply buffer,
+prefixed by >."
(interactive)
(mastodon-tl--do-if-item-strict
(let* ((quote (when (region-active-p)
@@ -1542,8 +1544,9 @@ 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)
+ "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)
@@ -1567,7 +1570,8 @@ The default is given by `mastodon-toot--default-reply-visibility'."
reply-json reply-region)
"If REPLY-TO-USER is provided, inject their handle into the message.
If REPLY-TO-ID is provided, set `mastodon-toot--reply-to-id'.
-REPLY-JSON is the full JSON of the toot being replied to."
+REPLY-JSON is the full JSON of the toot being replied to.
+REPLY-REGION is a string to be injected into the buffer."
(let ((reply-visibility (mastodon-toot--most-restrictive-visibility
(alist-get 'visibility reply-json)))
(reply-cw (alist-get 'spoiler_text reply-json)))