From 3eb1c4f794edcf582c2eed7e2857f1ee01a5c107 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 30 Jul 2024 13:39:14 +0200 Subject: --thread: diff name for option arg to avoid macro var --- lisp/mastodon-tl.el | 9 ++++++--- 1 file 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 -- cgit v1.2.3