diff options
author | marty hiatt <martianhiatus@riseup.net> | 2023-11-11 12:10:16 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2023-11-11 12:10:16 +0100 |
commit | ff4d7a5ae47c873e2a9f0920cb53f28fd1a4fa5a (patch) | |
tree | 39e85e9821ae6c90ca13806ff5461072bae2fc6f /lisp | |
parent | e5c9f403b6e71407b6e8e14a72a0d08848970213 (diff) |
docstrings/comments for quote-reply issues
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-toot.el | 12 |
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))) |