From cb985db2f37eabd76b9c2643387b4e94009b3f88 Mon Sep 17 00:00:00 2001 From: fap Date: Fri, 14 Apr 2017 23:57:38 +0200 Subject: Fixes #29 - Provide context menu for discover mode * provides a `discover.el` context menu through mode-hook * moves lambdas from keymap to functions so `discover-my-major` can pick them up --- lisp/mastodon-tl.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 2d2a588..19e6cd8 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -42,6 +42,27 @@ '((t (:foreground "cyan"))) "Mastodon user handle face.") +(defun mastodon-tl--get-federated-timeline () + "Opens federated timeline." + (interactive) + (mastodon-tl--get "public")) + +(defun mastodon-tl--get-home-timeline () + "Opens home timeline." + (interactive) + (mastodon-tl--get "home")) + +(defun mastodon-tl--get-local-timeline () + "Opens local timeline." + (interactive) + (mastodon-tl--get "public?local=true")) + +(defun mastodon-tl--get-tag-timeline () + "Prompts for tag and opens its timeline." + (interactive) + (let ((tag (read-string "Tag: "))) + (mastodon-tl--get (concat "tag/" tag)))) + (defun mastodon-tl--from-toot (key toot) "Return value for KEY in TOOT." (cdr (assoc key toot))) -- cgit v1.2.3