diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-01-16 07:59:30 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-01-16 07:59:30 +0100 |
commit | 78eb53aacb42480a2b387b76ca90946b114985d3 (patch) | |
tree | ee1bf44dd79a34d6c3fd479b32ed5d88c6c0f147 /lisp | |
parent | 971bd61295d75982184cb834adecfde114983d41 (diff) |
buffer-spec for toot-edits history and add check to get-buffer-type
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-tl.el | 4 | ||||
-rw-r--r-- | lisp/mastodon-toot.el | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 96aaf4b..e01d3a7 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1474,7 +1474,9 @@ Should work in all mastodon buffers." 'scheduled-statuses) ;; instance description ((string= "instance" endpoint-fun) - 'instance-description)))) + 'instance-description) + ((string= "*mastodon-toot-edits*" buffer-name-fun) + 'toot-edits)))) (defun mastodon-tl--has-toots-p () "Return non-nil if the current buffer contains toots. diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 177cfdc..2241805 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -815,7 +815,8 @@ instance to edit a toot." (defun mastodon-toot--view-toot-edits () "View editing history of the toot at point in a popup buffer." (interactive) - (let ((history (mastodon-tl--property 'edit-history))) + (let ((id (mastodon-tl--property 'base-toot-id)) + (history (mastodon-tl--property 'edit-history))) (with-current-buffer (get-buffer-create "*mastodon-toot-edits*") (let ((inhibit-read-only t)) (special-mode) @@ -836,7 +837,10 @@ instance to edit a toot." (format "Edits to toot by %s:" (alist-get 'username (alist-get 'account (car history)))) - 'face font-lock-comment-face)))))) + 'face font-lock-comment-face)) + (mastodon-tl--set-buffer-spec (buffer-name (current-buffer)) + (format "statuses/%s/history" id) + nil))))) (defun mastodon-toot--insert-toot-iter (it) "Insert iteration IT of toot." |