branch: elpa/hyperdrive
commit 8fe37f664cd91345f7c3637a107b62bba4ce56a8
Author: Joseph Turner <jos...@ushin.org>
Commit: Joseph Turner <jos...@ushin.org>

    Tidy: (h/restart) Move closer to h/start and h/stop
---
 hyperdrive.el | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index e270ea947a..913cc6474e 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -138,6 +138,16 @@ which see."
     (setf h//gateway-starting-timer nil))
   (h//gateway-wait-for-dead))
 
+(defun h/restart ()
+  "Restart the gateway."
+  (interactive)
+  (h/message "Restarting gateway...")
+  (with-demoted-errors (h/stop))
+  (with-timeout (5 (h/message "Timed out waiting for gateway to stop"))
+    (cl-loop while (h/gateway-live-p)
+             do (sleep-for 0.2)))
+  (h/start))
+
 ;;;###autoload
 (defun hyperdrive-gateway-version ()
   "Say version number of gateway and copy it to the kill-ring.
@@ -1586,16 +1596,6 @@ If FORCEP, don't prompt for confirmation before 
downloading."
   (interrupt-process h/install-process)
   (setf h/install-process nil))
 
-(defun h/restart ()
-  "Restart the gateway."
-  (interactive)
-  (h/message "Restarting gateway...")
-  (with-demoted-errors (h/stop))
-  (with-timeout (5 (h/message "Timed out waiting for gateway to stop"))
-    (cl-loop while (h/gateway-live-p)
-             do (sleep-for 0.2)))
-  (h/start))
-
 ;; (defun h//gateway-appears-valid-p ()
 ;;   "Return non-nil if a local installation of the gateway appears valid.
 ;; That is, if an executable file exists at the expected location

Reply via email to