[PATCH] emacs: Autoload notmuch-user-agent related functions

Subject: [PATCH] emacs: Autoload notmuch-user-agent related functions

Date: Tue, 19 Mar 2024 22:31:00 +0100

To: notmuch@notmuchmail.org

Cc: Jelle Licht

From: jlicht@fsfe.org

From: Jelle Licht <jlicht@fsfe.org>

With this change, users with mail-user-agent set to
'notmuch-user-agent can start composing emails without having to
require 'notmuch-mua first.
 emacs/notmuch-mua.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index e4b7e9d1..7ef77ea5 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -401,6 +401,7 @@ instead of `message-mode' and SWITCH-FUNCTION is mandatory."
 	       (addr (and good-tokens (mapconcat #'identity good-tokens ", "))))
 	  (message-replace-header header addr))))))
 (defun notmuch-mua-mail (&optional to subject other-headers _continue
 				   switch-function yank-action send-actions
 				   return-action &rest _ignored)
@@ -622,20 +623,23 @@ unencrypted.  Really send? "))))
 	  (message-send-and-exit arg)
 	(message-send arg)))))
 (defun notmuch-mua-send-and-exit (&optional arg)
   (interactive "P")
   (notmuch-mua-send-common arg t))
 (defun notmuch-mua-send (&optional arg)
   (interactive "P")
   (notmuch-mua-send-common arg))
 (defun notmuch-mua-kill-buffer ()
 ;;; _
 (define-mail-user-agent 'notmuch-user-agent

notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org