diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-01-28 13:43:08 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-01-28 13:43:08 +0100 |
commit | 3f98af1a063da1aa863530b266a69fc1361a7b88 (patch) | |
tree | 4d3a4a90720c43b1af6a4c445fa35145a85a877f | |
parent | ad9f5a1cfd5332447d67012411790371b31f7c0b (diff) |
docstrings/flychecks
-rw-r--r-- | lisp/mastodon-profile.el | 2 | ||||
-rw-r--r-- | lisp/mastodon-tl.el | 14 | ||||
-rw-r--r-- | lisp/mastodon-toot.el | 5 |
3 files changed, 13 insertions, 8 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index ac9feba..b15b4bb 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -363,7 +363,7 @@ Ask for confirmation if length > 500 characters." (mastodon-profile--user-profile-send-updated-do url note)))) (defun mastodon-profile--user-profile-send-updated-do (url note) - "Send PATCH request with the updated profile note." + "Send PATCH request with the updated profile NOTE to URL." (let ((response (mastodon-http--patch url `(("note" . ,note))))) (mastodon-http--triage response (lambda () (message "Profile note updated!"))))) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 867318b..3c6c702 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1392,12 +1392,14 @@ Optionally get it for BUFFER." (defun mastodon-tl--get-endpoint (&optional buffer no-error) "Get the ENDPOINT stored in `mastodon-tl--buffer-spec'. -Optionally set it for BUFFER." +Optionally set it for BUFFER. +NO-ERROR means to fail silently." (mastodon-tl--get-buffer-property 'endpoint buffer no-error)) (defun mastodon-tl--buffer-name (&optional buffer no-error) "Get the BUFFER-NAME stored in `mastodon-tl--buffer-spec'. -Optionally get it for BUFFER." +Optionally get it for BUFFER. +NO-ERROR means to fail silently." (mastodon-tl--get-buffer-property 'buffer-name buffer no-error)) (defun mastodon-tl--link-header (&optional buffer) @@ -1427,7 +1429,8 @@ If NO-ERROR is non-nil, do not error when property is empty." BUFFER is buffer name, ENDPOINT is buffer's enpoint, UPDATE-FUNCTION is its update function. LINK-HEADER is the http Link header if present. -UPDATE-PARAMS is any http parameters needed for the update function." +UPDATE-PARAMS is any http parameters needed for the update function. +HIDE-REPLIES is a flag indicating if replies are hidden in the current buffer." (setq mastodon-tl--buffer-spec `(account ,(cons mastodon-active-user mastodon-instance-url) @@ -1639,7 +1642,7 @@ are displayed by default. Call this if you subsequently want to view all branches of a thread." (interactive) (if (not (eq (mastodon-tl--get-buffer-type) 'thread)) - (error "You need to be viewing a thread to call this.") + (error "You need to be viewing a thread to call this") (goto-char (point-min)) (let ((id (mastodon-tl--property 'base-toot-id))) (mastodon-tl--thread id)))) @@ -3001,7 +3004,8 @@ This location is defined by a non-nil value of UPDATE-FUNCTION is used to recieve more toots. HEADERS means to also collect the response headers. Used for paginating favourites and bookmarks. -PARAMS is any parameters to send with the request." +PARAMS is any parameters to send with the request. +HIDE-REPLIES is a flag indicating if replies are hidden in the current buffer." (let ((url (mastodon-http--api endpoint)) (buffer (concat "*mastodon-" buffer-name "*"))) (if headers diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index e233fba..35fe457 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -359,7 +359,7 @@ TYPE is a symbol, either 'favourite or 'boost." (error "You can't %s favourites" action-string)) ((and (equal "private" visibility) (equal type 'boost)) - (error "You can't boost private toots.")) + (error "You can't boost private toots")) (t (mastodon-toot--action action @@ -1586,7 +1586,8 @@ If REPLY-TO-USER is provided, inject their handle into the message. If REPLY-TO-ID is provided, set the `mastodon-toot--reply-to-id' var. REPLY-JSON is the full JSON of the toot being replied to. INITIAL-TEXT is used by `mastodon-toot-insert-draft-toot' to add -a draft into the buffer." +a draft into the buffer. +EDIT means we are editing an existing toot, not composing a new one." (let* ((buffer-name (if edit "*edit toot*" "*new toot*")) (buffer-exists (get-buffer buffer-name)) (buffer (or buffer-exists (get-buffer-create buffer-name))) |