* move all user-agent stuff to mu4e-compose

This commit is contained in:
djcb 2012-04-30 17:34:51 +03:00
parent e2a0fc31cf
commit de2e719dd2
2 changed files with 12 additions and 14 deletions

View File

@ -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)

View File

@ -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)