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

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

[nongnu] elpa/hyperdrive c04e0080df 07/82: Tidy: Rename function to hype


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive c04e0080df 07/82: Tidy: Rename function to hyperdrive-entry-equal-p
Date: Mon, 25 Sep 2023 19:00:50 -0400 (EDT)

branch: elpa/hyperdrive
commit c04e0080df83d82b961a1f2357f7f09e8ae8ac91
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Tidy: Rename function to hyperdrive-entry-equal-p
---
 hyperdrive-dir.el |  2 +-
 hyperdrive-lib.el | 28 ++++++++++++++--------------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 0d427dc6d2..6914fc8232 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -62,7 +62,7 @@ the metadata has been loaded."
                (metadata-queue) (ewoc) (prev-entry) (prev-point))
     (cl-labels ((goto-entry (entry ewoc)
                   (when-let ((node (hyperdrive-ewoc-find-node ewoc entry
-                                     :predicate #'hyperdrive-entry-equal)))
+                                     :predicate #'hyperdrive-entry-equal-p)))
                     (goto-char (ewoc-location node))))
                 (update-footer (num-filled num-of)
                   (when (zerop (mod num-filled 5))
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 00b1b84feb..fe412499b6 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -280,18 +280,6 @@ before making the entry struct."
 
 ;; These functions take a hyperdrive-entry struct argument, not a URL.
 
-(defun hyperdrive-entry-equal (a b)
-  "Return non-nil if hyperdrive entries A and B are equal.
-Compares only public key and path."
-  (pcase-let (((cl-struct hyperdrive-entry (path a-path)
-                          (hyperdrive (cl-struct hyperdrive (public-key 
a-key))))
-               a)
-              ((cl-struct hyperdrive-entry (path b-path)
-                          (hyperdrive (cl-struct hyperdrive (public-key 
b-key))) )
-               b))
-    (and (equal a-path b-path)
-         (equal a-key b-key))))
-
 (defun hyperdrive-entry-latest (entry)
   "Return ENTRY at its hyperdrive's latest version, or nil."
   (hyperdrive-entry-at nil entry))
@@ -1320,8 +1308,8 @@ Affected by option `hyperdrive-reuse-buffers', which see."
   "Return non-nil when BUFFER is visiting ENTRY."
   (and (buffer-local-value 'hyperdrive-mode buffer)
        (buffer-local-value 'hyperdrive-current-entry buffer)
-       (hyperdrive-entry-equal entry
-                               (buffer-local-value 'hyperdrive-current-entry 
buffer))))
+       (hyperdrive-entry-equal-p
+        entry (buffer-local-value 'hyperdrive-current-entry buffer))))
 
 (defun hyperdrive--buffer-for-entry (entry)
   "Return a predicate to match buffer against ENTRY."
@@ -1410,5 +1398,17 @@ When BUFFER is nil, act on current buffer."
       (delete-all-overlays)
       (set-text-properties (point-min) (point-max) nil))))
 
+(defun hyperdrive-entry-equal-p (a b)
+  "Return non-nil if hyperdrive entries A and B are equal.
+Compares only public key and path."
+  (pcase-let (((cl-struct hyperdrive-entry (path a-path)
+                          (hyperdrive (cl-struct hyperdrive (public-key 
a-key))))
+               a)
+              ((cl-struct hyperdrive-entry (path b-path)
+                          (hyperdrive (cl-struct hyperdrive (public-key 
b-key))) )
+               b))
+    (and (equal a-path b-path)
+         (equal a-key b-key))))
+
 (provide 'hyperdrive-lib)
 ;;; hyperdrive-lib.el ends here



reply via email to

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