summaryrefslogtreecommitdiff
path: root/.config/emacs
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-10 20:59:22 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-10 20:59:22 +0200
commit6bd3791ac26c1a9cf19b75c2d42dff0ea3532cef (patch)
treea12a999e695cd3ffbea02c985eb296ee5575d2ae /.config/emacs
parent5ba6b7221c3f7c67d773acd56f70e4f01eba2fcf (diff)
emacs: Slight refactor
Diffstat (limited to '.config/emacs')
-rw-r--r--.config/emacs/init.el23
1 files changed, 15 insertions, 8 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index ff0c679..ea03454 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -12,16 +12,23 @@
native-comp-async-report-warnings-errors nil
native-comp-verbose 0
native-comp-debug 0
- native-comp-jit-compilation t))
+ native-comp-jit-compilation t
+ native-compile-prune-cache t))
(require 'package)
-(let ((scheme (concat "http" (when (gnutls-available-p) "s") "://")))
- (x-set
- package-archives
- `(("gnu" . ,(concat scheme "elpa.gnu.org/packages/"))
- ("nongnu" . ,(concat scheme "elpa.nongnu.org/nongnu/"))
- ("melpa" . ,(concat scheme "melpa.org/packages/")))))
-(x-set package-user-dir (expand-file-name "pkg" x-data-directory))
+(x-set
+ package-archives (let ((protocol (if (gnutls-available-p) "https" "http")))
+ (mapcar
+ (lambda (pair)
+ (cons (car pair) (concat protocol "://" (cdr pair))))
+ '(("gnu" . "elpa.gnu.org/packages/")
+ ("nongnu" . "elpa.nongnu.org/nongnu/")
+ ("melpa" . "melpa.org/packages/"))))
+ package-archive-priorities '(("gnu" . 3)
+ ("nongnu" . 2)
+ ("melpa" . 1))
+ package-user-dir (expand-file-name "pkg" x-data-directory))
+
(package-initialize)
(eval-and-compile