From c409b9089945737c27a28ca6719dbd45e8a4ac16 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Fri, 10 May 2024 09:41:08 +0800 Subject: mail: Do not creating multiple processes * mail.el (durand-mail-update): If there is already a process that is fetching mails, we should not create more processes to do the same thing. --- mail.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mail.el b/mail.el index 6493ce3..47d7858 100644 --- a/mail.el +++ b/mail.el @@ -308,7 +308,8 @@ If FOREGROUND-P is `0', do not fetch mails, but just run ((and (numberp foreground-p) (= foreground-p 0)) (run-hooks 'durand-mail-update-hook)) - ((make-process + ((not (get-process "durand-mail-update")) + (make-process :name "durand-mail-update" :command durand-mail-update-command :filter (cond (foreground-p #'durand-mail-update-filter)) -- cgit v1.2.3-18-g5258