[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive f39cdae8f7 3/3: Tidy: (hyperdrive--format-hyper
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive f39cdae8f7 3/3: Tidy: (hyperdrive--format-hyperdrive) Remove let-bindings, use it |
Date: |
Fri, 8 Sep 2023 03:59:54 -0400 (EDT) |
branch: elpa/hyperdrive
commit f39cdae8f74e8f3710c309971763b24d65801343
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Tidy: (hyperdrive--format-hyperdrive) Remove let-bindings, use it
---
hyperdrive-lib.el | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index ed363e24e1..c643916aab 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -935,15 +935,10 @@ case, when PREDICATE, only offer hyperdrives matching it."
(cl-defun hyperdrive--format-hyperdrive (hyperdrive)
"Return HYPERDRIVE formatted for completion."
- (let ((petname (hyperdrive--format-host hyperdrive :format '(petname)
:with-label t))
- (nickname (hyperdrive--format-host hyperdrive :format '(nickname)
:with-label t))
- (domain (hyperdrive--format-host hyperdrive :format '(domain)
:with-label t))
- (seed (hyperdrive--format-host hyperdrive :format '(seed) :with-label
t))
- (short-key (hyperdrive--format-host hyperdrive :format '(short-key)
:with-label t)))
- (string-trim
- (cl-loop for value in (list petname nickname domain seed short-key)
- when value
- concat (concat value " ")))))
+ (string-trim
+ (cl-loop for format in '(petname nickname domain seed short-key)
+ when (hyperdrive--format-host hyperdrive :format (list format)
:with-label t)
+ concat (concat it " "))))
(cl-defun hyperdrive-read-entry (&key predicate default-path (allow-version-p
t) force-prompt)
"Return new hyperdrive entry with path and hyperdrive read from user.