aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/init-elpa.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/init-elpa.el')
-rw-r--r--lisp/init-elpa.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/init-elpa.el b/lisp/init-elpa.el
index 28737de..9bb2b2d 100644
--- a/lisp/init-elpa.el
+++ b/lisp/init-elpa.el
@@ -2,20 +2,21 @@
;; Repositories
;; ================
-(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
- (not (gnutls-available-p))))
- (proto (if no-ssl "http" "https")))
- ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
- (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
- ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
- (when (< emacs-major-version 24)
- ;; For important compatibility libraries like cl-lib
- (add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))
+(setq package-archives
+ '(("melpa" . "https://melpa.org/packages/")
+ ;;("melpa-stable" . "https://stable.melpa.org/packages/")
+ ("gnu" . "https://elpa.gnu.org/packages/")
+ ("org" . "https://orgmode.org/elpa/")))
+
+(setq package-archive-priorities
+ '(("melpa" . 4)
+ ("melpa-stable" . 0)
+ ("gnu" . 1)
+ ("org" . 3)))
;; =================
;;; Find packages if not installed
-
-;; =================
+;; ================================
;;; On-demand installation of packages
(defun require-package (package &optional min-version no-refresh)
"Install given PACKAGE, optionally requiring MIN-VERSION.
@@ -31,7 +32,7 @@ re-downloaded in order to locate PACKAGE."
(progn
(package-refresh-contents)
(require-package package min-version t)))))
-;; =================
+;; ================================
(package-initialize)