2012-02-28 03:41:12 +08:00
|
|
|
;; https://github.com/dimitri/el-get/issues/407
|
2011-09-30 20:53:34 +08:00
|
|
|
;;
|
|
|
|
;; use url-retrieve-synchronously in init file
|
|
|
|
;;
|
2013-04-01 20:46:34 +08:00
|
|
|
;; Drop the -L . option from the README.md for this very test.
|
2014-03-17 01:13:56 +08:00
|
|
|
;;
|
|
|
|
;;
|
|
|
|
;; https://github.com/dimitri/el-get/issues/1457
|
|
|
|
;;
|
|
|
|
;; The basic setup installer should make el-get available immediately.
|
|
|
|
|
2011-09-30 20:53:34 +08:00
|
|
|
|
2012-02-28 03:41:12 +08:00
|
|
|
(require 'cl)
|
|
|
|
;; Unload el-get and delete it from the load path
|
2012-03-19 04:36:49 +08:00
|
|
|
|
2012-02-28 03:41:12 +08:00
|
|
|
(when (require 'el-get nil t)
|
|
|
|
;; Remove from load-path
|
|
|
|
(setq load-path
|
|
|
|
(remove-if (apply-partially
|
|
|
|
#'string-prefix-p
|
|
|
|
(expand-file-name
|
|
|
|
"."
|
|
|
|
(file-name-directory
|
|
|
|
(symbol-file 'el-get 'defun))))
|
|
|
|
load-path))
|
|
|
|
;; Unload features
|
|
|
|
(loop for feat in features
|
|
|
|
if (string-prefix-p "el-get" (symbol-name feat))
|
2012-03-30 01:48:55 +08:00
|
|
|
do (progn
|
|
|
|
(unload-feature feat 'force)
|
|
|
|
(assert (not (require feat nil t)) Nil
|
|
|
|
"%s should not be loadable now" feat)))
|
2014-03-17 01:13:56 +08:00
|
|
|
(assert (not (or (require 'el-get nil t)
|
|
|
|
(boundp 'el-get-sources))) nil
|
2012-02-28 03:41:12 +08:00
|
|
|
"el-get should not be loadable now"))
|
|
|
|
|
2011-09-30 20:53:34 +08:00
|
|
|
(unless (require 'el-get nil t)
|
|
|
|
(with-current-buffer
|
|
|
|
(url-retrieve-synchronously
|
|
|
|
"https://raw.github.com/dimitri/el-get/master/el-get-install.el")
|
2014-06-10 10:08:40 +08:00
|
|
|
(let (el-get-install-skip-emacswiki-recipes)
|
|
|
|
(goto-char (point-max))
|
|
|
|
(eval-print-last-sexp)))
|
2011-09-30 20:53:34 +08:00
|
|
|
(message "el-get is ready now"))
|
2012-02-28 03:41:12 +08:00
|
|
|
|
2014-03-17 01:13:56 +08:00
|
|
|
(assert (and (featurep 'el-get)
|
|
|
|
(boundp 'el-get-sources)) nil "el-get MUST have been loaded!")
|