Copyright (C) 2000-2012 |
GNU Info (message)Various Message VariablesVarious Message Variables ========================= `message-default-charset' Symbol naming a MIME charset. Non-ASCII characters in messages are assumed to be encoded using this charset. The default is `nil', which means ask the user. (This variable is used only on non-MULE Emacsen. Note: Charset Translation, for details on the MULE-to-MIME translation process. `message-signature-separator' Regexp matching the signature separator. It is `^-- *$' by default. `mail-header-separator' String used to separate the headers from the body. It is `--text follows this line--' by default. `message-directory' Directory used by many mailey things. The default is `~/Mail/'. `message-signature-setup-hook' Hook run when initializing the message buffer. It is run after the headers have been inserted but before the signature has been inserted. `message-setup-hook' Hook run as the last thing when the message buffer has been initialized, but before yanked text is inserted. `message-header-setup-hook' Hook called narrowed to the headers after initializing the headers. For instance, if you're running Gnus and wish to insert a `Mail-Copies-To' header in all your news articles and all messages you send to mailing lists, you could do something like the following: (defun my-message-header-setup-hook () (let ((group (or gnus-newsgroup-name ""))) (when (or (message-fetch-field "newsgroups") (gnus-group-find-parameter group 'to-address) (gnus-group-find-parameter group 'to-list)) (insert "Mail-Copies-To: never\n")))) (add-hook 'message-header-setup-hook 'my-message-header-setup-hook) `message-send-hook' Hook run before sending messages. If you want to add certain headers before sending, you can use the `message-add-header' function in this hook. For instance: (add-hook 'message-send-hook 'my-message-add-content) (defun my-message-add-content () (message-add-header "X-In-No-Sense: Nonsense") (message-add-header "X-Whatever: no")) This function won't add the header if the header is already present. `message-send-mail-hook' Hook run before sending mail messages. `message-send-news-hook' Hook run before sending news messages. `message-sent-hook' Hook run after sending messages. `message-mode-syntax-table' Syntax table used in message mode buffers. `message-send-method-alist' Alist of ways to send outgoing messages. Each element has the form (TYPE PREDICATE FUNCTION) TYPE A symbol that names the method. PREDICATE A function called without any parameters to determine whether the message is a message of type TYPE. FUNCTION A function to be called if PREDICATE returns non-`nil'. FUNCTION is called with one parameter - the prefix. ((news message-news-p message-send-via-news) (mail message-mail-p message-send-via-mail)) automatically generated by info2www version 1.2.2.9 |