Browse Source

Reduce configuration done in `early-init.el`

As per the documentation (see "(elisp)Startup Summary"), only variable
customization that affect package initialization should go into the early init
file.  Defining package archives is explicitly mentioned as something that still
may go into the main init file.  So we move it there and adjust comments
accordingly.
master
Daniel 4 months ago
parent
commit
185f1d75f3
No known key found for this signature in database
2 changed files with 8 additions and 8 deletions
  1. 1
    7
      early-init.el
  2. 7
    1
      init.el

+ 1
- 7
early-init.el View File

@@ -1,11 +1,5 @@
1 1
 ;; -*- lexical-binding: t -*-
2 2
 
3
-(require 'package)
4
-
5 3
 (setq package-user-dir (expand-file-name "elpa" user-emacs-directory))
6 4
 
7
-(setq package-archives
8
-      '(("melpa" . "https://melpa.org/packages/")
9
-        ("gnu" . "https://elpa.gnu.org/packages/")
10
-        ("melpa-stable" . "https://stable.melpa.org/packages/")
11
-        ("org" . "https://orgmode.org/elpa/")))
5
+

+ 7
- 1
init.el View File

@@ -42,9 +42,15 @@
42 42
 
43 43
 ;; * Packages
44 44
 
45
+(setq package-archives
46
+      '(("melpa" . "https://melpa.org/packages/")
47
+        ("gnu" . "https://elpa.gnu.org/packages/")
48
+        ("melpa-stable" . "https://stable.melpa.org/packages/")
49
+        ("org" . "https://orgmode.org/elpa/")))
50
+
45 51
 (when (< emacs-major-version 27)
46 52
   ;; Before Emacs 27.1, we had to do package initialization ourselves.  In Emacs
47
-  ;; 27.1 and later, it's done in early-init.el.  See
53
+  ;; 27.1 and later, it's done directly after loading early-init.el.  See
48 54
   ;; https://www.gnu.org/software/emacs/news/NEWS.27.1
49 55
   (load-file (expand-file-name "early-init.el" emacs-d))
50 56
   (package-initialize))

Loading…
Cancel
Save