diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-12 11:36:12 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-12 11:36:12 +0200 |
commit | 156ee6ea522f3c6eb23ae8a78e210d0da88d3f7a (patch) | |
tree | e78e7b2d084e885f936bbea6c10c4fbadd04f514 /lisp | |
parent | 6d05cf81ff5a84aa12735aeab2ac99a083c15033 (diff) |
follow-tag: use tag at point by default
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-tl.el | 6 |
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 |