From 0303f5d9317b256b545b5d4725e45a4c0a00f9df Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Thu, 21 Oct 2021 22:04:58 +0300 Subject: [PATCH] mu4e: compose/draft: remove some mostly obsolete things Avoid some compiler warnings. --- mu4e/mu4e-compose.el | 19 +------------------ mu4e/mu4e-draft.el | 39 +++------------------------------------ 2 files changed, 4 insertions(+), 54 deletions(-) diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index ae6be8b9..312a4e72 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -343,16 +343,12 @@ buffers; lets remap its faces so it uses the ones for mu4e." (set (make-local-variable 'message-signature) mu4e-compose-signature) ;; set this to allow mu4e to work when gnus-agent is unplugged in gnus (set (make-local-variable 'message-send-mail-real-function) nil) - (make-local-variable 'message-default-charset) ;; Set to nil to enable `electric-quote-local-mode' to work: (make-local-variable 'comment-use-syntax) (setq comment-use-syntax nil) ;; message-mode has font-locking, but uses its own faces. Let's ;; use the mu4e-specific ones instead (mu4e~compose-remap-faces) - ;; if the default charset is not set, use UTF-8 - (unless message-default-charset - (setq message-default-charset 'utf-8)) (mu4e~compose-register-message-save-hooks) ;; offer completion for e-mail addresses (when mu4e-compose-complete-addresses @@ -559,20 +555,7 @@ are optional." (mu4e~draft-insert-mail-header-separator) ;; maybe encrypt/sign replies - (let ((mu4e-compose-crypto-policy ; backwards compatibility - (append - (cl-case mu4e-compose-crypto-reply-encrypted-policy - (sign '(sign-encrypted-replies)) - (encrypt '(encrypt-encrypted-replies)) - (sign-and-encrypt - '(sign-encrypted-replies encrypt-encrypted-replies))) - (cl-case mu4e-compose-crypto-reply-plain-policy - (sign '(sign-plain-replies)) - (encrypt '(encrypt-plain-replies)) - (sign-and-encrypt - '(sign-plain-replies encrypt-plain-replies))) - mu4e-compose-crypto-policy))) - (mu4e-compose-crypto-message original-msg compose-type)) + (mu4e-compose-crypto-message original-msg compose-type) ;; include files -- e.g. when inline forwarding a message with ;; attachments, we take those from the original. diff --git a/mu4e/mu4e-draft.el b/mu4e/mu4e-draft.el index 9cdd9ede..39a2d1d3 100644 --- a/mu4e/mu4e-draft.el +++ b/mu4e/mu4e-draft.el @@ -72,7 +72,7 @@ Useful when this is not equal to the From: address." "The parent message plist. This is the message being replied to, forwarded or edited; used in `mu4e-compose-pre-hook'. For new messages, it is nil.") - + (make-obsolete-variable 'mu4e-auto-retrieve-keys "no longer used." "1.3.1") (defcustom mu4e-decryption-policy t @@ -182,42 +182,9 @@ All `sign-*' options have a `encrypt-*' analogue." (const :tag "Encrypt replies to encrypted messages" encrypt-encrypted-replies)) :group 'mu4e-compose) -(defcustom mu4e-compose-crypto-reply-encrypted-policy nil - "Policy for signing/encrypting replies to encrypted messages. -We have the following choices: - -- `sign': sign the reply -- `sign-and-encrypt': sign and encrypt the reply -- `encrypt': encrypt the reply, but don't sign it. -- anything else: do nothing." - :type '(choice - (const :tag "Sign the reply" sign) - (const :tag "Sign and encrypt the reply" sign-and-encrypt) - (const :tag "Encrypt the reply" encrypt) - (const :tag "Don't do anything" nil)) - :safe 'symbolp - :group 'mu4e-compose) - (make-obsolete-variable 'mu4e-compose-crypto-reply-encrypted-policy "The use of the 'mu4e-compose-crypto-reply-encrypted-policy' variable is deprecated. - 'mu4e-compose-crypto-policy' should be used instead" - "2020-03-06") - -(defcustom mu4e-compose-crypto-reply-plain-policy nil - "Policy for signing/encrypting replies to messages received unencrypted. -We have the following choices: - -- `sign': sign the reply -- `sign-and-encrypt': sign and encrypt the reply -- `encrypt': encrypt the reply, but don't sign it. -- anything else: do nothing." - :type '(choice - (const :tag "Sign the reply" sign) - (const :tag "Sign and encrypt the reply" sign-and-encrypt) - (const :tag "Encrypt the reply" encrypt) - (const :tag "Don't do anything" nil)) - :safe 'symbolp - :group 'mu4e-compose) + 'mu4e-compose-crypto-policy' should be used instead" "2020-03-06") (make-obsolete-variable 'mu4e-compose-crypto-reply-plain-policy "The use of the 'mu4e-compose-crypto-reply-plain-policy' variable is deprecated. @@ -768,7 +735,7 @@ This is based on `mu4e-drafts-folder', which is evaluated once.") (defun mu4e~draft-open-file (path switch-function) "Open the the draft file at PATH." (let ((buf (find-file-noselect path))) - (funcall (or + (funcall (or switch-function (and mu4e-compose-in-new-frame 'switch-to-buffer-other-frame) 'switch-to-buffer)