From 17ca22454d0875d28a746a999c1c21e0b995e7d9 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 10 Feb 2025 15:15:25 -0500 Subject: Tweak the Emacs package management setup --- .emacs.d/init.el | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to '.emacs.d') diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 2c2e7cc..96669d2 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -105,19 +105,18 @@ plain variables. This means that `setopt' will execute any ;;; Package management -;; List of the packages I use from GNU ELPA and NonGNU ELPA. -(setq - package-selected-packages - '(debbugs delight eat elpher)) - (require 'package) (package-initialize) -;; Add NonGNU ELPA on older Emacsen. -(when (version< emacs-version "28") - (add-to-list - 'package-archives - '("nongnu" . "https://elpa.nongnu.org/nongnu/"))) +(setopt + ;; Explicitly set `package-archives', in part to ensure https ones + ;; are used, and also to have NonGNU ELPA on older Emacsel as well. + package-archives + '(("gnu" . "https://elpa.gnu.org/packages/") + ("nongnu" . "https://elpa.nongnu.org/nongnu/")) + ;; List of the packages I use from GNU ELPA and NonGNU ELPA. + package-selected-packages + '(debbugs delight eat elpher)) (unless package-archive-contents (package-refresh-contents)) -- cgit v1.2.3-60-g2f50