X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-mua.el;fp=emacs%2Fnotmuch-mua.el;h=6fe5f6d0152ad855dca18c7fe451c15431b2a13a;hp=c38cb5aa147e0e523f2fbddb4811a6a78483c8c2;hb=2ca941163da06aed564dab1990fb333fd7457ec2;hpb=adc123e4fd6384fba0165ebddc99d4323f6bee73 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index c38cb5aa..6fe5f6d0 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -38,7 +38,7 @@ (declare-function notmuch-draft-postpone "notmuch-draft" ()) (declare-function notmuch-draft-save "notmuch-draft" ()) -;; +;;; Options (defcustom notmuch-mua-send-hook nil "Hook run before sending messages." @@ -120,7 +120,7 @@ to `notmuch-mua-send-hook'." :type 'regexp :group 'notmuch-send) -;; +;;; Various functions (defun notmuch-mua-attachment-check () "Signal an error if the message text indicates that an @@ -215,6 +215,8 @@ Typically this is added to `notmuch-mua-send-hook'." (funcall original-func header references) (unless (bolp) (insert "\n"))) +;;; Mua reply + (defun notmuch-mua-reply (query-string &optional sender reply-all) (let ((args '("reply" "--format=sexp" "--format-version=4")) (process-crypto notmuch-show-process-crypto) @@ -318,6 +320,8 @@ Typically this is added to `notmuch-mua-send-hook'." (message-goto-body) (set-buffer-modified-p nil)) +;;; Mode and keymap + (defvar notmuch-message-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "C-c C-c") #'notmuch-mua-send-and-exit) @@ -333,6 +337,8 @@ Typically this is added to `notmuch-mua-send-hook'." (put 'notmuch-message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify) +;;; New messages + (defun notmuch-mua-pop-to-buffer (name switch-function) "Pop to buffer NAME, and warn if it already exists and is modified. Like `message-pop-to-buffer' but enable `notmuch-message-mode' @@ -528,6 +534,8 @@ will be addressed to all recipients of the source message." (notmuch-mua-reply query-string sender reply-all) (deactivate-mark))) +;;; Checks + (defun notmuch-mua-check-no-misplaced-secure-tag () "Query user if there is a misplaced secure mml tag. @@ -570,6 +578,8 @@ The <#secure> tag at the start of the body is not followed by a newline. It is likely that the message will be sent unsigned and unencrypted. Really send? ")))) +;;; Finishing commands + (defun notmuch-mua-send-common (arg &optional exit) (interactive "P") (run-hooks 'notmuch-mua-send-hook) @@ -593,7 +603,7 @@ unencrypted. Really send? ")))) (interactive) (message-kill-buffer)) -;; +;;; _ (define-mail-user-agent 'notmuch-user-agent 'notmuch-mua-mail 'notmuch-mua-send-and-exit @@ -603,8 +613,6 @@ unencrypted. Really send? ")))) ;; composing a message. (notmuch-mua-add-more-hidden-headers) -;; - (provide 'notmuch-mua) ;;; notmuch-mua.el ends here