]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Autoload notmuch-user-agent related functions
authorJelle Licht <jlicht@fsfe.org>
Tue, 19 Mar 2024 21:31:00 +0000 (22:31 +0100)
committerDavid Bremner <david@tethera.net>
Thu, 4 Apr 2024 11:20:51 +0000 (08:20 -0300)
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

index e4b7e9d17848ce08c71bf245869e85234f9ad711..bf62b65691810f491cb9f98d04e0acc760a4a3ad 100644 (file)
@@ -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))))))
 
+;;;#autoload
 (defun notmuch-mua-mail (&optional to subject other-headers _continue
                                   switch-function yank-action send-actions
                                   return-action &rest _ignored)
@@ -622,20 +623,24 @@ unencrypted.  Really send? "))))
          (message-send-and-exit arg)
        (message-send arg)))))
 
+;;;#autoload
 (defun notmuch-mua-send-and-exit (&optional arg)
   (interactive "P")
   (notmuch-mua-send-common arg t))
 
+;;;#autoload
 (defun notmuch-mua-send (&optional arg)
   (interactive "P")
   (notmuch-mua-send-common arg))
 
+;;;#autoload
 (defun notmuch-mua-kill-buffer ()
   (interactive)
   (message-kill-buffer))
 
 ;;; _
 
+;;;#autoload
 (define-mail-user-agent 'notmuch-user-agent
   'notmuch-mua-mail
   'notmuch-mua-send-and-exit