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

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

[nongnu] elpa/hyperdrive b7c462c17a 008/123: Change: (hyperdrive--format


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive b7c462c17a 008/123: Change: (hyperdrive--format-hyperdrive) Allow specifying formats
Date: Fri, 6 Oct 2023 01:00:57 -0400 (EDT)

branch: elpa/hyperdrive
commit b7c462c17ac2e0ea817f6d0d157a7f10d961d15d
Author: Adam Porter <adam@alphapapa.net>
Commit: Joseph Turner <joseph@ushin.org>

    Change: (hyperdrive--format-hyperdrive) Allow specifying formats
---
 hyperdrive-lib.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index d5b5092b66..a84e154120 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1053,11 +1053,14 @@ case, when PREDICATE, only offer hyperdrives matching 
it."
         (or (alist-get selected candidates nil nil #'equal)
             (hyperdrive-user-error "No such hyperdrive.  Use `hyperdrive-new' 
to create a new one"))))))
 
-(cl-defun hyperdrive--format-hyperdrive (hyperdrive)
-  "Return HYPERDRIVE formatted for completion."
+(cl-defun hyperdrive--format-hyperdrive
+    (hyperdrive &key (formats '(petname nickname domain seed short-key)) 
(with-label t))
+  "Return HYPERDRIVE formatted for completion.
+For each of FORMATS, concats the value separated by two spaces,
+optionally WITH-LABEL."
   (string-trim
-   (cl-loop for format in '(petname nickname domain seed short-key)
-            when (hyperdrive--format-host hyperdrive :format (list format) 
:with-label t)
+   (cl-loop for format in formats
+            when (hyperdrive--format-host hyperdrive :format format 
:with-label with-label)
             concat (concat it "  "))))
 
 (cl-defun hyperdrive-read-entry (&key predicate default-path (allow-version-p 
t) force-prompt)



reply via email to

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