emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/mastodon 3eb1c4f794 41/63: --thread: diff name for option


From: ELPA Syncer
Subject: [nongnu] elpa/mastodon 3eb1c4f794 41/63: --thread: diff name for option arg to avoid macro var
Date: Sun, 4 Aug 2024 04:00:35 -0400 (EDT)

branch: elpa/mastodon
commit 3eb1c4f794edcf582c2eed7e2857f1ee01a5c107
Author: marty hiatt <martianhiatus@riseup.net>
Commit: marty hiatt <martianhiatus@riseup.net>

    --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 17f7ae5c62..d3a11ed600 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]