mu4e: Split libraries into outline sections

This commit is contained in:
Jonas Bernoulli
2020-02-11 15:10:35 +01:00
committed by Dirk-Jan C. Binnema
parent 040c6578be
commit 74332947a0
15 changed files with 239 additions and 203 deletions

View File

@ -63,9 +63,9 @@
;;
;; c) this is handled in our handler for the `sent'-message from the backend
;; (`mu4e-sent-handler')
;;
;;; Code:
(require 'cl-lib)
(require 'message)
(require 'mail-parse)
@ -80,8 +80,8 @@
(require 'mu4e-draft)
(require 'mu4e-context)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Composing / Sending messages
;;; Composing / Sending messages
(defgroup mu4e-compose nil
"Customizations for composing/sending messages."
:group 'mu4e)
@ -203,7 +203,7 @@ place to do that."
"The compose-type for this buffer.
This is a symbol, `new', `forward', `reply' or `edit'.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; UNNAMED
(defun mu4e-compose-attach-message (msg)
"Insert message MSG as an attachment."
@ -224,7 +224,7 @@ Messages are captured with `mu4e-action-capture-message'."
(mu4e-warn "No message has been captured"))
(mu4e-compose-attach-message mu4e-captured-message))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; UNNAMED
;; 'fcc' refers to saving a copy of a sent message to a certain folder. that's
;; what these 'Sent mail' folders are for!
@ -321,9 +321,11 @@ Message-ID."
;; update the file on disk -- ie., without the separator
(mu4e~proc-add (buffer-file-name)))) nil t))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; address completion; inspired by org-contacts.el and
;;; address completion
;; inspired by org-contacts.el and
;; https://github.com/nordlow/elisp/blob/master/mine/completion-styles-cycle.el
(defun mu4e~compose-complete-handler (str pred action)
"Complete address STR with predication PRED for ACTION."
(cond
@ -374,7 +376,8 @@ removing the In-Reply-To header."
(unless (message-fetch-field "in-reply-to")
(message-remove-header "References")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; UNNAMED
(defvar mu4e-compose-mode-map nil
"Keymap for \"*mu4e-compose*\" buffers.")
(unless mu4e-compose-mode-map
@ -815,7 +818,7 @@ draft message."
(mu4e-compose 'new))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; UNNAMED
;; mu4e-compose-func and mu4e-send-func are wrappers so we can set ourselves
;; as default emacs mailer (define-mail-user-agent etc.)
@ -901,7 +904,7 @@ buffer buried."
"Return the `mu4e-user-agent' symbol."
'mu4e-user-agent)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; UNNAMED
(defun mu4e-compose-goto-top (&optional arg)
"Go to the beginning of the message or buffer.