diff options
author | Holger Dürer <me@hdurer.net> | 2021-11-01 12:28:32 +0100 |
---|---|---|
committer | Holger Dürer <me@hdurer.net> | 2021-11-01 14:31:26 +0100 |
commit | d7593a06912b7946d2fb318093ec7e27c64b3be7 (patch) | |
tree | 6efc758297a927434861e66c913d1b8b5aa19c60 /lisp/mastodon-async.el | |
parent | 04465567450d6fc9cdec1a1ba0ef12557b0ab54b (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-async.el')
-rw-r--r-- | lisp/mastodon-async.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/mastodon-async.el b/lisp/mastodon-async.el index 6a421d1..56dc230 100644 --- a/lisp/mastodon-async.el +++ b/lisp/mastodon-async.el @@ -30,8 +30,14 @@ ;;; Code: (require 'json) +(require 'url-http) +(autoload 'mastodon-auth--access-token "mastodon-auth") +(autoload 'mastodon-http--api "mastodon-http") +(autoload 'mastodon-http--get-json "mastodon-http") +(autoload 'mastodon-mode "mastodon") (autoload 'mastodon-notifications--timeline "mastodon-notifications") +(autoload 'mastodon-tl--timeline "mastodon-tl") (defgroup mastodon-async nil "An async module for mastodon streams." @@ -129,7 +135,9 @@ Then start an async stream at ENDPOINT filtering toots using FILTER. TIMELINE is a specific target, such as federated or home. -NAME is the center portion of the buffer name for *mastodon-async-buffer and *mastodon-async-queue." +NAME is the center portion of the buffer name for +*mastodon-async-buffer and *mastodon-async-queue." + (ignore timeline) ;; TODO: figure out what this is meant to be used for (let ((buffer (mastodon-async--start-process endpoint filter name))) (with-current-buffer buffer @@ -238,7 +246,9 @@ Filter the toots using FILTER." (async-buffer (mastodon-async--setup-buffer "" (or name stream) endpoint)) (http-buffer (mastodon-async--get (mastodon-http--api stream) - (lambda (status) (message "HTTP SOURCE CLOSED"))))) + (lambda (status) + (ignore status) + (message "HTTP SOURCE CLOSED"))))) (mastodon-async--setup-http http-buffer (or name stream)) (mastodon-async--set-http-buffer async-buffer http-buffer) (mastodon-async--set-http-buffer async-queue http-buffer) |