summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2022-12-26 23:46:37 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2022-12-27 00:25:18 +0100
commit5c916cbb4f2e6b89d9fb36052506ad6d425830f0 (patch)
tree318c3b8910b25cbbc7700d98f0cf55b710d14283
parent9d67e091af367154d3346d845cdc8a44f42d29d5 (diff)
downloaddotfiles-5c916cbb4f2e6b89d9fb36052506ad6d425830f0.tar.xz
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)
-rw-r--r--.emacs43
-rw-r--r--.emacs-custom.el2
2 files changed, 32 insertions, 13 deletions
diff --git a/.emacs b/.emacs
index 0841f43..1604dd5 100644
--- 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
index 73cfcaa..de57927 100644
--- 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)