From de2e719dd20985fa2cba30e5c584bff051b778e5 Mon Sep 17 00:00:00 2001 From: djcb Date: Mon, 30 Apr 2012 17:34:51 +0300 Subject: [PATCH] * move all user-agent stuff to mu4e-compose --- emacs/mu4e-compose.el | 19 ++++++++++++------- emacs/mu4e-utils.el | 7 ------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/emacs/mu4e-compose.el b/emacs/mu4e-compose.el index fabe73cc..acda565a 100644 --- a/emacs/mu4e-compose.el +++ b/emacs/mu4e-compose.el @@ -48,12 +48,7 @@ the From: address.)" :type 'string :group 'mu4e-compose) - -(defcustom mu4e-user-agent nil - "The user-agent string; leave at `nil' for the default." - :type 'string - :group 'mu4e-compose) - + (defcustom mu4e-sent-messages-behavior 'sent "Determines what mu4e does with sent messages - this is a symbol which can be either: @@ -85,6 +80,16 @@ sent folder." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun mu4e~compose-user-agent-construct () + "Return the User-Agent string for mu4e. This is either the value +of `mu4e-user-agent', or, if not set, a string based on the versions +of mu4e and emacs." + (format "mu4e %s; emacs %s" mu4e-mu-version emacs-version)) + + + + (defun mu4e~compose-cite-original (msg) "Return a cited version of the original message MSG (ie., the plist). This function use gnus' `message-cite-function', and as @@ -273,7 +278,7 @@ You can append flags." (defun mu4e~compose-common-construct () "Construct the common headers for each message." - (mu4e~compose-header "User-agent" (mu4e-user-agent))) + (mu4e~compose-header "User-agent" (mu4e~compose-user-agent-construct))) (defun mu4e~compose-reply-construct (origmsg) diff --git a/emacs/mu4e-utils.el b/emacs/mu4e-utils.el index 7d8fc648..42f84ec6 100644 --- a/emacs/mu4e-utils.el +++ b/emacs/mu4e-utils.el @@ -368,13 +368,6 @@ top level if there is none." ('mu4e-view-mode "(mu4e)Message view") (t "mu4e")))) -(defun mu4e-user-agent () - "Return the User-Agent string for mu4e. This is either the value -of `mu4e-user-agent', or, if not set, a string based on the versions -of mu4e and emacs." - (or mu4e-user-agent - (format "mu4e %s; emacs %s" mu4e-mu-version emacs-version))) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun mu4e-msg-field (msg field)