diff options
Diffstat (limited to 'lisp/mastodon.el')
-rw-r--r-- | lisp/mastodon.el | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lisp/mastodon.el b/lisp/mastodon.el index cd7dd8e..1c3136c 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -203,7 +203,10 @@ Use. e.g. \"%c\" for your locale's date and time format." (define-key map (kbd "e") #'mastodon-toot--edit-toot-at-point) (define-key map (kbd "E") #'mastodon-toot--view-toot-edits) (when (require 'lingva nil :no-error) - (define-key map (kbd "s") #'mastodon-toot--translate-toot-text)) + (define-key map (kbd "a") #'mastodon-toot--translate-toot-text)) + (define-key map (kbd "s") #'mastodon-tl--view-scheduled-toots) + (define-key map (kbd "M-C-q") #'mastodon-kill-all-buffers) + (define-key map (kbd ";") #'mastodon-tl--view-instance-description) map) "Keymap for `mastodon-mode'.") @@ -345,6 +348,20 @@ not, just browse the URL in the normal fashion." (string-match "^/[[:alpha:]]+$" query) (string-match "^/u/[[:alpha:]]+$" query))))) +(defun mastodon-live-buffers () + "Return a list of open mastodon buffers. +Calls `mastodon-tl--get-buffer-type', which see." + (cl-loop for x in (buffer-list) + when (with-current-buffer x (mastodon-tl--get-buffer-type)) + collect (get-buffer x))) + +(defun mastodon-kill-all-buffers () + "Kill any and all open mastodon buffers, hopefully." + (interactive) + (let ((mastodon-buffers (mastodon-live-buffers))) + (cl-loop for x in mastodon-buffers + do (kill-buffer x)))) + ;;;###autoload (add-hook 'mastodon-mode-hook (lambda () (when (require 'emojify nil :noerror) |