Require package *before* adding to package-archives list

This commit is contained in:
Evie Litherland-Smith 2023-11-02 15:17:01 +00:00
parent 5ad1850a80
commit 72f6c32022

View file

@ -12,13 +12,14 @@
(load custom-file nil 'nomessage))
;; Setup package-archives and priorities
(add-to-list 'package-archives '("stable" . "https://stable.melpa.org/packages/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(when (require 'package nil :noerror)
(add-to-list 'package-archives '("stable" . "https://stable.melpa.org/packages/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(setq package-archive-priorities '(("gnu" . 99)
("nongnu" . 80)
("stable" . 70)
("melpa" . 0)))
(setq package-archive-priorities '(("gnu" . 99)
("nongnu" . 80)
("stable" . 70)
("melpa" . 0))))
;; Add custom modules to the `load-path'
(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory))