Last active
December 6, 2022 01:11
-
-
Save imarko/eec3398b407b04552f2521e880e06127 to your computer and use it in GitHub Desktop.
some mastodon.el utility functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-mastodon-kill-buffers () | |
"Kill all mastodon buffers." | |
(interactive) | |
(dolist (buffer (buffer-list)) | |
(let ((mode (buffer-local-value 'major-mode buffer))) | |
(when (string-equal mode "mastodon-mode") | |
(kill-buffer buffer))))) | |
(defun my-mastodon-tl-scroll-up () | |
"Scroll mastodon timeline up, refreshing if needed." | |
(interactive) | |
(condition-case nil | |
(scroll-up) | |
(end-of-buffer | |
(mastodon-tl--more)))) | |
(defun my-mastodon-tl-scroll-down () | |
"Scroll mastodon timeline down, refreshing if needed." | |
(interactive) | |
(condition-case nil | |
(scroll-down) | |
(beginning-of-buffer | |
(mastodon-tl--update)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment