From b04b3bcea907395a79a6d36de876b3cb13eb6cbb Mon Sep 17 00:00:00 2001 From: djcb Date: Thu, 9 Mar 2017 01:27:44 +0200 Subject: [PATCH] mu4e: don't require user-agent string --- mu4e/mu4e-draft.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mu4e/mu4e-draft.el b/mu4e/mu4e-draft.el index cabb6016..dca747f5 100644 --- a/mu4e/mu4e-draft.el +++ b/mu4e/mu4e-draft.el @@ -79,7 +79,7 @@ current window." (defvar mu4e-user-agent-string (format "mu4e %s; emacs %s" mu4e-mu-version emacs-version) - "The User-Agent string for mu4e.") + "The User-Agent string for mu4e, or nil.") (defun mu4e~draft-cite-original (msg) "Return a cited version of the original message MSG as a plist. @@ -356,7 +356,8 @@ You can append flags." (defun mu4e~draft-common-construct () "Construct the common headers for each message." (concat - (mu4e~draft-header "User-agent" mu4e-user-agent-string) + (when mu4e-user-agent-string + (mu4e~draft-header "User-agent" mu4e-user-agent-string)) (when mu4e-compose-auto-include-date (mu4e~draft-header "Date" (message-make-date))))) @@ -429,9 +430,9 @@ fields will be the same as in the original." mu4e~draft-forward-prefix) subject)) (unless mu4e-compose-forward-as-attachment - (concat - "\n\n" - (mu4e~draft-cite-original origmsg)))))) + (concat + "\n\n" + (mu4e~draft-cite-original origmsg)))))) (defun mu4e~draft-newmsg-construct () "Create a new message." @@ -500,7 +501,7 @@ will be created from either `mu4e~draft-reply-construct', or (forward (mu4e~draft-forward-construct msg)) (new (mu4e~draft-newmsg-construct))))) (mu4e~draft-open-file draft-path) - (insert initial-contents) + (insert initial-contents) (newline) ;; include the message signature (if it's set) (if (and mu4e-compose-signature-auto-include mu4e-compose-signature)