diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-04 09:12:23 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-04 09:18:16 +0200 |
commit | 59e5e3ece54bcac36d9debad392bff25a31438b5 (patch) | |
tree | 8db6eb8de522a0d56c75b1bcb1f482a1fa4b93cb /lisp/mastodon-profile.el | |
parent | 51f8b782ac6721939e20eca459fe88eb4304857c (diff) |
updates to with-mastodon-buffer macro
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r-- | lisp/mastodon-profile.el | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index fe7d7d2..5bee7e9 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -494,22 +494,19 @@ This endpoint only holds a few preferences. For others, see (let* ((url (mastodon-http--api "preferences")) (response (mastodon-http--get-json url)) (buf (get-buffer-create "*mastodon-preferences*"))) - (with-current-buffer buf - (switch-to-buffer-other-window buf) - (erase-buffer) - (special-mode) - (mastodon-tl--set-buffer-spec (buffer-name buf) - "preferences" - nil) - (let ((inhibit-read-only t)) - (while response - (let ((el (pop response))) - (insert - (format "%-30s %s" - (prin1-to-string (car el)) - (prin1-to-string (cdr el))) - "\n\n")))) - (goto-char (point-min))))) + (with-mastodon-buffer + buf #'special-mode :other-window + (mastodon-tl--set-buffer-spec (buffer-name buf) + "preferences" + nil) + (while response + (let ((el (pop response))) + (insert + (format "%-30s %s" + (prin1-to-string (car el)) + (prin1-to-string (cdr el))) + "\n\n"))) + (goto-char (point-min))))) ;; PROFILE VIEW DETAILS @@ -607,7 +604,7 @@ HEADERS means also fetch link headers for pagination." (pinned (mastodon-profile--get-statuses-pinned account)) (joined (mastodon-profile--account-field account 'created_at))) (with-mastodon-buffer - buffer + buffer #'mastodon-mode nil (mastodon-profile-mode) (setq mastodon-profile--account account) (mastodon-tl--set-buffer-spec buffer |