emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/hyperdrive 6bd2ae7036 07/31: Chore: Begin format-spec's FO


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 6bd2ae7036 07/31: Chore: Begin format-spec's FORMAT and SPECIFICATION on new lines
Date: Fri, 1 Dec 2023 01:00:38 -0500 (EST)

branch: elpa/hyperdrive
commit 6bd2ae70364534c4dbe7c77fd6699697b304df20
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Joseph Turner <joseph@ushin.org>

    Chore: Begin format-spec's FORMAT and SPECIFICATION on new lines
    
    Often this is enough to shorten long lines inside the arguments, and
    tends to look much cleaner than having to split long lines within the
    arguments or having to live with long lines.
---
 hyperdrive-lib.el | 54 ++++++++++++++++++++++++++++--------------------------
 1 file changed, 28 insertions(+), 26 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index d72d41d629..72d27cfa9a 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -983,32 +983,34 @@ according to FORMATS, by default `hyperdrive-formats', 
which see."
                       (format (alist-get format formats)
                               (propertize value 'face face))
                     "")))
-      (format-spec format
-                   ;; TODO(deprecate-28): Use lambdas in each specifier.
-                   `((?H . ,(and (string-match-p (rx "%"
-                                                     ;; Flags
-                                                     (optional (1+ (or " " "0" 
"-" "<" ">" "^" "_")))
-                                                     (0+ digit) ;; Width
-                                                     (0+ digit) ;; Precision
-                                                     "H")
-                                                 format)
-                                 ;; HACK: Once using lambdas in this specifier,
-                                 ;; remove the `string-match-p' check.
-                                 (h//preferred-format hyperdrive)))
-                     (?P . ,(fmt 'petname petname 'h/petname))
-                     (?N . ,(fmt 'nickname nickname 'h/nickname))
-                     (?k . ,(fmt 'short-key public-key 'h/public-key))
-                     (?K . ,(fmt 'public-key public-key 'h/public-key))
-                     (?S . ,(fmt 'seed seed 'h/seed))
-                     (?D . ,(if (car domains)
-                                (format (alist-get 'domains formats)
-                                        (string-join
-                                         (mapcar (lambda (domain)
-                                                   (propertize domain
-                                                               'face 
'h/domain))
-                                                 domains)
-                                         ","))
-                              "")))))))
+      (format-spec
+       format
+       ;; TODO(deprecate-28): Use lambdas in each specifier.
+       `((?H . ,(and (string-match-p (rx "%"
+                                         ;; Flags
+                                         (optional
+                                          (1+ (or " " "0" "-" "<" ">" "^" 
"_")))
+                                         (0+ digit) ;; Width
+                                         (0+ digit) ;; Precision
+                                         "H")
+                                     format)
+                     ;; HACK: Once using lambdas in this specifier,
+                     ;; remove the `string-match-p' check.
+                     (h//preferred-format hyperdrive)))
+         (?P . ,(fmt 'petname petname 'h/petname))
+         (?N . ,(fmt 'nickname nickname 'h/nickname))
+         (?k . ,(fmt 'short-key public-key 'h/public-key))
+         (?K . ,(fmt 'public-key public-key 'h/public-key))
+         (?S . ,(fmt 'seed seed 'h/seed))
+         (?D . ,(if (car domains)
+                    (format (alist-get 'domains formats)
+                            (string-join
+                             (mapcar (lambda (domain)
+                                       (propertize domain
+                                                   'face 'h/domain))
+                                     domains)
+                             ","))
+                  "")))))))
 
 (defun h//preferred-format (hyperdrive &optional format formats)
   "Return HYPERDRIVE's formatted hostname, or nil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]