branch: elpa/hyperdrive
commit 5aba07372ba12a57615b4f54b06d623f0ffe5707
Author: Joseph Turner <[email protected]>
Commit: Joseph Turner <[email protected]>
Add: (h/safe, h/unsafe, h/safe-unknown) Faces; Use in h/safe-p
---
hyperdrive-lib.el | 6 +++---
hyperdrive-vars.el | 9 +++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index dd3bd02b4f..67d6dba23f 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1737,9 +1737,9 @@ has no value for \\+`safep', return \\+`unknown'."
(defun h/safe-string (hyperdrive)
"Return propertized string describing HYPERDRIVE safety."
(pcase-exhaustive (h/safe-p hyperdrive)
- ('t (propertize "safe" 'face 'success))
- ('nil (propertize "unsafe" 'face 'error))
- ('unknown (propertize "unknown" 'face 'warning))))
+ ('t (propertize "safe" 'face 'h/safe))
+ ('nil (propertize "unsafe" 'face 'h/unsafe))
+ ('unknown (propertize "unknown" 'face 'h/safe-unknown))))
(defun h//ensure-dot-slash-prefix-path (path)
"Return PATH, ensuring it begins with the correct prefix.
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index ac0ac62ddb..343cc6be24 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -314,6 +314,15 @@ value (and should only be present once in the string).
Used in
(defface h/size '((t (:inherit font-lock-doc-face)))
"File sizes.")
+(defface h/safe '((t (:inherit success)))
+ "File sizes for entries which have been fully downloaded.")
+
+(defface h/unsafe '((t (:inherit error)))
+ "File sizes for entries which have not been downloaded.")
+
+(defface h/safe-unknown '((t (:inherit warning)))
+ "File sizes for entries which have been partially downloaded.")
+
(defface h/size-fully-downloaded '((t (:inherit success :weight normal)))
"File sizes for entries which have been fully downloaded.")