aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-07-06 16:53:03 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-07-06 16:53:03 +0200
commit150f4c34b85724a0dc389ce8a1e3bea52ddf1f39 (patch)
tree4d7345acf6ab3182315ee89aacc52ce55f2042bb
parentd9d3bb07a65ee6350a3272d589e8298436eb34fb (diff)
mastodon-tl--scroll-up-command
-rw-r--r--lisp/mastodon-tl.el9
-rw-r--r--lisp/mastodon.el1
2 files changed, 10 insertions, 0 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index f7f000b..44365bc 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -341,6 +341,15 @@ Optionally start from POS."
(mastodon-tl--message-help-echo))
(funcall refresh))))
+(defun mastodon-tl--scroll-up-command ()
+ "Call `scroll-up-command'.
+If we hit `point-max', call `mastodon-tl--more' then `scroll-up-command'."
+ (interactive)
+ (if (not (equal (point) (point-max)))
+ (scroll-up-command)
+ (mastodon-tl--more)
+ (scroll-up-command)))
+
(defun mastodon-tl--goto-next-toot ()
"Jump to next toot header."
(interactive)
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index bb316e9..8eac782 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -216,6 +216,7 @@ Use. e.g. \"%c\" for your locale's date and time format."
(define-key map (kbd "I") #'mastodon-views--view-filters)
(define-key map (kbd "G") #'mastodon-views--view-follow-suggestions)
(define-key map (kbd "X") #'mastodon-views--view-lists)
+ (define-key map (kbd "SPC") #'mastodon-tl--scroll-up-command)
map)
"Keymap for `mastodon-mode'.")