From 32d1bb352c6f6be3b503de7fa62a58abff3b7dbc Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Wed, 14 Sep 2022 08:06:29 +0200 Subject: Keep porting to use-package That one was a doozy. --- .emacs | 25 +++++++++++++++++++++++++ .emacs-custom.el | 13 ------------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.emacs b/.emacs index d786880..64a2264 100644 --- a/.emacs +++ b/.emacs @@ -649,6 +649,14 @@ ;; 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 ediff :custom (ediff-merge-split-window-function 'split-window-vertically) @@ -660,6 +668,23 @@ (eldoc-echo-area-use-multiline-p nil) :delight "📖") +(use-package erc + :custom + (erc-log-channels-directory "~/.irc-logs") + (erc-log-write-after-insert t) + (erc-log-write-after-send t) + (erc-notifications-icon + (concat data-directory "images/icons/hicolor/scalable/apps/emacs.svg")) + (erc-notifications-mode t) + (erc-prompt-for-nickserv-password nil) + (erc-prompt-for-password nil) + (erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "333" "353")) + (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)))) + (use-package icomplete :config (setq icomplete-scroll t) diff --git a/.emacs-custom.el b/.emacs-custom.el index 8dcd745..73cfcaa 100644 --- a/.emacs-custom.el +++ b/.emacs-custom.el @@ -20,19 +20,6 @@ '(electric-pair-mode t) '(enable-recursive-minibuffers t) '(epg-pinentry-mode 'loopback) - '(erc-log-channels-directory "~/.irc-logs") - '(erc-log-write-after-insert t) - '(erc-log-write-after-send t) - '(erc-modules - '(autojoin button completion irccontrols list log match menu move-to-prompt netsplit networks noncommands notifications readonly ring stamp track)) - `(erc-notifications-icon - ,(concat data-directory "images/icons/hicolor/scalable/apps/emacs.svg")) - '(erc-notifications-mode t) - '(erc-prompt-for-nickserv-password nil) - '(erc-prompt-for-password nil) - '(erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "333" "353")) - '(erc-use-auth-source-for-nickserv-password t) - '(erc-user-full-name 'user-full-name) '(eshell-scroll-show-maximum-output nil) '(find-ls-option '("-exec ls -ld {} +" . "-ld")) '(font-use-system-font t) -- cgit v1.2.3