Skip to content

Commit

Permalink
mu4e: cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
djcb committed Aug 26, 2024
1 parent e63110f commit f101e0d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
23 changes: 12 additions & 11 deletions mu4e/mu4e-compose.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
;; quite a bit of trickery involved to make the message-mode functions work in
;; this context; see mu4e-draft for details.



;;; Code:
(require 'message)
(require 'sendmail)
Expand All @@ -41,7 +41,7 @@

(require 'mu4e-draft)



;;; User configuration for compose-mode
(defgroup mu4e-compose nil
"Customization for composing/sending messages."
Expand Down Expand Up @@ -91,7 +91,7 @@ This multiplexes the `message-mode' hooks `message-send-actions',
:type 'hook
:group 'mu4e-compose)




(defvar mu4e-captured-message)
(defun mu4e-compose-attach-captured-message ()
Expand Down Expand Up @@ -187,8 +187,8 @@ the file under our feet, which is a bit fragile."
(when message-signature
(save-excursion (message-insert-signature))))))))


;;; address completion

;;; Address completion

;; inspired by org-contacts.el and
;; https://github.com/nordlow/elisp/blob/master/mine/completion-styles-cycle.el
Expand Down Expand Up @@ -246,7 +246,7 @@ completion functions still apply."
(add-hook 'completion-at-point-functions
#'mu4e--compose-complete-contact-field -10 t)))

;;; mu4e-compose-mode
;;; mu4e-compose-mode
(defun mu4e--compose-remap-faces ()
"Remap `message-mode' faces to mu4e ones.
Expand Down Expand Up @@ -344,7 +344,8 @@ This function uses `message-cite-function', and its settings apply."
(pop-mark)
(goto-char (point-min))
(buffer-string)))


;;; Interactive functions

;;;###autoload
(defalias 'mu4e-compose-mail #'mu4e-compose-new)
Expand Down Expand Up @@ -394,7 +395,7 @@ If WIDE is non-nil, make it a \"wide\" reply (a.k.a.
"Wide reply to the message at point.
I.e., \"reply-to-all\"."
(interactive)
(mu4e-compose-reply-to nil t))1
(mu4e-compose-reply-to nil t))

;;;###autoload
(defun mu4e-compose-supersede ()
Expand Down Expand Up @@ -468,7 +469,7 @@ The message is resent as-is, without any editing. See
(insert-file-contents (mu4e-message-readable-path msg))
(message-resend address))))

;;; Compose Mail
;;; Compose-mode

(declare-function mu4e "mu4e")

Expand All @@ -487,7 +488,7 @@ The message is resent as-is, without any editing. See
(defun mu4e-user-agent ()
"Return the `mu4e-user-agent' symbol."
'mu4e-user-agent)


;;; minor mode for use in other modes.
(defvar mu4e-compose-minor-mode-map
(let ((map (make-sparse-keymap)))
Expand Down Expand Up @@ -520,6 +521,6 @@ The message is resent as-is, without any editing. See
["Resend" mu4e-compose-resend
:help "Re-send message"])
"Easy menu items for message composition.")
;;;
;;;
(provide 'mu4e-compose)
;;; mu4e-compose.el ends here
6 changes: 4 additions & 2 deletions mu4e/mu4e-draft.el
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ appropriate sent-messages folder. If MSGPATH is nil, do nothing."
(mu4e-join-paths target-mdir "new" 'parents)))
(write-file msgpath)
(mu4e--server-add msgpath))))


;; save / send hooks

(defvar-local mu4e--compose-undo nil
Expand Down Expand Up @@ -655,7 +655,9 @@ either `send', `exit', `kill' or `postpone'.")

(defvar mu4e-compose-post-hook)
(defun mu4e--message-post-actions (trigger)
"Invoked after we're done with a message.
"Invoked after we're done with a message with TRIGGER.
See `mu4e-message-post-action' for the available triggers.
I.e. this multiplexes the `message-(send|exit|kill|postpone)-actions';
with the mu4e-message-post-action set accordingly."
Expand Down

0 comments on commit f101e0d

Please sign in to comment.