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

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

[nongnu] elpa/hyperdrive cfb434e0d0 34/49: Change: (-entry-version-range


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive cfb434e0d0 34/49: Change: (-entry-version-range) Accept keyed argument version
Date: Wed, 20 Sep 2023 19:01:34 -0400 (EDT)

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

    Change: (-entry-version-range) Accept keyed argument version
---
 hyperdrive-lib.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 3f0b4f160c..936fa3bda8 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -323,11 +323,13 @@ Intended to be used as hash table key in 
`hyperdrive-version-ranges'."
            hyperdrive-version-ranges)
   (persist-save 'hyperdrive-version-ranges))
 
-(defun hyperdrive-entry-version-range (entry)
+(cl-defun hyperdrive-entry-version-range (entry &key version)
   "Return the version range containing ENTRY.
-Returns nil when ENTRY is not known to exist at its version."
+Returns nil when ENTRY is not known to exist at its version.
+
+With non-nil VERSION, use it instead of ENTRY's version."
   (pcase-let* (((cl-struct hyperdrive-entry hyperdrive (version 
entry-version)) entry)
-               (version (or entry-version (hyperdrive-latest-version 
hyperdrive)))
+               (version (or version entry-version (hyperdrive-latest-version 
hyperdrive)))
                (ranges (hyperdrive-entry-version-ranges entry)))
     (when ranges
       (cl-find-if (pcase-lambda (`(,range-start . ,(map (:range-end 
range-end))))



reply via email to

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