mu4e: cosmetics

This commit is contained in:
Dirk-Jan C. Binnema
2024-08-23 23:17:34 +03:00
parent e63110fad9
commit f101e0d4ca
2 changed files with 16 additions and 13 deletions

View File

@ -26,7 +26,7 @@
;; quite a bit of trickery involved to make the message-mode functions work in ;; quite a bit of trickery involved to make the message-mode functions work in
;; this context; see mu4e-draft for details. ;; this context; see mu4e-draft for details.
;;; Code: ;;; Code:
(require 'message) (require 'message)
(require 'sendmail) (require 'sendmail)
@ -41,7 +41,7 @@
(require 'mu4e-draft) (require 'mu4e-draft)
;;; User configuration for compose-mode ;;; User configuration for compose-mode
(defgroup mu4e-compose nil (defgroup mu4e-compose nil
"Customization for composing/sending messages." "Customization for composing/sending messages."
@ -91,7 +91,7 @@ This multiplexes the `message-mode' hooks `message-send-actions',
:type 'hook :type 'hook
:group 'mu4e-compose) :group 'mu4e-compose)
(defvar mu4e-captured-message) (defvar mu4e-captured-message)
(defun mu4e-compose-attach-captured-message () (defun mu4e-compose-attach-captured-message ()
@ -187,8 +187,8 @@ the file under our feet, which is a bit fragile."
(when message-signature (when message-signature
(save-excursion (message-insert-signature)))))))) (save-excursion (message-insert-signature))))))))
;;; address completion ;;; Address completion
;; inspired by org-contacts.el and ;; inspired by org-contacts.el and
;; https://github.com/nordlow/elisp/blob/master/mine/completion-styles-cycle.el ;; https://github.com/nordlow/elisp/blob/master/mine/completion-styles-cycle.el
@ -246,7 +246,7 @@ completion functions still apply."
(add-hook 'completion-at-point-functions (add-hook 'completion-at-point-functions
#'mu4e--compose-complete-contact-field -10 t))) #'mu4e--compose-complete-contact-field -10 t)))
;;; mu4e-compose-mode ;;; mu4e-compose-mode
(defun mu4e--compose-remap-faces () (defun mu4e--compose-remap-faces ()
"Remap `message-mode' faces to mu4e ones. "Remap `message-mode' faces to mu4e ones.
@ -344,7 +344,8 @@ This function uses `message-cite-function', and its settings apply."
(pop-mark) (pop-mark)
(goto-char (point-min)) (goto-char (point-min))
(buffer-string))) (buffer-string)))
;;; Interactive functions
;;;###autoload ;;;###autoload
(defalias 'mu4e-compose-mail #'mu4e-compose-new) (defalias 'mu4e-compose-mail #'mu4e-compose-new)
@ -394,7 +395,7 @@ If WIDE is non-nil, make it a \"wide\" reply (a.k.a.
"Wide reply to the message at point. "Wide reply to the message at point.
I.e., \"reply-to-all\"." I.e., \"reply-to-all\"."
(interactive) (interactive)
(mu4e-compose-reply-to nil t))1 (mu4e-compose-reply-to nil t))
;;;###autoload ;;;###autoload
(defun mu4e-compose-supersede () (defun mu4e-compose-supersede ()
@ -468,7 +469,7 @@ The message is resent as-is, without any editing. See
(insert-file-contents (mu4e-message-readable-path msg)) (insert-file-contents (mu4e-message-readable-path msg))
(message-resend address)))) (message-resend address))))
;;; Compose Mail ;;; Compose-mode
(declare-function mu4e "mu4e") (declare-function mu4e "mu4e")
@ -487,7 +488,7 @@ The message is resent as-is, without any editing. See
(defun mu4e-user-agent () (defun mu4e-user-agent ()
"Return the `mu4e-user-agent' symbol." "Return the `mu4e-user-agent' symbol."
'mu4e-user-agent) 'mu4e-user-agent)
;;; minor mode for use in other modes. ;;; minor mode for use in other modes.
(defvar mu4e-compose-minor-mode-map (defvar mu4e-compose-minor-mode-map
(let ((map (make-sparse-keymap))) (let ((map (make-sparse-keymap)))
@ -520,6 +521,6 @@ The message is resent as-is, without any editing. See
["Resend" mu4e-compose-resend ["Resend" mu4e-compose-resend
:help "Re-send message"]) :help "Re-send message"])
"Easy menu items for message composition.") "Easy menu items for message composition.")
;;; ;;;
(provide 'mu4e-compose) (provide 'mu4e-compose)
;;; mu4e-compose.el ends here ;;; mu4e-compose.el ends here

View File

@ -345,7 +345,7 @@ appropriate sent-messages folder. If MSGPATH is nil, do nothing."
(mu4e-join-paths target-mdir "new" 'parents))) (mu4e-join-paths target-mdir "new" 'parents)))
(write-file msgpath) (write-file msgpath)
(mu4e--server-add msgpath)))) (mu4e--server-add msgpath))))
;; save / send hooks ;; save / send hooks
(defvar-local mu4e--compose-undo nil (defvar-local mu4e--compose-undo nil
@ -655,7 +655,9 @@ either `send', `exit', `kill' or `postpone'.")
(defvar mu4e-compose-post-hook) (defvar mu4e-compose-post-hook)
(defun mu4e--message-post-actions (trigger) (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'; I.e. this multiplexes the `message-(send|exit|kill|postpone)-actions';
with the mu4e-message-post-action set accordingly." with the mu4e-message-post-action set accordingly."