 
      ; Don't load code from remote sites without asking the user first.
      ((not (y-or-n-p "package.el not available; download it now?"))
-      (message "[homectl] WARNING: Remote packages may not work")
-      nil)
+      (error "[homectl] Couldn't load package.el"))
 
      ; Grab package.el from the web
      (t

environment."
  (interactive)

  ; Make sure we're ready to fetch remote packages
  (when (homectl-load-package-el)
    (package-initialize))

  ; The following is a Darwin-specific hack to make sure the shell's $PATH
  ; is picked up by Emacs when running in Aqua mode.
  (when (and (string= system-type "darwin") homectl-darwin-fixup-path)



;;;
;;; package.el support
;;;

(defvar homectl-package-el-ready-p nil
  "Have we already loaded/initialized package.el?")

(defun homectl-require-package-el ()
  (when (not homectl-package-el-ready-p)
    (homectl-load-package-el)
    (package-initialize)
    (setq homectl-package-el-ready-p t)))

(defun homectl-load-package-el ()
  "Download a version of package.el if it's not available."
