branch: elpa/hyperdrive
commit b4ea005fdb9f634ad043f213e716c54be72a80d5
Author: Joseph Turner <[email protected]>
Commit: Joseph Turner <[email protected]>
Add: (h/safe-p) New function
---
hyperdrive-lib.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 51c7737bd6..87d7cc88c7 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1726,6 +1726,12 @@ Compares their public keys."
(h/latest-version (he/hyperdrive entry)))
(map-elt (he/etc entry-with-range-end) 'range-end)))
+(defun h/safe-p (hyperdrive)
+ "Return whether HYPERDRIVE is safe or not.
+Potential return values are t, nil, or \\+`unknown'. If ETC slot
+has no value for \\+`safep', return \\+`unknown'."
+ (map-elt (h/etc hyperdrive) 'safep 'unknown))
+
(defun h//ensure-dot-slash-prefix-path (path)
"Return PATH, ensuring it begins with the correct prefix.
Unless PATH starts with \"/\" \"./\" or \"../\", add \"./\"."