2011-09-30 20:41:07 +08:00
|
|
|
;; Same as "package" except that it takes the version from Emacs 24
|
2010-09-05 01:13:34 +08:00
|
|
|
(:name package
|
2011-09-30 20:41:07 +08:00
|
|
|
:description "ELPA implementation (\"package.el\") from Emacs 24"
|
2013-03-02 00:55:29 +08:00
|
|
|
:builtin "24"
|
2010-09-05 01:13:34 +08:00
|
|
|
:type http
|
2016-05-20 07:46:30 +08:00
|
|
|
:url "https://repo.or.cz/w/emacs.git/blob_plain/ba08b24186711eaeb3748f3d1f23e2c2d9ed0d09:/lisp/emacs-lisp/package.el"
|
2010-09-20 16:00:52 +08:00
|
|
|
:features package
|
2012-02-23 05:43:32 +08:00
|
|
|
:post-init
|
2012-02-27 07:13:08 +08:00
|
|
|
(progn
|
2014-03-17 04:34:21 +08:00
|
|
|
;; 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)))
|
2013-11-23 00:39:10 +08:00
|
|
|
;; Ensure `package-archives' is defined
|
|
|
|
(setq package-archives (bound-and-true-p package-archives))
|
|
|
|
;; Ensure needed entries are in `package-archives' without
|
2016-05-20 07:46:30 +08:00
|
|
|
;; 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/")
|
2021-11-14 05:16:21 +08:00
|
|
|
("gnu" . "elpa.gnu.org/packages/"))))
|
2016-05-20 07:46:30 +08:00
|
|
|
(dolist (archive archives)
|
|
|
|
(add-to-list 'package-archives
|
|
|
|
(cons (car archive) (concat protocol (cdr archive))))))))
|
2011-09-30 20:41:07 +08:00
|
|
|
|
2012-02-23 05:43:32 +08:00
|
|
|
;; Don't init, elpa packages installed by el-get is
|
|
|
|
;; initialized from loaddefs (package-initialize)
|