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-auth.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-auth.el')
-rw-r--r-- | lisp/mastodon-auth.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/mastodon-auth.el b/lisp/mastodon-auth.el index 0b0c703..b22b51e 100644 --- a/lisp/mastodon-auth.el +++ b/lisp/mastodon-auth.el @@ -63,7 +63,10 @@ if you are happy with unencryped storage use e.g. \"~/authinfo\"." (defun mastodon-auth--generate-token () "Make POST to generate auth token. -If no auth-sources file, runs `mastodon-auth--generate-token-no-storing-credentials'. If auth-sources file exists, runs `mastodon-auth--generate-token-and-store'." +If no auth-sources file, runs +`mastodon-auth--generate-token-no-storing-credentials'. If +auth-sources file exists, runs +`mastodon-auth--generate-token-and-store'." (if (or (null mastodon-auth-source-file) (string= "" mastodon-auth-source-file)) (mastodon-auth--generate-token-no-storing-credentials) @@ -124,9 +127,13 @@ Reads and/or stores secrets in `MASTODON-AUTH-SOURCE-FILE'." (json-read-from-string json-string)))) (defun mastodon-auth--access-token () - "If an access token for `mastodon-instance-url' is in `mastodon-auth--token-alist', return it. + "Return exiting or generate new access token. -Otherwise, generate a token and pass it to `mastodon-auth--handle-token-reponse'." +If an access token for `mastodon-instance-url' is in +`mastodon-auth--token-alist', return it. + +Otherwise, generate a token and pass it to +`mastodon-auth--handle-token-reponse'." (if-let ((token (cdr (assoc mastodon-instance-url mastodon-auth--token-alist)))) token |