commit 5c916cbb4f2e6b89d9fb36052506ad6d425830f0
parent 9d67e091af367154d3346d845cdc8a44f42d29d5
Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com>
Date: Mon, 26 Dec 2022 23:46:37 +0100
Port package configuration to use-package
Also update package list:
- account eglot and use-package being built-in
- add a couple of packages for Emacs development (elisp-benchmarks,
gnus-mock)
- remove paradox (most features now built into vanilla package.el)
Diffstat:
2 files changed, 32 insertions(+), 13 deletions(-)
diff --git a/.emacs b/.emacs
@@ -24,8 +24,14 @@
;; to the default list, unless I cautiously audit every release.
;;
;; Examples: erc-modules, git-commit-setup-hook, package-archives.
-(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
+(defun my/list-update (l to-add &optional to-remove)
+ (declare (indent 1))
+ (thread-first
+ l (seq-union to-add) (seq-difference to-remove)))
+(if (fboundp 'setopt)
+ (defalias 'my/setopt 'setopt)
+ (defalias 'my/setopt 'customize-set-variable))
;;; Key bindings.
@@ -630,14 +636,6 @@
;; Trying out use-package.
-(defun my/list-update (l to-add to-remove)
- (thread-first
- l (seq-union to-add) (seq-difference to-remove)))
-
-(if (fboundp 'setopt)
- (defalias 'my/setopt 'setopt)
- (defalias 'my/setopt 'customize-set-variable))
-
(use-package emacs
:when (>= emacs-major-version 28)
:init
@@ -658,6 +656,29 @@
:config
(load-theme 'modus-vivendi))
+(use-package package
+ :custom
+ (package-selected-packages
+ (append '(auctex
+ debbugs
+ delight
+ diff-hl
+ elisp-benchmarks
+ gnus-mock
+ magit
+ markdown-mode
+ page-break-lines
+ rg
+ rust-mode
+ which-key
+ wgrep)
+ (when (<= emacs-major-version 29)
+ '(eglot use-package))))
+ :config
+ (my/setopt package-archives
+ (my/list-update package-archives
+ '(("melpa" . "https://melpa.org/packages/")))))
+
(use-package ediff
:custom
(ediff-merge-split-window-function 'split-window-vertically)
@@ -683,8 +704,8 @@
(erc-use-auth-source-for-nickserv-password t)
(erc-user-full-name 'user-full-name)
:config
- (my/setopt erc-modules (my/list-update
- erc-modules '(log notifications) '(fill))))
+ (my/setopt erc-modules (my/list-update erc-modules
+ '(log notifications) '(fill))))
(use-package icomplete
:config
diff --git a/.emacs-custom.el b/.emacs-custom.el
@@ -41,8 +41,6 @@
'(lua-indent-level 2)
'(menu-bar-mode nil)
'(minibuffer-depth-indicate-mode t)
- '(package-selected-packages
- '(async auctex debbugs delight diff-hl eglot flycheck magit markdown-mode page-break-lines paradox rg rust-mode use-package which-key wgrep))
'(page-break-lines-modes '(fundamental-mode text-mode prog-mode special-mode))
'(paradox-execute-asynchronously t)
'(paradox-github-token t)