From 6d7e3ad36523de67cb62f9c1be424b29d53aae78 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 23 Jul 2024 14:00:40 -0400 Subject: [PATCH] fix(irc): circe-color-nicks & circe-new-day-notifier Prior to this, the user would need to know the precise load order of circe and circe-color-nicks/circe-new-day-notifier to overwrite Doom's defaults in an `after!` or `with-eval-after-load` block. Also, `enable-circe-color-nicks` does not have buffer-local side-effects, so shouldn't be hooked to `circe-channel-mode-hook`. Close: #7959 Co-authored-by: Thaodan --- modules/app/irc/config.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/app/irc/config.el b/modules/app/irc/config.el index 940436847..5f527f0c5 100644 --- a/modules/app/irc/config.el +++ b/modules/app/irc/config.el @@ -132,14 +132,21 @@ playback.") (use-package! circe-color-nicks - :hook (circe-channel-mode . enable-circe-color-nicks) + :defer t + ;; NOTE: I avoid `:after' on purpose, because it convolutes load order and + ;; makes it harder for users to know what to target with `after!' or + ;; `with-eval-after-load' when trying to configure packages. + :init (after! circe (require 'circe-color-nicks)) :config (setq circe-color-nicks-min-constrast-ratio 4.5 - circe-color-nicks-everywhere t)) + circe-color-nicks-everywhere t) + (enable-circe-color-nicks)) (use-package! circe-new-day-notifier - :after circe + :defer t + ;; NOTE: See NOTE in `circe-color-nicks' above. + :init (after! circe (require 'circe-new-day-notifier)) :config (enable-circe-new-day-notifier) (setq circe-new-day-notifier-format-message