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.
This commit is contained in:
parent
845d5d137c
commit
ed7266bd65
|
@ -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
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…
Reference in New Issue