diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-15 22:22:47 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-15 22:23:10 +0200 |
commit | 4d896d56eb92b7652c751a1adf44daf5c22a2f21 (patch) | |
tree | 0adcae4dac5b7b3fa14f9fbaf2bf1bb9646e40d6 /lisp/mastodon-views.el | |
parent | 11dc0b2c6130866eaa9bb83386f948a087f5e9f2 (diff) |
comments in views-print-json-jeys
Diffstat (limited to 'lisp/mastodon-views.el')
-rw-r--r-- | lisp/mastodon-views.el | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index c86884f..d23626a 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -810,16 +810,14 @@ IND is the optional indentation level to print at." (while response (let ((el (pop response))) (cond - ;; vector of alists (fields, instance rules): - ((and (vectorp (cdr el)) + ((and (vectorp (cdr el)) ; vector of alists (fields, instance rules): (not (seq-empty-p (cdr el))) (consp (seq-elt (cdr el) 0))) (insert (mastodon-views--format-key el pad) "\n\n") (seq-do #'mastodon-views--print-instance-rules-or-fields (cdr el)) (insert "\n")) - ;; vector of strings (media types): - ((and (vectorp (cdr el)) + ((and (vectorp (cdr el)) ; vector of strings (media types): (not (seq-empty-p (cdr el))) (< 1 (seq-length (cdr el))) (stringp (seq-elt (cdr el) 0))) @@ -830,15 +828,13 @@ IND is the optional indentation level to print at." (lambda (x) (concat x ", ")) (cdr el) 'string) "\n\n")) - ;; basic nesting: - ((consp (cdr el)) + ((consp (cdr el)) ; basic nesting: (when ind (indent-to ind)) (insert (mastodon-views--format-key el pad) "\n\n") (mastodon-views--print-json-keys (cdr el) (if ind (+ ind 4) 4))) - (t - ;; basic handling of raw booleans: + (t ; basic handling of raw booleans: (let ((val (cond ((equal (cdr el) ':json-false) "no") ((equal (cdr el) 't) |