From c18f3391b26a16c5a1bc7568cfd06a8ce6367c67 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 10 Aug 2022 15:00:53 +0200 Subject: remove commented code in profile--fields-insert --- lisp/mastodon-profile.el | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 260c2d3..cfea26c 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -253,37 +253,25 @@ JSON is the data returned by the server." (defun mastodon-profile--fields-get (account) "Fetch the fields vector (aka profile metadata) from profile of ACCOUNT. - Returns a list of lists." (let ((fields (mastodon-profile--account-field account 'fields))) (when fields - (mapcar - (lambda (el) - (list - (alist-get 'name el) - (alist-get 'value el))) - fields)))) + (mapcar (lambda (el) + (list (alist-get 'name el) + (alist-get 'value el))) + fields)))) (defun mastodon-profile--fields-insert (fields) "Format and insert field pairs (a.k.a profile metadata) in FIELDS." (let* ((car-fields (mapcar 'car fields)) - ;; (cdr-fields (mapcar 'cadr fields)) - ;; (cdr-fields-rendered - ;; (list - ;; (mapcar (lambda (x) - ;; (mastodon-tl--render-text x nil)) - ;; cdr-fields))) (left-width (car (sort (mapcar 'length car-fields) '>)))) - ;; (right-width (car (sort (mapcar 'length cdr-fields) '>)))) (mapconcat (lambda (field) (mastodon-tl--render-text (concat (format "_ %s " (car field)) (make-string (- (+ 1 left-width) (length (car field))) ?_) (format " :: %s" (cadr field))) - ;; (make-string (- (+ 1 right-width) (length (cdr field))) ?_) - ;; " |") - field)) ; nil)) ; hack to make links tabstops + field)) ; hack to make links tabstops fields ""))) (defun mastodon-profile--get-statuses-pinned (account) -- cgit v1.2.3