Browse Source

Move package initialization to early-init.el

This is done in preparation for using Emacs 27.1, which sources this file
automatically before package activation.
master
Daniel 1 year ago
parent
commit
ed7266bd65
No known key found for this signature in database GPG Key ID: 1C7071A75BB72D64
  1. 13
      early-init.el
  2. 16
      init.el

13
early-init.el

@ -0,0 +1,13 @@
;; -*- lexical-binding: t -*-
(require 'package)
(setq package-user-dir (expand-file-name "elpa" user-emacs-directory))
(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")
("melpa-stable" . "https://stable.melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")))
(setq package-enable-at-startup nil)

16
init.el

@ -32,19 +32,9 @@
;; * Packages
(require 'package)
(setq package-user-dir (expand-file-name "elpa" emacs-d))
(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")
("melpa-stable" . "https://stable.melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")))
(setq package-enable-at-startup nil)
(package-initialize)
(when (< emacs-major-version 27)
(load-file (expand-file-name "early-init.el" emacs-d))
(package-initialize))
(eval-when-compile
(dolist (package '(bind-key use-package))

Loading…
Cancel
Save