diff options
author | Holger Dürer <me@hdurer.net> | 2021-11-05 18:33:16 +0100 |
---|---|---|
committer | Holger Dürer <me@hdurer.net> | 2021-11-06 16:15:34 +0100 |
commit | 65f80fd810793638beb6f146b25919bca5c21cfc (patch) | |
tree | 6489b585e2f9bdd69b9febfb4bf737d8b96356ff /lisp/mastodon-async.el | |
parent | f67114cc6c5c167db7327b6b965839236e0466aa (diff) |
Do a bit if `if` and `progn` sanitizing.
- A `progn` with a single form is redundant
- `when` doesn't need a `progn` body
- `if` has an implicit `progn` for the consequences
- I converted one cascade of `if`s into a `cond`.
Diffstat (limited to 'lisp/mastodon-async.el')
-rw-r--r-- | lisp/mastodon-async.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/mastodon-async.el b/lisp/mastodon-async.el index 1fee9ef..524e13d 100644 --- a/lisp/mastodon-async.el +++ b/lisp/mastodon-async.el @@ -205,9 +205,10 @@ ENPOINT is the endpoint for the stream and timeline." mastodon-instance-url "*")) ;; if user stream, we need "timelines/home" not "timelines/user" ;; if notifs, we need "notifications" not "timelines/notifications" - (endpoint (if (equal name "notifications") "notifications" - (if (equal name "home") "timelines/home" - (format "timelines/%s" endpoint))))) + (endpoint (cond + ((equal name "notifications") "notifications") + ((equal name "home") "timelines/home") + (t (format "timelines/%s" endpoint))))) (mastodon-async--set-local-variables buffer-name http-buffer buffer-name queue-name) ;; Similar to timeline init. |