]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-mua.el
emacs: mua: extract a common message-send function.
[notmuch] / emacs / notmuch-mua.el
index fadf20fec7a7d6312ec8ad86d744b8743e9a129d..72fb770547cffefa38b855fc6a3a5feafe46dfa1 100644 (file)
@@ -253,8 +253,11 @@ mutiple parts get a header."
                       (notmuch-show-insert-header-p-function notmuch-mua-reply-insert-header-p-function)
                       ;; Don't indent multipart sub-parts.
                       (notmuch-show-indent-multipart nil))
-                   (notmuch-show-insert-body original (plist-get original :body) 0)
-                   (buffer-substring-no-properties (point-min) (point-max)))))
+                   ;; We don't want sigstatus buttons (an information leak and usually wrong anyway).
+                   (letf (((symbol-function 'notmuch-crypto-insert-sigstatus-button) #'ignore)
+                          ((symbol-function 'notmuch-crypto-insert-encstatus-button) #'ignore))
+                         (notmuch-show-insert-body original (plist-get original :body) 0)
+                         (buffer-substring-no-properties (point-min) (point-max))))))
 
        (set-mark (point))
        (goto-char start)
@@ -487,15 +490,20 @@ will be addressed to all recipients of the source message."
     (notmuch-mua-reply query-string sender reply-all)
     (deactivate-mark)))
 
-(defun notmuch-mua-send-and-exit (&optional arg)
+(defun notmuch-mua-send-common (arg &optional exit)
   (interactive "P")
   (letf (((symbol-function 'message-do-fcc) #'notmuch-maildir-message-do-fcc))
-       (message-send-and-exit arg)))
+       (if exit
+           (message-send-and-exit arg)
+         (message-send arg))))
+
+(defun notmuch-mua-send-and-exit (&optional arg)
+  (interactive "P")
+  (notmuch-mua-send-common arg 't))
 
 (defun notmuch-mua-send (&optional arg)
   (interactive "P")
-  (letf (((symbol-function 'message-do-fcc) #'notmuch-maildir-message-do-fcc))
-       (message-send arg)))
+  (notmuch-mua-send-common arg))
 
 (defun notmuch-mua-kill-buffer ()
   (interactive)