aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-05-13 20:25:41 +0200
committermousebot <mousebot@riseup.net>2021-05-13 20:25:41 +0200
commite53bf8fe17bdf3d750f07075cb9d59ca7f5e97ee (patch)
tree9571962f402dcb650e047cffb00adec603717f3d /lisp
parenta90fa1c483eaf9fa10ffc21f6bcf5ed18cb7eea1 (diff)
copy url of toot at point
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el3
-rw-r--r--lisp/mastodon.el2
2 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 81c2d4b..de64e1b 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -812,8 +812,7 @@ webapp"
"Copy URL of toot at point."
(interactive)
(let* ((toot (mastodon-tl--property 'toot-json))
- (boosted (mastodon-tl--field 'reblog toot))
- (url (if boosted
+ (url (if (mastodon-tl--field 'reblog toot)
(cdr (assoc 'url (cdr (assoc 'reblog toot))))
(cdr (assoc 'url toot)))))
(kill-new url)
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 512b345..accbed8 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -54,6 +54,7 @@
(autoload 'mastodon-toot--toggle-favourite "mastodon-toot")
(autoload 'mastodon-discover "mastodon-discover")
(autoload 'mastodon-search--search-query "mastodon-search")
+(autoload 'mastodon-tl--copy-toot-url "mastodon-tl")
(defgroup mastodon nil
"Interface with Mastodon."
@@ -117,6 +118,7 @@ Use. e.g. \"%c\" for your locale's date and time format."
(define-key map (kbd "C-S-M") #'mastodon-tl--unmute-user)
(define-key map (kbd "C-S-P") #'mastodon-profile--my-profile)
(define-key map (kbd "S") #'mastodon-search--search-query)
+ (define-key map (kbd "C") #'mastodon-tl--copy-toot-url)
map)
"Keymap for `mastodon-mode'.")