aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authorHolger Dürer <me@hdurer.net>2021-11-01 12:28:32 +0100
committerHolger Dürer <me@hdurer.net>2021-11-01 14:31:26 +0100
commitd7593a06912b7946d2fb318093ec7e27c64b3be7 (patch)
tree6efc758297a927434861e66c913d1b8b5aa19c60 /lisp/mastodon-toot.el
parent04465567450d6fc9cdec1a1ba0ef12557b0ab54b (diff)
Fix compilation warnings.
This is mostly reflowing / reworkding docstrings to keep within 80 characters limit and adding autoloads. There are two warning remaining that I don't understand: - mastodon-async.el:359:16: Warning: reference to free variable ‘url-http-end-of-headers’ - mastodon-http.el:139:8: Warning: value returned from (string-equal json-string "") is unused When adding autoloads this sorts them for better readability.
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el41
1 files changed, 23 insertions, 18 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index b0b7e13..7698226 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -43,24 +43,25 @@
(defvar mastodon-instance-url)
(autoload 'mastodon-auth--user-acct "mastodon-auth")
(autoload 'mastodon-http--api "mastodon-http")
-(autoload 'mastodon-http--post "mastodon-http")
-(autoload 'mastodon-http--triage "mastodon-http")
(autoload 'mastodon-http--delete "mastodon-http")
-(autoload 'mastodon-http--process-json "mastodon-http")
(autoload 'mastodon-http--get-json "mastodon-http")
+(autoload 'mastodon-http--get-json-async "mastodon-htpp")
+(autoload 'mastodon-http--post "mastodon-http")
+(autoload 'mastodon-http--post-media-attachment "mastodon-http")
+(autoload 'mastodon-http--process-json "mastodon-http")
+(autoload 'mastodon-http--read-file-as-string "mastodon-http")
+(autoload 'mastodon-http--triage "mastodon-http")
+(autoload 'mastodon-search--search-accounts-query "mastodon-search")
(autoload 'mastodon-tl--as-string "mastodon-tl")
(autoload 'mastodon-tl--clean-tabs-and-nl "mastodon-tl")
(autoload 'mastodon-tl--field "mastodon-tl")
(autoload 'mastodon-tl--find-property-range "mastodon-tl")
+(autoload 'mastodon-tl--find-property-range "mastodon-tl")
(autoload 'mastodon-tl--goto-next-toot "mastodon-tl")
(autoload 'mastodon-tl--property "mastodon-tl")
-(autoload 'mastodon-tl--find-property-range "mastodon-tl")
-(autoload 'mastodon-toot "mastodon")
-(autoload 'mastodon-http--post-media-attachment "mastodon-http")
-(autoload 'mastodon-http--read-file-as-string "mastodon-http")
-(autoload 'mastodon-tl--toot-id "mastodon-tl")
(autoload 'mastodon-tl--reload-timeline-or-profile "mastodon-tl")
-(autoload 'mastodon-search--search-accounts-query "mastodon-search")
+(autoload 'mastodon-tl--toot-id "mastodon-tl")
+(autoload 'mastodon-toot "mastodon")
(defgroup mastodon-toot nil
"Tooting in Mastodon."
@@ -70,7 +71,8 @@
(defcustom mastodon-toot--default-visibility "public"
"The default visibility for new toots.
-Must be one of \"public\", \"unlisted\", \"private\" (for followers-only), or \"direct\"."
+Must be one of \"public\", \"unlisted\", \"private\" (for
+followers-only), or \"direct\"."
:group 'mastodon-toot
:type '(choice
(const :tag "public" "public")
@@ -88,14 +90,17 @@ Must be one of \"public\", \"unlisted\", \"private\" (for followers-only), or \"
:group 'mastodon-toot
:type 'integer)
-(when (require 'company nil :noerror)
- (defcustom mastodon-toot--enable-completion-for-mentions "following"
- "Whether to enable company completion for mentions in toot compose buffer."
- :group 'mastodon-toot
- :type '(choice
- (const :tag "off" nil)
- (const :tag "following only" "following")
- (const :tag "all users" "all"))))
+(defcustom mastodon-toot--enable-completion-for-mentions (if (require 'company nil :noerror) "following" "off")
+ "Whether to enable company completion for mentions.
+
+Used for completion in toot compose buffer.
+
+This is only used if company mode is installed."
+ :group 'mastodon-toot
+ :type '(choice
+ (const :tag "off" nil)
+ (const :tag "following only" "following")
+ (const :tag "all users" "all")))
(defvar mastodon-toot--content-warning nil
"A flag whether the toot should be marked with a content warning.")