mirror of https://github.com/djcb/mu.git
mu4e: autoload major entry points
Autoload functions `mu4e' and `mu4e~compose-mail' and the definition of the mail-user-agent `mu4e-user-agent'. The last to are required so that `compose-mail' can be used without explicitly loading mu4e. Also require `mu4e' in mu4e-compose.el (after providing mu4e-compose to avoid a circular dependencies). This is required because the autoload definitions only cause mu4e-compose but not mu4e to be loaded when using `compose-mail', but if mu4e isn't loaded various handlers are not loaded (and possibly there are other problems if mu4e is not fully loaded).
This commit is contained in:
parent
6424a82d60
commit
17be9ec05a
|
@ -482,6 +482,7 @@ Ie. either 'name <email>' or 'email')."
|
|||
;; mu4e-compose-func and mu4e-send-func are wrappers so we can set ourselves
|
||||
;; as default emacs mailer (define-mail-user-agent etc.)
|
||||
|
||||
;;;###autoload
|
||||
(defun mu4e~compose-mail (&optional to subject other-headers continue
|
||||
switch-function yank-action send-actions return-action)
|
||||
"This is mu4e's implementation of `compose-mail'."
|
||||
|
@ -515,6 +516,7 @@ Ie. either 'name <email>' or 'email')."
|
|||
(message-goto-body))))
|
||||
|
||||
;; happily, we can re-use most things from message mode
|
||||
;;;###autoload
|
||||
(define-mail-user-agent 'mu4e-user-agent
|
||||
'mu4e~compose-mail
|
||||
'message-send-and-exit
|
||||
|
@ -547,3 +549,7 @@ Ie. either 'name <email>' or 'email')."
|
|||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(provide 'mu4e-compose)
|
||||
|
||||
;; Load mu4e completely even when this file was loaded through
|
||||
;; autoload.
|
||||
(require 'mu4e)
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;###autoload
|
||||
(defun mu4e ()
|
||||
"Start mu4e."
|
||||
(interactive)
|
||||
|
|
Loading…
Reference in New Issue