From 4eaab0252c154ba4651125b7984d36a7474179ff Mon Sep 17 00:00:00 2001 From: H Durer Date: Fri, 30 Mar 2018 04:59:34 +0100 Subject: More profile work (#193) * Add an alternative approach to user profile opening. This way asks the user in the minibuffer for the handle and offering completion for all user handles in the current status but allowing the user to also enter any other handle to browse whichever account they wish. This also cleans up some compiler warnings about profile code. * Create a new minor mode for mastodon profile pages. There we override the 'f' and 'F' keys to show following and followers respectively. Those pages now look very similar to the regular profile page (with a header). --- lisp/mastodon.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index c71623c..d608887 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -44,13 +44,14 @@ (autoload 'mastodon-tl--thread "mastodon-tl") (autoload 'mastodon-tl--toggle-spoiler-text-in-toot "mastodon-tl") (autoload 'mastodon-tl--update "mastodon-tl") +(autoload 'mastodon-notifications--get "mastodon-notifications") +(autoload 'mastodon-profile--get-toot-author "mastodon-profile") +(autoload 'mastodon-profile--make-author-buffer "mastodon-profile") +(autoload 'mastodon-profile--show-user "mastodon-profile") (autoload 'mastodon-toot--compose-buffer "mastodon-toot") (autoload 'mastodon-toot--reply "mastodon-toot") (autoload 'mastodon-toot--toggle-boost "mastodon-toot") (autoload 'mastodon-toot--toggle-favourite "mastodon-toot") -(autoload 'mastodon-profile--get-next-author "mastodon-profile") -(autoload 'mastodon-notifications--get "mastodon-notifications") -(autoload 'mastodon-profile--make-author-buffer "mastodon-profile") (defgroup mastodon nil "Interface with Mastodon." @@ -85,6 +86,7 @@ Use. e.g. \"%c\" for your locale's date and time format." ;; Navigating to other buffers: (define-key map (kbd "N") #'mastodon-notifications--get) (define-key map (kbd "U") #'mastodon-profile--get-toot-author) + (define-key map (kbd "P") #'mastodon-profile--show-user) (define-key map (kbd "F") #'mastodon-tl--get-federated-timeline) (define-key map (kbd "H") #'mastodon-tl--get-home-timeline) (define-key map (kbd "L") #'mastodon-tl--get-local-timeline) -- cgit v1.2.3