Skip to content

Commit 3c74db9

Browse files
ryukinixbbatsov
authored andcommitted
Avoid reinitialize package-initialize
Solve warning of emacs 27+ when in personal scripts it previously already initialize it.
1 parent 868a6fd commit 3c74db9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/prelude-packages.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@
5151

5252
;; set package-user-dir to be relative to Prelude install path
5353
(setq package-user-dir (expand-file-name "elpa" prelude-dir))
54-
(package-initialize)
54+
55+
(unless package--initialized
56+
(package-initialize))
5557

5658
;; install & enable use-package
5759
(unless (package-installed-p 'use-package)

0 commit comments

Comments
 (0)