X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-mua.el;h=bbf059a22cb5487f669497631363a7c924b1d3d8;hb=6cae6f32b197f863c2e53a8fc28d888998a4fb7c;hp=2e4dc71a8d5a7358e4addf1036a2d169ee6fc2e3;hpb=692acdf9da2ca93d46259ca31780ed632c2975c4;p=notmuch diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 2e4dc71a..bbf059a2 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -21,8 +21,6 @@ ;;; Code: -(eval-when-compile (require 'cl-lib)) - (require 'message) (require 'mm-view) (require 'format-spec) @@ -219,11 +217,10 @@ Typically this is added to `notmuch-mua-send-hook'." (defun notmuch-mua-reply-crypto (parts) "Add mml sign-encrypt flag if any part of original message is encrypted." (cl-loop for part in parts - if (notmuch-match-content-type (plist-get part :content-type) - "multipart/encrypted") + for type = (plist-get part :content-type) + if (notmuch-match-content-type type "multipart/encrypted") do (mml-secure-message-sign-encrypt) - else if (notmuch-match-content-type (plist-get part :content-type) - "multipart/*") + else if (notmuch-match-content-type type "multipart/*") do (notmuch-mua-reply-crypto (plist-get part :content)))) ;; There is a bug in Emacs' message.el that results in a newline @@ -390,7 +387,7 @@ instead of `message-mode' and SWITCH-FUNCTION is mandatory." (interactive) (when notmuch-mua-user-agent-function (let ((user-agent (funcall notmuch-mua-user-agent-function))) - (unless (string= "" user-agent) + (unless (string-empty-p user-agent) (push (cons 'User-Agent user-agent) other-headers)))) (unless (assq 'From other-headers) (push (cons 'From (message-make-from