branch: elpa/hyperdrive
commit 9e7ebe32bac4558a7a8cf908e6af464bcb55c049
Author: Joseph Turner <[email protected]>
Commit: Joseph Turner <[email protected]>
Tidy: Put internals at same section level as configuration
Also move regular expressions and persisted variables into internals
section.
---
hyperdrive-vars.el | 76 +++++++++++++++++++++++++++---------------------------
1 file changed, 38 insertions(+), 38 deletions(-)
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index 741e499c03..a03a929b69 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -394,44 +394,7 @@ This hook is called by `hyperdrive--gateway-wait-for-dead'
after
(defface h/history-unknown '((t :inherit warning))
"Marker for entries with unknown existence in `hyperdrive-history' buffers.")
-;;;;; Regular expressions
-
-(eval-and-compile
- (defconst h//hyper-prefix "hyper://"
- "Hyperdrive URL prefix."))
-
-(defconst h//public-key-re
- (rx (eval h//hyper-prefix) (group (= 52 alphanumeric)))
- "Regexp to match \"hyper://\" + public key.
-
-Capture group matches public key.")
-
-(defconst h//version-re
- (rx (eval h//hyper-prefix)
- (one-or-more alnum)
- (group "+" (one-or-more num)))
- "Regexp to match \"hyper://\" + public key or seed + version number.
-
-Capture group matches version number.")
-
-;;;;; Persisted variables
-
-(persist-defvar h/hyperdrives (make-hash-table :test #'equal)
- "List of known hyperdrives."
- h/persist-location)
-
-(persist-defvar h/version-ranges (make-hash-table :test #'equal)
- "Hash table of hyperdrive version ranges.
-Keys are generated by `hyperdrive--entry-version-range-key', and
-values are alists mapping version range starts to plists with
-`:existsp' and `:range-end' keys."
- h/persist-location)
-
-;; TODO: Flesh out the persist hook.
-;; (defvar hyperdrive-persist-hook nil
-;; :type 'hook)
-
-;;;;; Internals
+;;;; Internals
(defvar h/gateway-version-expected
'(:name "hyper-gateway-ushin" :version "3.12.0"))
@@ -483,6 +446,43 @@ Keys are regexps matched against MIME types.")
:desc "Name"))
"Fields for sorting hyperdrive directory buffer columns.")
+;;;;; Regular expressions
+
+(eval-and-compile
+ (defconst h//hyper-prefix "hyper://"
+ "Hyperdrive URL prefix."))
+
+(defconst h//public-key-re
+ (rx (eval h//hyper-prefix) (group (= 52 alphanumeric)))
+ "Regexp to match \"hyper://\" + public key.
+
+Capture group matches public key.")
+
+(defconst h//version-re
+ (rx (eval h//hyper-prefix)
+ (one-or-more alnum)
+ (group "+" (one-or-more num)))
+ "Regexp to match \"hyper://\" + public key or seed + version number.
+
+Capture group matches version number.")
+
+;;;;; Persisted variables
+
+(persist-defvar h/hyperdrives (make-hash-table :test #'equal)
+ "List of known hyperdrives."
+ h/persist-location)
+
+(persist-defvar h/version-ranges (make-hash-table :test #'equal)
+ "Hash table of hyperdrive version ranges.
+Keys are generated by `hyperdrive--entry-version-range-key', and
+values are alists mapping version range starts to plists with
+`:existsp' and `:range-end' keys."
+ h/persist-location)
+
+;; TODO: Flesh out the persist hook.
+;; (defvar hyperdrive-persist-hook nil
+;; :type 'hook)
+
;;;; Footer
(provide 'hyperdrive-vars)