aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2022-02-07 20:42:22 +0100
committermousebot <mousebot@riseup.net>2022-02-07 20:42:22 +0100
commit918d34782ae3dba7a891825104affa0160b61b2c (patch)
tree6b9145cfe49002b1056be33184715b7f18ea76ca
parentaa6044e06b1a5bb332ac565528adc87bc19c8d42 (diff)
fix go to first toot on thread load
-rw-r--r--lisp/mastodon-tl.el30
1 files changed, 15 insertions, 15 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 84df69f..67047a3 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -962,7 +962,6 @@ webapp"
(reblog (alist-get 'reblog json)))
(if reblog (alist-get 'id reblog) id)))
-
(defun mastodon-tl--thread ()
"Open thread buffer for toot under `point'."
(interactive)
@@ -977,20 +976,21 @@ webapp"
(if (> (+ (length (alist-get 'ancestors context))
(length (alist-get 'descendants context)))
0)
- (with-output-to-temp-buffer buffer
- (switch-to-buffer buffer)
- (mastodon-mode)
- (setq mastodon-tl--buffer-spec
- `(buffer-name ,buffer
- endpoint ,(format "statuses/%s/context" id)
- update-function
- (lambda(toot) (message "END of thread."))))
- (let ((inhibit-read-only t))
- (mastodon-tl--timeline (vconcat
- (alist-get 'ancestors context)
- `(,toot)
- (alist-get 'descendants context)))
- (mastodon-tl--goto-next-toot)))
+ (progn
+ (with-output-to-temp-buffer buffer
+ (switch-to-buffer buffer)
+ (mastodon-mode)
+ (setq mastodon-tl--buffer-spec
+ `(buffer-name ,buffer
+ endpoint ,(format "statuses/%s/context" id)
+ update-function
+ (lambda (toot) (message "END of thread."))))
+ (let ((inhibit-read-only t))
+ (mastodon-tl--timeline (vconcat
+ (alist-get 'ancestors context)
+ `(,toot)
+ (alist-get 'descendants context)))))
+ (mastodon-tl--goto-next-toot))
(message "No Thread!"))))
(defun mastodon-tl--create-filter (word contexts)