aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-09-01 17:03:47 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-09-01 17:38:48 +0200
commit6d3e9cf18a74045e17f8e5c1fc6e20a8c40f497f (patch)
tree177e83c0b319deef831e8ad03872d97948c4a043 /lisp
parentd50e1324f5476a7bf84cbf0b8307e6a283cdbb10 (diff)
cl-reduce for metadata fields format
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-profile.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 25edfba..aa5ec2e 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -34,6 +34,7 @@
;;; Code:
(require 'seq)
+(require 'cl-lib)
(autoload 'mastodon-http--api "mastodon-http.el")
(autoload 'mastodon-http--get-json "mastodon-http.el")
@@ -344,7 +345,8 @@ Returns a list of lists."
(defun mastodon-profile--fields-insert (fields)
"Format and insert field pairs (a.k.a profile metadata) in FIELDS."
(let* ((car-fields (mapcar 'car fields))
- (left-width (car (sort (mapcar 'length car-fields) '>))))
+ (left-width (cl-reduce
+ #'max (mapcar 'length car-fields))))
(mapconcat (lambda (field)
(mastodon-tl--render-text
(concat