aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-12 11:36:12 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-12 11:36:12 +0200
commit156ee6ea522f3c6eb23ae8a78e210d0da88d3f7a (patch)
treee78e7b2d084e885f936bbea6c10c4fbadd04f514 /lisp
parent6d05cf81ff5a84aa12735aeab2ac99a083c15033 (diff)
follow-tag: use tag at point by default
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 1ddc708..bcbb7e3 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -2020,7 +2020,11 @@ ARGS is an alist of any parameters to send with the request."
"Prompt for a tag and follow it.
If TAG provided, follow it."
(interactive)
- (let* ((tag (or tag (read-string "Tag to follow: ")))
+ (let* ((tag-at-point
+ (when (eq 'hashtag (get-text-property (point) 'mastodon-tab-stop))
+ (get-text-property (point) 'mastodon-tag)))
+ (tag (or tag (read-string (format "Tag to follow [%s]: " tag-at-point)
+ nil nil tag-at-point)))
(url (mastodon-http--api (format "tags/%s/follow" tag)))
(response (mastodon-http--post url)))
(mastodon-http--triage response