aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-07-30 13:39:14 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-07-30 13:39:14 +0200
commit3eb1c4f794edcf582c2eed7e2857f1ee01a5c107 (patch)
tree92840bab0d0b444c7ab98fedf97c4f0de7f4beb2
parentbc83b400b14240820a10606279709d8e5dfcdf9f (diff)
--thread: diff name for option arg to avoid macro var
-rw-r--r--lisp/mastodon-tl.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 17f7ae5..d3a11ed 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -2030,11 +2030,14 @@ view all branches of a thread."
(let ((id (mastodon-tl--property 'base-item-id)))
(mastodon-tl--thread id))))
-(defun mastodon-tl--thread (&optional id)
- "Open thread buffer for toot at point or with ID."
+(defun mastodon-tl--thread (&optional thread-id)
+ "Open thread buffer for toot at point or with THREAD-ID."
(interactive)
(mastodon-toot--with-toot-item
- (let* ((id (or id (mastodon-tl--property 'base-item-id :no-move)))
+ ;; this function's var must not be id as the above macro binds id and even
+ ;; if we provide the arg (e.g. url-lookup), the macro definition overrides
+ ;; it, making the optional arg unusable!
+ (let* ((id (or thread-id (mastodon-tl--property 'base-item-id :no-move)))
(type (mastodon-tl--field 'type (mastodon-tl--property 'item-json :no-move))))
(if (or (string= type "follow_request")
(string= type "follow")) ; no can thread these