branch: elpa/hyperdrive commit fbadc91428f4dbe0da1cc577ba55528114e6c534 Author: Adam Porter <a...@alphapapa.net> Commit: Adam Porter <a...@alphapapa.net>
Change: (hyperdrive--format-host) Use default by default --- hyperdrive-history.el | 3 +-- hyperdrive-lib.el | 17 ++++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/hyperdrive-history.el b/hyperdrive-history.el index 74b7997406..25f0924659 100644 --- a/hyperdrive-history.el +++ b/hyperdrive-history.el @@ -176,8 +176,7 @@ Universal prefix argument \\[universal-argument] forces (queue) (ewoc)) (with-current-buffer (get-buffer-create (format "*Hyperdrive-history: %s %s*" - (hyperdrive--format-host hyperdrive :format hyperdrive-default-host-format - :with-label t) + (hyperdrive--format-host hyperdrive :with-label t) (url-unhex-string path))) (with-silent-modifications (hyperdrive-history-mode) diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el index 557066503c..8ea51ef3d5 100644 --- a/hyperdrive-lib.el +++ b/hyperdrive-lib.el @@ -930,9 +930,7 @@ FORMAT-PATH is `name', use only last part of path, as in When WITH-VERSION or ENTRY's version is nil, omit (version:VERSION)." (pcase-let* (((cl-struct hyperdrive-entry hyperdrive version path name) entry) - (handle (hyperdrive--format-host hyperdrive - :format hyperdrive-default-host-format - :with-label t))) + (handle (hyperdrive--format-host hyperdrive :with-label t))) (propertize (concat (format "[%s] " handle) (pcase format-path ('path (url-unhex-string path)) @@ -991,13 +989,14 @@ Path and target fragment are URI-encoded." :with-faces with-faces)) url))) -(cl-defun hyperdrive--format-host (hyperdrive &key format with-label (with-faces t)) +(cl-defun hyperdrive--format-host + (hyperdrive &key with-label (format hyperdrive-default-host-format) (with-faces t)) "Return HYPERDRIVE's formatted hostname, or nil. -FORMAT should be one or a list of symbols; see -`hyperdrive-default-host-format' for choices. If the specified -FORMAT is not available, returns nil. If WITH-LABEL, prepend a -label for the kind of format used (e.g. \"petname:\"). When -WITH-FACES is nil, don't add face text properties." +FORMAT should be one or a list of symbols, by default +`hyperdrive-default-host-format', which see for choices. If the +specified FORMAT is not available, returns nil. If WITH-LABEL, +prepend a label for the kind of format used (e.g. \"petname:\"). +When WITH-FACES is nil, don't add face text properties." (pcase-let* (((cl-struct hyperdrive petname public-key domains seed (metadata (map name))) hyperdrive))