From 8fa265bd9b152cfea9e94a154866a623b8b74992 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Thu, 25 Apr 2024 17:16:58 +0200 Subject: [PATCH] Exemplarily simplify hook definition for BBDB setup Inspired by the `use-package` documentation, but the other places where `add-hook` is called this simplification does not seem to be appropriate from my point of view (missing `-hook` suffix, better readability when calling `add-hook` directly). --- init.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index 38d94e7..2128b8f 100644 --- a/init.el +++ b/init.el @@ -1454,14 +1454,13 @@ Note that this workaround is incomplete, as explained in this comment." bbdb-initialize bbdb-mua-auto-update-init bbdb-save) + :hook ((message-setup . bbdb-mail-aliases) + (mail-setup . bbdb-mail-aliases)) :init (setq bbdb-completion-display-record nil bbdb-complete-mail-allow-cycling t bbdb-mua-auto-action 'query bbdb-default-country "Germany") - :config (progn - (add-hook 'message-setup-hook 'bbdb-mail-aliases) - (add-hook 'mail-setup-hook 'bbdb-mail-aliases) - (run-with-timer 0 3600 #'bbdb-save))) + :config (run-with-timer 0 3600 #'bbdb-save)) ;; Gnus package configuration