[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
- [nongnu] elpa/hyperdrive updated (d2413785b0 -> 903847d50e), ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 4120c3a4d5 01/82: Tidy: Variable name, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive a1901daab3 05/82: WIP, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive c04e0080df 07/82: Tidy: Rename function to hyperdrive-entry-equal-p,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive c536bc9a2c 11/82: WIP, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive e0f7cee105 13/82: WIP: Add test-hyperdrive-org-link.el, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive de2e028534 12/82: Docs: Clarify link types, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive eb84b2d2f5 16/82: Change: (hyperdrive-entry-create) Remove ENCODE argument, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive b2fe51ba3b 02/82: Comment: Add TODO, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive c740135a62 19/82: Change: (hyperdrive-org-link-full-url) Docstring, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 81e01fcdc8 20/82: Fix: (hyperdrive--format-entry-url) Encode ?/ in URL fragment, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 3cac9738b6 22/82: Change: (-deftest) Don't rebind hyperdrive--url-hexify-string, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive eef4f80848 23/82: Change: (hyperdrive-test-org-link tests) Change "file" to "path", ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 5709167d98 24/82: Test: different-drive-same-path-*, ELPA Syncer, 2023/09/25