From f7526642d302ea504f4be2e7dcb5846ecb764ccb Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 13 Oct 2023 18:57:45 +0200 Subject: add fun mastodon-buffer-p --- lisp/mastodon.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lisp') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 1e6674d..95ae338 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -405,6 +405,11 @@ Calls `mastodon-tl--get-buffer-type', which see." when (with-current-buffer x (mastodon-tl--get-buffer-type)) collect (get-buffer x))) +(defun mastodon-buffer-p (&optional buffer) + "Non-nil if BUFFER or `current-buffer' is a mastodon one." + (let ((buf (or buffer (current-buffer)))) + (member buf (mastodon-live-buffers)))) + (defun mastodon-kill-all-buffers () "Kill any and all open mastodon buffers, hopefully." (interactive) -- cgit v1.2.3