branch: elpa/hyperdrive
commit 57afd14f7e7bf5714ac86f437651b1c465f8ec6f
Author: Joseph Turner <[email protected]>
Commit: Joseph Turner <[email protected]>
Add: (h/gateway-program) Customizable gateway program name
---
hyperdrive-lib.el | 6 +++---
hyperdrive-vars.el | 8 ++++++--
hyperdrive.el | 2 +-
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index c44b00141a..1c5e238e70 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1412,9 +1412,9 @@ Then calls THEN if given."
(defun h//hyper-gateway-ushin-path ()
"Return path to hyper-gateway-ushin executable, or nil if not found."
(cond ((file-exists-p
- (expand-file-name "hyper-gateway-ushin"
hyperdrive-gateway-directory))
- (expand-file-name "hyper-gateway-ushin" hyperdrive-gateway-directory))
- ((executable-find "hyper-gateway-ushin"))))
+ (expand-file-name h/gateway-program hyperdrive-gateway-directory))
+ (expand-file-name h/gateway-program hyperdrive-gateway-directory))
+ ((executable-find h/gateway-program))))
(defun h//gateway-start-default ()
"Start the gateway as an Emacs subprocess.
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index b0d2140003..0760e1b831 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -255,8 +255,12 @@ value (and should only be present once in the string).
Used in
(cons :tag "Hyperdrive domains" (const domains)
(string :tag "Format string"))))
-;; TODO: Consider adding h/gateway-program variable also, set by default to
-;; "hyper-gateway-ushin"
+(defcustom h/gateway-program "hyper-gateway-ushin"
+ "Name of gateway executable.
+Command `hyperdrive-install' installs to this name inside
+`hyperdrive-gateway-directory'. Function
+`h//hyper-gateway-ushin-path' looks for executable by this name."
+ :type 'string)
(defcustom h/gateway-directory (expand-file-name "~/.local/lib/hyperdrive.el")
"Where the hyper-gateway executable is found.
diff --git a/hyperdrive.el b/hyperdrive.el
index 4ec8133d47..3a1b90329f 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1365,7 +1365,7 @@ If FORCEP, don't prompt for confirmation before
downloading."
(try)))
(then (file-name)
(let ((destination-name
- (expand-file-name "hyper-gateway-ushin"
h/gateway-directory)))
+ (expand-file-name h/gateway-program h/gateway-directory)))
(when (file-exists-p destination-name)
(move-file-to-trash destination-name))
(unless (file-directory-p h/gateway-directory)