emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/hyperdrive 00b0ad6c4c 02/16: Add: (he/within-version-range


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 00b0ad6c4c 02/16: Add: (he/within-version-range) Check whether entry is within range
Date: Wed, 14 Aug 2024 16:00:13 -0400 (EDT)

branch: elpa/hyperdrive
commit 00b0ad6c4c24ef742aa0b88311bd79eb7f4f287d
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>

    Add: (he/within-version-range) Check whether entry is within range
---
 hyperdrive-lib.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 47c62464d8..9d05f64207 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1709,6 +1709,12 @@ Compares their public keys."
   "Return non-nil if entries A and B have the same hyperdrive."
   (h/equal-p (he/hyperdrive a) (he/hyperdrive b)))
 
+(defun he/within-version-range (entry entry-with-range-end)
+  "Return non-nil if ENTRY's is within ENTRY-WITH-RANGE-END's range."
+  (<= (he/version entry-with-range-end)
+      (he/version entry)
+      (map-elt (he/etc entry-with-range-end) 'range-end)))
+
 (defun h//ensure-dot-slash-prefix-path (path)
   "Return PATH, ensuring it begins with the correct prefix.
 Unless PATH starts with \"/\" \"./\" or \"../\", add \"./\"."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]