aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-discover.el1
-rw-r--r--lisp/mastodon-toot.el5
-rw-r--r--lisp/mastodon.el1
3 files changed, 7 insertions, 0 deletions
diff --git a/lisp/mastodon-discover.el b/lisp/mastodon-discover.el
index 715954f..c34d85f 100644
--- a/lisp/mastodon-discover.el
+++ b/lisp/mastodon-discover.el
@@ -65,6 +65,7 @@
("t" "New toot" mastodon-toot)
("r" "Reply" mastodon-toot--reply)
("C" "Copy toot URL" mastodon-toot--copy-toot-url)
+ ("o" "Open toot URL" mastodon-toot--open-toot-url)
("d" "Delete (your) toot" mastodon-toot--delete-toot)
("D" "Delete and redraft (your) toot" mastodon-toot--delete-toot)
("e" "Edit (your) toot" mastodon-toot--edit-toot-at-point)
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 6febec7..bffa20e 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -517,6 +517,11 @@ base toot."
(kill-new url)
(message "Toot URL copied to the clipboard.")))
+(defun mastodon-toot--open-toot-url ()
+ "Open URL of toot at point."
+ (interactive)
+ (browse-url (mastodon-toot--toot-url)))
+
(defun mastodon-toot--toot-url ()
"Return the URL of the base toot at point."
(let* ((toot (or (mastodon-tl--property 'base-toot)
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 51fe6a5..9dac1d1 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -184,6 +184,7 @@ Use. e.g. \"%c\" for your locale's date and time format."
(define-key map (kbd "k") #'mastodon-toot--toggle-bookmark)
(define-key map (kbd "r") #'mastodon-toot--reply)
(define-key map (kbd "C") #'mastodon-toot--copy-toot-url)
+ (define-key map (kbd "o") #'mastodon-toot--open-toot-url)
(define-key map (kbd "v") #'mastodon-tl--poll-vote)
(define-key map (kbd "E") #'mastodon-toot--view-toot-edits)
(define-key map (kbd "T") #'mastodon-tl--thread)