]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle encrypting mime parts
authorRichard M Stallman <rms@gnu.org>
Wed, 14 Oct 2020 23:10:02 +0000 (19:10 -0400)
committerRichard Stallman <rms@gnu.org>
Wed, 14 Oct 2020 23:10:02 +0000 (19:10 -0400)
* epa-mail.el (epa-mail-encrypt): Insert any encoded mime parts
that are queued up to insert before sending the message.

lisp/epa-mail.el

index 3ad4da16c890f2602f4c2952b3c39eae37d269ff..dd171ab6474deac0da4492ec6ac2f0cdcf864581 100644 (file)
@@ -243,6 +243,11 @@ If no one is selected, symmetric encryption will be performed.  "
       (setq epa-last-coding-system-specified
            (or coding-system-for-write
                (select-safe-coding-system (point) (point-max)))))
+    ;; Insert contents of requested attachments, if any.
+    (when (and (eq major-mode 'mail-mode) mail-encode-mml)
+      (mml-to-mime)
+      (setq mail-encode-mml nil))
 
     ;; Don't let some read-only text stop us from encrypting.
     (let ((inhibit-read-only t))