aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-views.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-06 14:46:34 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-06 14:46:34 +0200
commit5970c9de908fbb8009de86a2371578de231b3cee (patch)
tree3c91818739b26a2533712104d71eff628fad821a /lisp/mastodon-views.el
parent4a4eaa48557c50c393af2a0b499023fad4474a24 (diff)
Revert "updates to with-mastodon-buffer macro"
This reverts commit 59e5e3ece54bcac36d9debad392bff25a31438b5.
Diffstat (limited to 'lisp/mastodon-views.el')
-rw-r--r--lisp/mastodon-views.el45
1 files changed, 24 insertions, 21 deletions
diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el
index 8585bb0..7481fc3 100644
--- a/lisp/mastodon-views.el
+++ b/lisp/mastodon-views.el
@@ -799,27 +799,30 @@ INSTANCE is the instance were are working with."
(let* ((domain (url-file-nondirectory instance))
(buf (get-buffer-create
(format "*mastodon-instance-%s*" domain))))
- (with-mastodon-buffer
- buf #'special-mode :other-window
- (when brief
- (setq response
- (list (assoc 'uri response)
- (assoc 'title response)
- (assoc 'short_description response)
- (assoc 'email response)
- (cons 'contact_account
- (list
- (assoc 'username
- (assoc 'contact_account response))))
- (assoc 'rules response)
- (assoc 'stats response))))
- (mastodon-views--print-json-keys response)
- ;; (mastodon-mode) ; breaks our 'q' binding that avoids leaving
- ;; split window
- (mastodon-tl--set-buffer-spec (buffer-name buf)
- "instance"
- nil)
- (goto-char (point-min))))))
+ (with-current-buffer buf
+ (switch-to-buffer-other-window buf)
+ (let ((inhibit-read-only t))
+ (erase-buffer)
+ (special-mode)
+ (when brief
+ (setq response
+ (list (assoc 'uri response)
+ (assoc 'title response)
+ (assoc 'short_description response)
+ (assoc 'email response)
+ (cons 'contact_account
+ (list
+ (assoc 'username
+ (assoc 'contact_account response))))
+ (assoc 'rules response)
+ (assoc 'stats response))))
+ (mastodon-views--print-json-keys response)
+ ;; (mastodon-mode) ; breaks our 'q' binding that avoids leaving
+ ;; split window
+ (mastodon-tl--set-buffer-spec (buffer-name buf)
+ "instance"
+ nil)
+ (goto-char (point-min)))))))
(defun mastodon-views--format-key (el pad)
"Format a key of element EL, a cons, with PAD padding."