[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/jarchive 72465b705a 30/33: Address checkdoc feedback
From: |
ELPA Syncer |
Subject: |
[elpa] externals/jarchive 72465b705a 30/33: Address checkdoc feedback |
Date: |
Sat, 12 Nov 2022 17:57:57 -0500 (EST) |
branch: externals/jarchive
commit 72465b705a5edb288a20571dc4d0449a5a0c520a
Author: dannyfreeman <danny@dfreeman.email>
Commit: dannyfreeman <danny@dfreeman.email>
Address checkdoc feedback
---
jarchive.el | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/jarchive.el b/jarchive.el
index b6740b5224..4a042b1f98 100644
--- a/jarchive.el
+++ b/jarchive.el
@@ -49,15 +49,21 @@
(group (* not-newline) "." (+ alphanumeric))
line-end)
"A regex for matching paths to a jar file and a file path into the jar file.
-Delimited by `!'.")
+Delimited by `!' for jar: schemes. Delimited by `::' for zipfile: schemes.")
(defun jarchive--match! (uri)
+ "Perform a regex match on the URI.
+Expected by `jarchive--match-jar' and `jarchive--match-file'"
(string-match jarchive--uri-regex uri))
(defun jarchive--match-jar (uri)
+ "Extract the jar path from a URI.
+`jarchive--match!' must be called first"
(substring uri (match-beginning 1) (match-end 1)))
(defun jarchive--match-file (uri)
+ "Extract the inter-jar file path from a URI.
+`jarchive--match!' must be called first"
(substring uri (match-beginning 2) (match-end 2)))
(defmacro jarchive--inhibit (op handler &rest body)
@@ -69,9 +75,10 @@ Delimited by `!'.")
,@body))
(defun jarchive--file-name-handler (op &rest args)
- "A `file-name-handler-alist' function for files matching
`jarchive--url-regex'.
-OP is an I/O primitive and ARGS are the remaining arguments passed to that
primitive.
-See `(elisp)Magic File Names'."
+ "A `file-name-handler-alist' function for files matching jar URIs.
+Jar URIs are identified by `jarchive--url-regex'.
+OP is an I/O primitive and ARGS are the remaining arguments passed to that
+primitive. See `(elisp)Magic File Names'."
(if-let ((uri (car args))) ;; Sometimes this is invoked with nil args
(let* ((_ (jarchive--match! uri))
(jar-path (jarchive--match-jar uri))
@@ -134,7 +141,8 @@ TODO: this might be unnecessary, try to remove"
(defun jarchive--wrap-legacy-eglot--path-to-uri (original-fn &rest args)
"Hack until eglot is updated.
-If path is a jar URI, don't parse. If it is not a jar call original impl."
+ARGS is a list with one element, a file path or potentially a URI.
+If path is a jar URI, don't parse. If it is not a jar call ORIGINAL-FN."
(let ((path (file-truename (car args))))
(if (equal "jar" (url-type (url-generic-parse-url path)))
path
@@ -142,8 +150,9 @@ If path is a jar URI, don't parse. If it is not a jar call
original impl."
(defun jarchive--wrap-legacy-eglot--uri-to-path (original-fn &rest args)
"Hack until eglot is updated.
-If URI is a jar URI, don't parse and let the `jarchive--file-name-handler'
handle it.
-If it is not a jar call original impl."
+ARGS is a list with one element, a URI.
+If URI is a jar URI, don't parse and let the `jarchive--file-name-handler'
+handle it. If it is not a jar call ORIGINAL-FN."
(let ((uri (car args)))
(if (string= "file" (url-type (url-generic-parse-url uri)))
(apply 'funcall original-fn args)
@@ -151,7 +160,7 @@ If it is not a jar call original impl."
;;;###autoload
(defun jarchive-setup ()
- "setup jarchive, enabling emacs to open files inside jar archives.
+ "Setup jarchive, enabling Emacs to open files inside jar archives.
the files can be identified with the `jar' uri scheme."
(interactive)
(with-eval-after-load 'eglot
- [elpa] externals/jarchive 214a7db52f 22/33: Update readme with better examples and explanations, (continued)
- [elpa] externals/jarchive 214a7db52f 22/33: Update readme with better examples and explanations, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive 305dbc947a 23/33: Don't for jar dependency scheme, just use whatever works., ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive 8b738ec31b 26/33: Add changelog, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive abea8e79ec 28/33: Typo, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive 0361896bdc 29/33: Address package-lint feedback, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive 149f37507e 31/33: Separate Eglot patching process to be invoked manually by the user, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive d209394a47 08/33: Set a different buffer name that doesn't match the jarchive-regex, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive b226bfd66c 09/33: Helper functions for matching parts of the jar/file path, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive ec1da7f538 14/33: Allow user to relocate extracted files to the previous project., ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive d8fa586e1c 21/33: Also work with "zipfile" scheme URIs from clojure-lsp, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive 72465b705a 30/33: Address checkdoc feedback,
ELPA Syncer <=
- [elpa] externals/jarchive 4aa2e5d394 13/33: Add section to readme for mailing list, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive a4505a4784 32/33: Add FSF as copyright holder, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive b93da9f976 17/33: Do NOT implement file-attributes, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive 3ff89ae9cb 05/33: Update doc string, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive 0733e1fcb3 07/33: Use find-buffer-visiting instead of local var check, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive c9fdbe909d 19/33: Cleanup docstring, and ensure var is set after eglot loads, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive 050436241e 27/33: Update README now that this includes hacks to fix legacy eglot, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive 2c182b3cf9 06/33: Make setup function interactive for convenience, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive 82ff9f791f 12/33: Remove unnecessary local variable, ELPA Syncer, 2022/11/12
- [elpa] externals/jarchive a5ab89db3f 15/33: Do not set default-directory, and manually set buffer-file-name, ELPA Syncer, 2022/11/12