el-get/recipes/package.rcp

41 lines
1.9 KiB
Plaintext
Raw Normal View History

;; Same as "package" except that it takes the version from Emacs 24
2010-09-05 01:13:34 +08:00
(:name package
:description "ELPA implementation (\"package.el\") from Emacs 24"
:builtin "24"
2010-09-05 01:13:34 +08:00
:type http
:url "https://repo.or.cz/w/emacs.git/blob_plain/ba08b24186711eaeb3748f3d1f23e2c2d9ed0d09:/lisp/emacs-lisp/package.el"
:features package
:post-init
(progn
;; add package.rcp's old `package-user-dir' to
;; `package-directory-list', in case there are
;; packages installed there from before
(let ((old-package-user-dir
(expand-file-name
(convert-standard-filename
(concat (file-name-as-directory
default-directory)
"elpa")))))
(when (file-directory-p old-package-user-dir)
(add-to-list 'package-directory-list old-package-user-dir)))
;; Ensure `package-archives' is defined
(setq package-archives (bound-and-true-p package-archives))
;; Ensure needed entries are in `package-archives' without
;; clobbering what's already there.
(let ((protocol
(if (and (fboundp 'gnutls-available-p) (gnutls-available-p))
"https://"
(lwarn '(el-get tls) :warning "Your Emacs doesn't support HTTPS (TLS)%s"
(if (eq system-type 'windows-nt)
",\n see https://github.com/dimitri/el-get/wiki/Installation-on-Windows."
"."))
"http://"))
(archives '(("melpa" . "melpa.org/packages/")
("gnu" . "elpa.gnu.org/packages/"))))
(dolist (archive archives)
(add-to-list 'package-archives
(cons (car archive) (concat protocol (cdr archive))))))))
;; Don't init, elpa packages installed by el-get is
;; initialized from loaddefs (package-initialize)