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 16:00:00 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-06 16:00:00 +0200
commitaa6e9c55152ac1301efbdbdce9aa7fc3e8fea7c9 (patch)
tree84f82b715928eed39d22e2534b6ccd94af5fdfae /lisp/mastodon-views.el
parent9bada1a9e3fe2e6a8691e17c697ac56d96eca359 (diff)
eval-when-compile for with-mastodon-buffer, and re-indent
Diffstat (limited to 'lisp/mastodon-views.el')
-rw-r--r--lisp/mastodon-views.el43
1 files changed, 22 insertions, 21 deletions
diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el
index 8585bb0..51e4bd6 100644
--- a/lisp/mastodon-views.el
+++ b/lisp/mastodon-views.el
@@ -36,6 +36,8 @@
(require 'cl-lib)
(require 'mastodon-http)
+(eval-when-compile
+ (require 'mastodon-tl))
(defvar mastodon-mode-map)
(defvar mastodon-tl--horiz-bar)
@@ -799,27 +801,26 @@ 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-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))))))
(defun mastodon-views--format-key (el pad)
"Format a key of element EL, a cons, with PAD padding."