summaryrefslogtreecommitdiff
path: root/.config/emacs/init.el
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-01-08 23:18:23 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-01-08 23:18:23 -0700
commitb35562a9b86b05fa92231ee812eae3fda60cd787 (patch)
treec73c47b1da874bd2d5839be22b1b9bec06f99a03 /.config/emacs/init.el
parent86c373e908ef3bc1aafb06ea95f7ad546a9b62e2 (diff)
emacs: Fuss with the package.el/use-package.el initialization
Diffstat (limited to '.config/emacs/init.el')
-rw-r--r--.config/emacs/init.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 87ae351..bd4ac42 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -59,6 +59,15 @@
;; package.el
(when (require 'package)
+ ;; Don't clutter custom.el with `package-selected-packages`; I want
+ ;; to exclusively use use-package for this.
+ (defun package--save-selected-packages--nocustom (&optional value)
+ "Set `package-selected-packages' to VALUE."
+ (when value
+ (setq package-selected-packages value)))
+ (advice-add 'package--save-selected-packages
+ :override #'package--save-selected-packages--nocustom)
+ ;; Add Melpa repos.
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
(add-to-list 'package-archives