From 51c2e36901fda077a438b311d7618e637bae3ee7 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 21 Nov 2022 11:31:39 +0100 Subject: autoload notifs--get, clean up buffer-name arg/handling in same --- lisp/mastodon-notifications.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon-notifications.el') diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index 62cdfe7..ae82b60 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -50,6 +50,7 @@ (autoload 'mastodon-http--get-params-async-json "mastodon-http.el") (autoload 'mastodon-profile--view-follow-requests "mastodon-profile.el") (autoload 'mastodon-tl--reload-timeline-or-profile "mastodon-tl") +(autoload 'mastodon-tl--update "mastodon-tl") (defvar mastodon-tl--buffer-spec) (defvar mastodon-tl--display-media-p) (defvar mastodon-mode-map) @@ -276,11 +277,13 @@ of the toot responded to." (mapc #'mastodon-notifications--by-type json) (goto-char (point-min)))) +;;;###autoload (defun mastodon-notifications--get (&optional type buffer-name) "Display NOTIFICATIONS in buffer. -Optionally only print notifications of type TYPE, a string." +Optionally only print notifications of type TYPE, a string. +BUFFER-NAME is added to \"*mastodon-\" to create the buffer name." (interactive) - (let ((buffer (or (concat "*mastodon-" buffer-name) + (let ((buffer (or (concat "*mastodon-" buffer-name "*") "*mastodon-notifications*"))) (if (get-buffer buffer) (progn (switch-to-buffer buffer) -- cgit v1.2.3