diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-10-13 18:57:45 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-10-13 22:34:37 +0200 |
commit | f7526642d302ea504f4be2e7dcb5846ecb764ccb (patch) | |
tree | d19d3bc4032b9034667c55feca096974500c18db /lisp | |
parent | fedba9ed92ed2b4adb12054910bef97f35a15a2a (diff) |
add fun mastodon-buffer-p
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon.el | 5 |
1 files changed, 5 insertions, 0 deletions
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) |