From 83954658e2ac5a9a6ececaaed6f46154f522ad01 Mon Sep 17 00:00:00 2001 From: Miciah Masters Date: Mon, 19 Feb 2018 11:29:24 -0500 Subject: [PATCH] Fix package initialization on Emacs 27 Before Emacs 27, the init file was responsible for initializing the package manager by calling `package-initialize'. Emacs 27 changed the default behavior: It now calls `package-initialize' before loading the init file. This behavior would prevent Spacemacs's own package initialization from running. However, Emacs 27 also loads the "early init" file (this file) before it initializes the package manager, and Spacemacs can use this early init file to prevent Emacs from initializing the package manager. (See .) Earlier Emacs versions do not load the early init file and do not initialize the package manager before loading the init file, so this file is neither needed nor loaded on those versions. --- early-init.el | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 early-init.el diff --git a/early-init.el b/early-init.el new file mode 100644 index 000000000..6231b797c --- /dev/null +++ b/early-init.el @@ -0,0 +1,24 @@ +;;; early-init.el --- Spacemacs Early Init File +;; +;; Copyright (c) 2018 Sylvain Benner & Contributors +;; +;; Author: Miciah Dashiel Butler Masters +;; URL: https://github.com/syl20bnr/spacemacs +;; +;; This file is not part of GNU Emacs. +;; +;;; License: GPLv3 + +;; Before Emacs 27, the init file was responsible for initializing the package +;; manager by calling `package-initialize'. Emacs 27 changed the default +;; behavior: It now calls `package-initialize' before loading the init file. +;; This behavior would prevent Spacemacs's own package initialization from +;; running. However, Emacs 27 also loads the "early init" file (this file) +;; before it initializes the package manager, and Spacemacs can use this early +;; init file to prevent Emacs from initializing the package manager. (See +;; .) +;; +;; Earlier Emacs versions do not load the early init file and do not initialize +;; the package manager before loading the init file, so this file is neither +;; needed nor loaded on those versions. +(setq package-enable-at-startup nil)