[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive 9c0cf70040 094/102: Fix: (h//format) Don't use
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/hyperdrive 9c0cf70040 094/102: Fix: (h//format) Don't use lambdas in format-spec yet |
|
Date: |
Wed, 29 Nov 2023 04:00:58 -0500 (EST) |
branch: elpa/hyperdrive
commit 9c0cf700400cdc96b42c34e1e99b52f2349d0988
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Fix: (h//format) Don't use lambdas in format-spec yet
Revert one of the changes in 62ef2a26. We can revisit these changes
when deprecating Emacs 28.
---
hyperdrive-lib.el | 41 +++++++++++++++++++++++++----------------
1 file changed, 25 insertions(+), 16 deletions(-)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 5dce6a2b6f..8acbec9d57 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -975,22 +975,31 @@ according to FORMATS, by default `hyperdrive-formats',
which see."
(propertize value 'face face))
"")))
(format-spec format
- `((?H . ,(lambda () (h//preferred-format hyperdrive)))
- (?P . ,(lambda () (fmt 'petname petname 'h/petname)))
- (?N . ,(lambda () (fmt 'nickname nickname 'h/nickname)))
- (?k . ,(lambda () (fmt 'short-key public-key
'h/public-key)))
- (?K . ,(lambda () (fmt 'public-key public-key
'h/public-key)))
- (?S . ,(lambda () (fmt 'seed seed 'h/seed)))
- (?D . ,(lambda ()
- (if (car domains)
- (format (alist-get 'domains formats)
- (string-join
- (mapcar (lambda (domain)
- (propertize domain
- 'face
'h/domain))
- domains)
- ","))
- ""))))))))
+ ;; 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.
- [nongnu] elpa/hyperdrive 51fcdf2672 003/102: Fix: (hyperdrive-menu.el) Fix section levels, (continued)
- [nongnu] elpa/hyperdrive 51fcdf2672 003/102: Fix: (hyperdrive-menu.el) Fix section levels, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 8d5d248468 002/102: Change: (-mirror-read-predicate) Return nil when mirroring all files, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 8cde9dc75e 005/102: Change: (-menu{, -hyperdrive}) Refresh after every command, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive c57a41225f 014/102: Change (-mirror-configured-p) Don't check for target, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 4d9b8c09cc 025/102: Change: (hyperdrive-menu) Replace lambda with hyperdrive-up, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 7fd3e0f471 033/102: Comment: Add TODO, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive b682fc8058 052/102: Change: (--entry-version-range-key) Don't pass :with-help-echo, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 299e100c03 026/102: Comment: Add TODO, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive b1cc39978b 091/102: Comment: Remove TODO, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 600c921605 081/102: Tidy: Rename "naming" to "format", ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 9c0cf70040 094/102: Fix: (h//format) Don't use lambdas in format-spec yet,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive fe986e53ee 079/102: Chore: Rebuild texi manual, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 89fb114bdd 093/102: Fix: Autoload for markdown-mode links, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive ab2fb6e8ea 009/102: Change: (-menu-hyperdrive) Place mirror commands in separate column, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive b403a9c7a3 044/102: Add: (hyperdrive-buffer-name-format), ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 60d37a34ec 029/102: Change: (-mirror-set-filter) Wording of formatted nil value, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive b2afbfaa60 046/102: Change: Replace -entry-description with --format-entry, etc., ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 214a060f75 001/102: Fix: (-mirror-read-predicate) Require match for predicate type, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 9d8de7ed67 006/102: Change: (-menu-set-nickname) No longer explicitly refresh transient, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 74b0eb400f 032/102: Fix/Docs: Reword as suggested by makeinfo, ELPA Syncer, 2023/11/29
- [nongnu] elpa/hyperdrive 1f3eeca9dc 013/102: Change (-menu-hyperdrive) Add suffix for copying URL, ELPA Syncer, 2023/11/29