From 35a896aaf700e68f92883e93ce4cc4c3d1196ae6 Mon Sep 17 00:00:00 2001 From: Johnson Denen Date: Tue, 18 Apr 2017 09:17:25 -0400 Subject: Rename mastodon-toot--property and move to tl feature --- lisp/mastodon-tl.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 9d2009d..a76aa1a 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -145,11 +145,17 @@ (number-to-string id))))) (mastodon-http--get-json url))) +(defun mastodon-tl--property (prop) + "Get property PROP for toot at point." + (or (get-text-property (point) prop) + (progn + (mastodon-tl--goto-next-toot) + (get-text-property (point) prop)))) + (defun mastodon-tl--newest-id () "Return toot-id from the top of the buffer." (goto-char (point-min)) - (mastodon-tl--goto-next-toot) - (get-text-property (point) 'toot-id)) + (mastodon-tl--property 'toot-id)) (defun mastodon-tl--update () "Update timeline with new toots." -- cgit v1.2.3