* mu4e: add mu4e-compose-signature-auto-include and document it

This commit is contained in:
djcb
2013-12-21 10:58:55 -08:00
parent 0de40a2f93
commit 5f6c274b3c
2 changed files with 26 additions and 7 deletions

View File

@ -60,6 +60,13 @@ messages). This is the mu4e-specific version of
:type 'sexp
:group 'mu4e-compose)
(defcustom mu4e-compose-signature-auto-include t
"Whether to automatically include a message-signature in new
messages (if it is set)."
:type 'boolean
:group 'mu4e-compose)
(defun mu4e~draft-user-agent-construct ()
"Return the User-Agent string for mu4e.
This is either the value of `mu4e-user-agent', or, if not set, a
@ -411,10 +418,11 @@ from either `mu4e~draft-reply-construct', or
(forward (mu4e~draft-forward-construct msg))
(new (mu4e~draft-newmsg-construct))
(t (mu4e-error "unsupported compose-type %S" compose-type))))
;; include the message signature (if it's set)
(let ((message-signature mu4e-compose-signature))
(message-insert-signature)
(mu4e~fontify-signature))))
;; include the message signature (if it's set)
(when mu4e-compose-signature-auto-include
(let ((message-signature mu4e-compose-signature))
(message-insert-signature)
(mu4e~fontify-signature)))))
;; evaluate mu4e~drafts-drafts-folder once, here, and use that value
;; throughout.
(set (make-local-variable 'mu4e~draft-drafts-folder) draft-dir)

View File

@ -1345,6 +1345,7 @@ functionality is available, as well some @t{mu4e}-specifics. Its major mode is
* Compose hooks::
* Signing and encrypting::
* Queuing mail::
* Message signatures::
* Other settings::
@end menu
@ -1544,6 +1545,19 @@ man-pages for details.
reach their destination until you switch it off again; so, be careful not to
do this accidentally!
@node Message signatures
@section Message signatures
Message signatures are the standard footer blobs in e-mail messages where you
can put in information you want to include in every message. The text to
include is set with @code{mu4e-compose-signature}.
If you don't want to include this automatically with each message,
you can set @code{mu4e-compose-signature-auto-include} to @code{nil}; you can
then still include the signature manually, using the function
@code{message-insert-signature}, typically bound to @kbd{C-c C-w}.
@node Other settings
@section Other settings
@ -3186,7 +3200,6 @@ environment with e.g., your main account:
(setq mu4e-sent-folder "/Account1/Saved Items"
mu4e-drafts-folder "/Account1/Drafts"
user-mail-address "my.address@@account1.tld"
message-signature-file ".Signature1.txt"
smtpmail-default-smtp-server "smtp.account1.tld"
smtpmail-local-domain "account1.tld"
smtpmail-smtp-server "smtp.account1.tld"
@ -3206,7 +3219,6 @@ value)} pairs:
(mu4e-sent-folder "/Account1/Saved Items")
(mu4e-drafts-folder "/Account1/Drafts")
(user-mail-address "my.address@@account1.tld")
(message-signature-file ".Signature1.txt")
(smtpmail-default-smtp-server "smtp.account1.tld")
(smtpmail-local-domain "account1.tld")
(smtpmail-smtp-server "smtp.account1.tld")
@ -3216,7 +3228,6 @@ value)} pairs:
(mu4e-sent-folder "/Account2/Saved Items")
(mu4e-drafts-folder "/Account2/Drafts")
(user-mail-address "my.address@@account2.tld)
(message-signature-file ".Signature2.txt")
(smtpmail-default-smtp-server "smtp.account2.tld)
(smtpmail-local-domain "account2.tld")
(smtpmail-smtp-server "smtp.account2.tld)