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

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

[nongnu] elpa/hyperdrive 903847d50e 82/82: Tidy: Docstrings, comments


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 903847d50e 82/82: Tidy: Docstrings, comments
Date: Mon, 25 Sep 2023 19:00:57 -0400 (EDT)

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

    Tidy: Docstrings, comments
---
 hyperdrive-lib.el | 20 +++++++++++---------
 hyperdrive-org.el |  4 ++--
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 0e8218c259..3a8fdab3d3 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -936,20 +936,20 @@ When WITH-VERSION or ENTRY's version is nil, omit 
(version:VERSION)."
 
 (cl-defun hyperdrive--format-entry-url
     (entry &key (host-format '(public-key domain))
-           (with-path t)
-           (with-protocol t) (with-help-echo t) (with-target t) (with-faces t))
+           (with-path t) (with-protocol t) (with-help-echo t)
+           (with-target t) (with-faces t))
   "Return ENTRY's URL.
 Returns URL formatted like:
 
   hyper://HOST-FORMAT/PATH/TO/FILE
 
-HOST-FORMAT is passed to `hyperdrive--format-host', which see.  If
-WITH-PROTOCOL, \"hyper://\" is prepended.  If WITH-HELP-ECHO,
+HOST-FORMAT is passed to `hyperdrive--format-host', which see.
+If WITH-PROTOCOL, \"hyper://\" is prepended.  If WITH-HELP-ECHO,
 propertize string with `help-echo' property showing the entry's
-full URL.  When WITH-FACES is nil, don't add face text properties.
-If WITH-TARGET, append the ENTRY's target, stored in its :etc
-slot.  When ENTRY has non-nil `version' slot, include version
-number in URL.
+full URL.  When WITH-FACES is nil, don't add face text
+properties.  If WITH-TARGET, append the ENTRY's target, stored in
+its :etc slot.  If WITH-PATH, include the path portion.  When
+ENTRY has non-nil `version' slot, include version number in URL.
 
 Note that, if HOST-FORMAT includes values other than `public-key'
 and `domain', the resulting URL may not be a valid hyperdrive
@@ -973,6 +973,7 @@ Path and target fragment are URI-encoded."
                               (concat "#" (url-hexify-string "::")
                                       (url-hexify-string target))))
                (path (when with-path
+                       ;; TODO: Consider removing this argument if it's not 
needed.
                        (hyperdrive--url-hexify-string path)))
                (url (concat protocol host version-part path target-part)))
     (if with-help-echo
@@ -1425,7 +1426,8 @@ Compares their public keys."
   (hyperdrive-equal-p (hyperdrive-entry-hyperdrive a) 
(hyperdrive-entry-hyperdrive b)))
 
 (defun hyperdrive--ensure-dot-slash-prefix-path (path)
-  "Return PATH. Unless PATH starts with \"/\" \"./\" or \"../\", add \"./\"."
+  "Return PATH, ensuring it begins with the correct prefix.
+Unless PATH starts with \"/\" \"./\" or \"../\", add \"./\"."
   (if (string-match-p (rx bos (or "/" "./" "../")) path)
       path
     (concat "./" path)))
diff --git a/hyperdrive-org.el b/hyperdrive-org.el
index bfe2551bc7..3e7db4663f 100644
--- a/hyperdrive-org.el
+++ b/hyperdrive-org.el
@@ -175,8 +175,8 @@ the logic for handling links of \"file\" type."
 
 (cl-defun hyperdrive--org-shorthand-link (entry)
   "Return a non-\"hyper://\"-prefixed link to ENTRY.
-Respects `hyperdrive-org-link-full-url' and `org-link-file-path-type'.
-FIXME: Docstring, maybe move details from `hyperdrive-org-link-full-url'."
+Respects `hyperdrive-org-link-full-url' and `org-link-file-path-type'."
+  ;; FIXME: Docstring, maybe move details from `hyperdrive-org-link-full-url'.
   (cl-assert hyperdrive-current-entry)
   (let ((search-option (alist-get 'target (hyperdrive-entry-etc entry))))
     (when (and search-option



reply via email to

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