Change defcustom :version from 23.0 to 23.1.
[bpt/emacs.git] / lisp / gnus / message.el
CommitLineData
23f87bed 1;;; message.el --- composing mail and news messages
e84b4b86
TTN
2
3;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
e3fe4da0 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
eec82323 5
6748645f 6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
eec82323
LMI
7;; Keywords: mail, news
8
9;; This file is part of GNU Emacs.
10
11;; GNU Emacs is free software; you can redistribute it and/or modify
12;; it under the terms of the GNU General Public License as published by
5a9dffec 13;; the Free Software Foundation; either version 3, or (at your option)
eec82323
LMI
14;; any later version.
15
16;; GNU Emacs is distributed in the hope that it will be useful,
17;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;; GNU General Public License for more details.
20
21;; You should have received a copy of the GNU General Public License
22;; along with GNU Emacs; see the file COPYING. If not, write to the
3a35cf56
LK
23;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24;; Boston, MA 02110-1301, USA.
eec82323
LMI
25
26;;; Commentary:
27
28;; This mode provides mail-sending facilities from within Emacs. It
29;; consists mainly of large chunks of code from the sendmail.el,
30;; gnus-msg.el and rnewspost.el files.
31
32;;; Code:
33
b43906b6
GM
34(eval-and-compile
35 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
16409b0b 36(eval-when-compile
9efa445f 37 (require 'cl))
b43906b6 38
01c52d31 39(require 'hashcash)
23f87bed 40(require 'canlock)
eec82323 41(require 'mailheader)
18c06a99 42(require 'gmm-utils)
eec82323 43(require 'nnheader)
23f87bed
MB
44;; This is apparently necessary even though things are autoloaded.
45;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better
46;; require mailabbrev here.
16409b0b 47(if (featurep 'xemacs)
23f87bed
MB
48 (require 'mail-abbrevs)
49 (require 'mailabbrev))
16409b0b
GM
50(require 'mail-parse)
51(require 'mml)
23f87bed 52(require 'rfc822)
01c52d31
MB
53(require 'ecomplete)
54
2ea6167b
RS
55(autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/
56
9efa445f
DN
57(defvar gnus-message-group-art)
58(defvar gnus-list-identifiers) ; gnus-sum is required where necessary
59(defvar rmail-enable-mime-composing)
eec82323
LMI
60
61(defgroup message '((user-mail-address custom-variable)
62 (user-full-name custom-variable))
63 "Mail and news message composing."
64 :link '(custom-manual "(message)Top")
65 :group 'mail
66 :group 'news)
67
68(put 'user-mail-address 'custom-type 'string)
69(put 'user-full-name 'custom-type 'string)
70
71(defgroup message-various nil
339ccc6a 72 "Various Message Variables."
eec82323
LMI
73 :link '(custom-manual "(message)Various Message Variables")
74 :group 'message)
75
76(defgroup message-buffers nil
339ccc6a 77 "Message Buffers."
eec82323
LMI
78 :link '(custom-manual "(message)Message Buffers")
79 :group 'message)
80
81(defgroup message-sending nil
339ccc6a 82 "Message Sending."
eec82323
LMI
83 :link '(custom-manual "(message)Sending Variables")
84 :group 'message)
85
86(defgroup message-interface nil
339ccc6a 87 "Message Interface."
eec82323
LMI
88 :link '(custom-manual "(message)Interface")
89 :group 'message)
90
91(defgroup message-forwarding nil
339ccc6a 92 "Message Forwarding."
eec82323
LMI
93 :link '(custom-manual "(message)Forwarding")
94 :group 'message-interface)
95
96(defgroup message-insertion nil
339ccc6a 97 "Message Insertion."
eec82323
LMI
98 :link '(custom-manual "(message)Insertion")
99 :group 'message)
100
101(defgroup message-headers nil
339ccc6a 102 "Message Headers."
eec82323
LMI
103 :link '(custom-manual "(message)Message Headers")
104 :group 'message)
105
106(defgroup message-news nil
339ccc6a 107 "Composing News Messages."
eec82323
LMI
108 :group 'message)
109
110(defgroup message-mail nil
339ccc6a 111 "Composing Mail Messages."
eec82323
LMI
112 :group 'message)
113
114(defgroup message-faces nil
115 "Faces used for message composing."
116 :group 'message
117 :group 'faces)
118
119(defcustom message-directory "~/Mail/"
120 "*Directory from which all other mail file variables are derived."
121 :group 'message-various
122 :type 'directory)
123
124(defcustom message-max-buffers 10
125 "*How many buffers to keep before starting to kill them off."
126 :group 'message-buffers
127 :type 'integer)
128
129(defcustom message-send-rename-function nil
130 "Function called to rename the buffer after sending it."
131 :group 'message-buffers
7d829636 132 :type '(choice function (const nil)))
eec82323
LMI
133
134(defcustom message-fcc-handler-function 'message-output
135 "*A function called to save outgoing articles.
136This function will be called with the name of the file to store the
137article in. The default function is `message-output' which saves in Unix
138mailbox format."
139 :type '(radio (function-item message-output)
140 (function :tag "Other"))
141 :group 'message-sending)
142
23f87bed
MB
143(defcustom message-fcc-externalize-attachments nil
144 "If non-nil, attachments are included as external parts in Fcc copies."
bf247b6e 145 :version "22.1"
23f87bed
MB
146 :type 'boolean
147 :group 'message-sending)
148
eec82323 149(defcustom message-courtesy-message
f129a4df 150 "The following message is a courtesy copy of an article\nthat has been posted to %s as well.\n\n"
eec82323
LMI
151 "*This is inserted at the start of a mailed copy of a posted message.
152If the string contains the format spec \"%s\", the Newsgroups
153the article has been posted to will be inserted there.
154If this variable is nil, no such courtesy message will be added."
155 :group 'message-sending
ad136a7c 156 :type '(radio string (const nil)))
eec82323 157
23f87bed
MB
158(defcustom message-ignored-bounced-headers
159 "^\\(Received\\|Return-Path\\|Delivered-To\\):"
eec82323
LMI
160 "*Regexp that matches headers to be removed in resent bounced mail."
161 :group 'message-interface
162 :type 'regexp)
163
eec82323
LMI
164(defcustom message-from-style 'default
165 "*Specifies how \"From\" headers look.
166
7d829636 167If nil, they contain just the return address like:
eec82323
LMI
168 king@grassland.com
169If `parens', they look like:
170 king@grassland.com (Elvis Parsley)
171If `angles', they look like:
172 Elvis Parsley <king@grassland.com>
173
174Otherwise, most addresses look like `angles', but they look like
175`parens' if `angles' would need quoting and `parens' would not."
176 :type '(choice (const :tag "simple" nil)
177 (const parens)
178 (const angles)
179 (const default))
180 :group 'message-headers)
181
23f87bed
MB
182(defcustom message-insert-canlock t
183 "Whether to insert a Cancel-Lock header in news postings."
bf247b6e 184 :version "22.1"
23f87bed
MB
185 :group 'message-headers
186 :type 'boolean)
187
188(defcustom message-syntax-checks
189 (if message-insert-canlock '((sender . disabled)) nil)
16409b0b 190 ;; Guess this one shouldn't be easy to customize...
6748645f 191 "*Controls what syntax checks should not be performed on outgoing posts.
eec82323
LMI
192To disable checking of long signatures, for instance, add
193 `(signature . disabled)' to this list.
194
195Don't touch this variable unless you really know what you're doing.
196
437ce4be
MB
197Checks include `approved', `bogus-recipient', `continuation-headers',
198`control-chars', `empty', `existing-newsgroups', `from', `illegible-text',
f362b760
MB
199`invisible-text', `long-header-lines', `long-lines', `message-id',
200`multiple-headers', `new-text', `newsgroups', `quoting-style',
5cfd0f2e 201`repeated-newsgroups', `reply-to', `sender', `sendsys', `shoot',
f362b760
MB
202`shorten-followup-to', `signature', `size', `subject', `subject-cmsg'
203and `valid-newsgroups'."
16409b0b 204 :group 'message-news
7d829636 205 :type '(repeat sexp)) ; Fixme: improve this
eec82323 206
23f87bed
MB
207(defcustom message-required-headers '((optional . References)
208 From)
209 "*Headers to be generated or prompted for when sending a message.
210Also see `message-required-news-headers' and
211`message-required-mail-headers'."
bf247b6e 212 :version "22.1"
23f87bed
MB
213 :group 'message-news
214 :group 'message-headers
215 :link '(custom-manual "(message)Message Headers")
216 :type '(repeat sexp))
217
01c52d31 218(defcustom message-draft-headers '(References From Date)
23f87bed 219 "*Headers to be generated when saving a draft message."
bf247b6e 220 :version "22.1"
23f87bed
MB
221 :group 'message-news
222 :group 'message-headers
223 :link '(custom-manual "(message)Message Headers")
224 :type '(repeat sexp))
225
eec82323
LMI
226(defcustom message-required-news-headers
227 '(From Newsgroups Subject Date Message-ID
23f87bed 228 (optional . Organization)
16409b0b 229 (optional . User-Agent))
6748645f 230 "*Headers to be generated or prompted for when posting an article.
eec82323
LMI
231RFC977 and RFC1036 require From, Date, Newsgroups, Subject,
232Message-ID. Organization, Lines, In-Reply-To, Expires, and
815b81c8 233User-Agent are optional. If you don't want message to insert some
eec82323
LMI
234header, remove it from this list."
235 :group 'message-news
236 :group 'message-headers
23f87bed 237 :link '(custom-manual "(message)Message Headers")
eec82323
LMI
238 :type '(repeat sexp))
239
240(defcustom message-required-mail-headers
23f87bed 241 '(From Subject Date (optional . In-Reply-To) Message-ID
16409b0b 242 (optional . User-Agent))
6748645f 243 "*Headers to be generated or prompted for when mailing a message.
23f87bed
MB
244It is recommended that From, Date, To, Subject and Message-ID be
245included. Organization and User-Agent are optional."
eec82323
LMI
246 :group 'message-mail
247 :group 'message-headers
23f87bed 248 :link '(custom-manual "(message)Message Headers")
eec82323
LMI
249 :type '(repeat sexp))
250
251(defcustom message-deletable-headers '(Message-ID Date Lines)
252 "Headers to be deleted if they already exist and were generated by message previously."
253 :group 'message-headers
23f87bed 254 :link '(custom-manual "(message)Message Headers")
eec82323
LMI
255 :type 'sexp)
256
257(defcustom message-ignored-news-headers
23f87bed 258 "^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:"
eec82323
LMI
259 "*Regexp of headers to be removed unconditionally before posting."
260 :group 'message-news
261 :group 'message-headers
23f87bed 262 :link '(custom-manual "(message)Message Headers")
8903a9c8
MB
263 :type '(repeat :value-to-internal (lambda (widget value)
264 (custom-split-regexp-maybe value))
265 :match (lambda (widget value)
266 (or (stringp value)
267 (widget-editable-list-match widget value)))
268 regexp))
eec82323 269
23f87bed
MB
270(defcustom message-ignored-mail-headers
271 "^[GF]cc:\\|^Resent-Fcc:\\|^Xref:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:"
eec82323
LMI
272 "*Regexp of headers to be removed unconditionally before mailing."
273 :group 'message-mail
274 :group 'message-headers
23f87bed 275 :link '(custom-manual "(message)Mail Headers")
eec82323
LMI
276 :type 'regexp)
277
b890d447 278(defcustom message-ignored-supersedes-headers "^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|^Received:\\|^X-From-Line:\\|^X-Trace:\\|^X-ID:\\|^X-Complaints-To:\\|Return-Path:\\|^Supersedes:\\|^NNTP-Posting-Date:\\|^X-Trace:\\|^X-Complaints-To:\\|^Cancel-Lock:\\|^Cancel-Key:\\|^X-Hashcash:\\|^X-Payment:\\|^Approved:"
eec82323
LMI
279 "*Header lines matching this regexp will be deleted before posting.
280It's best to delete old Path and Date headers before posting to avoid
281any confusion."
282 :group 'message-interface
23f87bed 283 :link '(custom-manual "(message)Superseding")
8903a9c8
MB
284 :type '(repeat :value-to-internal (lambda (widget value)
285 (custom-split-regexp-maybe value))
286 :match (lambda (widget value)
287 (or (stringp value)
288 (widget-editable-list-match widget value)))
289 regexp))
eec82323 290
23f87bed
MB
291(defcustom message-subject-re-regexp
292 "^[ \t]*\\([Rr][Ee]\\(\\[[0-9]*\\]\\)*:[ \t]*\\)*[ \t]*"
6748645f
LMI
293 "*Regexp matching \"Re: \" in the subject line."
294 :group 'message-various
23f87bed 295 :link '(custom-manual "(message)Message Headers")
6748645f
LMI
296 :type 'regexp)
297
23f87bed
MB
298;;; Start of variables adopted from `message-utils.el'.
299
300(defcustom message-subject-trailing-was-query 'ask
301 "*What to do with trailing \"(was: <old subject>)\" in subject lines.
302If nil, leave the subject unchanged. If it is the symbol `ask', query
303the user what do do. In this case, the subject is matched against
304`message-subject-trailing-was-ask-regexp'. If
305`message-subject-trailing-was-query' is t, always strip the trailing
306old subject. In this case, `message-subject-trailing-was-regexp' is
307used."
bf247b6e 308 :version "22.1"
23f87bed
MB
309 :type '(choice (const :tag "never" nil)
310 (const :tag "always strip" t)
01c52d31 311 (const ask))
23f87bed
MB
312 :link '(custom-manual "(message)Message Headers")
313 :group 'message-various)
314
315(defcustom message-subject-trailing-was-ask-regexp
316 "[ \t]*\\([[(]+[Ww][Aa][Ss][ \t]*.*[\])]+\\)"
317 "*Regexp matching \"(was: <old subject>)\" in the subject line.
318
319The function `message-strip-subject-trailing-was' uses this regexp if
320`message-subject-trailing-was-query' is set to the symbol `ask'. If
321the variable is t instead of `ask', use
322`message-subject-trailing-was-regexp' instead.
323
324It is okay to create some false positives here, as the user is asked."
bf247b6e 325 :version "22.1"
23f87bed
MB
326 :group 'message-various
327 :link '(custom-manual "(message)Message Headers")
328 :type 'regexp)
329
330(defcustom message-subject-trailing-was-regexp
331 "[ \t]*\\((*[Ww][Aa][Ss]:[ \t]*.*)\\)"
332 "*Regexp matching \"(was: <old subject>)\" in the subject line.
333
334If `message-subject-trailing-was-query' is set to t, the subject is
335matched against `message-subject-trailing-was-regexp' in
336`message-strip-subject-trailing-was'. You should use a regexp creating very
337few false positives here."
bf247b6e 338 :version "22.1"
23f87bed
MB
339 :group 'message-various
340 :link '(custom-manual "(message)Message Headers")
341 :type 'regexp)
342
23f87bed
MB
343;;; marking inserted text
344
23f87bed 345(defcustom message-mark-insert-begin
f129a4df 346 "--8<---------------cut here---------------start------------->8---\n"
23f87bed 347 "How to mark the beginning of some inserted text."
bf247b6e 348 :version "22.1"
23f87bed
MB
349 :type 'string
350 :link '(custom-manual "(message)Insertion Variables")
351 :group 'message-various)
352
23f87bed 353(defcustom message-mark-insert-end
f129a4df 354 "--8<---------------cut here---------------end--------------->8---\n"
23f87bed 355 "How to mark the end of some inserted text."
bf247b6e 356 :version "22.1"
23f87bed
MB
357 :type 'string
358 :link '(custom-manual "(message)Insertion Variables")
359 :group 'message-various)
360
f129a4df 361(defcustom message-archive-header "X-No-Archive: Yes\n"
23f87bed
MB
362 "Header to insert when you don't want your article to be archived.
363Archives \(such as groups.google.com\) respect this header."
bf247b6e 364 :version "22.1"
23f87bed
MB
365 :type 'string
366 :link '(custom-manual "(message)Header Commands")
367 :group 'message-various)
368
23f87bed
MB
369(defcustom message-archive-note
370 "X-No-Archive: Yes - save http://groups.google.com/"
371 "Note to insert why you wouldn't want this posting archived.
372If nil, don't insert any text in the body."
bf247b6e 373 :version "22.1"
ad136a7c 374 :type '(radio string (const nil))
23f87bed
MB
375 :link '(custom-manual "(message)Header Commands")
376 :group 'message-various)
377
378;;; Crossposts and Followups
379;; inspired by JoH-followup-to by Jochem Huhman <joh at gmx.de>
380;; new suggestions by R. Weikusat <rw at another.de>
381
382(defvar message-cross-post-old-target nil
383 "Old target for cross-posts or follow-ups.")
384(make-variable-buffer-local 'message-cross-post-old-target)
385
23f87bed
MB
386(defcustom message-cross-post-default t
387 "When non-nil `message-cross-post-followup-to' will perform a crosspost.
388If nil, `message-cross-post-followup-to' will only do a followup. Note that
389you can explicitly override this setting by calling
390`message-cross-post-followup-to' with a prefix."
bf247b6e 391 :version "22.1"
23f87bed
MB
392 :type 'boolean
393 :group 'message-various)
394
5f5475ac 395(defcustom message-cross-post-note "Crosspost & Followup-To: "
23f87bed 396 "Note to insert before signature to notify of cross-post and follow-up."
bf247b6e 397 :version "22.1"
23f87bed
MB
398 :type 'string
399 :group 'message-various)
400
5f5475ac 401(defcustom message-followup-to-note "Followup-To: "
23f87bed 402 "Note to insert before signature to notify of follow-up only."
bf247b6e 403 :version "22.1"
23f87bed
MB
404 :type 'string
405 :group 'message-various)
406
5f5475ac 407(defcustom message-cross-post-note-function 'message-cross-post-insert-note
23f87bed
MB
408 "Function to use to insert note about Crosspost or Followup-To.
409The function will be called with four arguments. The function should not only
410insert a note, but also ensure old notes are deleted. See the documentation
411for `message-cross-post-insert-note'."
bf247b6e 412 :version "22.1"
23f87bed
MB
413 :type 'function
414 :group 'message-various)
415
416;;; End of variables adopted from `message-utils.el'.
417
eec82323
LMI
418(defcustom message-signature-separator "^-- *$"
419 "Regexp matching the signature separator."
420 :type 'regexp
23f87bed 421 :link '(custom-manual "(message)Various Message Variables")
eec82323
LMI
422 :group 'message-various)
423
f129a4df 424(defcustom message-elide-ellipsis "\n[...]\n\n"
6748645f
LMI
425 "*The string which is inserted for elided text."
426 :type 'string
23f87bed 427 :link '(custom-manual "(message)Various Commands")
6748645f 428 :group 'message-various)
eec82323 429
23f87bed 430(defcustom message-interactive t
eec82323
LMI
431 "Non-nil means when sending a message wait for and display errors.
432nil means let mailer mail back a message to report errors."
433 :group 'message-sending
434 :group 'message-mail
23f87bed 435 :link '(custom-manual "(message)Sending Variables")
eec82323
LMI
436 :type 'boolean)
437
16409b0b 438(defcustom message-generate-new-buffers 'unique
815b81c8
MB
439 "*Say whether to create a new message buffer to compose a message.
440Valid values include:
441
442nil
443 Generate the buffer name in the Message way (e.g., *mail*, *news*,
444 *mail to whom*, *news on group*, etc.) and continue editing in the
445 existing buffer of that name. If there is no such buffer, it will
446 be newly created.
447
448`unique' or t
449 Create the new buffer with the name generated in the Message way.
450
451`unsent'
452 Similar to `unique' but the buffer name begins with \"*unsent \".
453
454`standard'
455 Similar to nil but the buffer name is simpler like *mail message*.
456
457function
458 If this is a function, call that function with three parameters:
459 The type, the To address and the group name (any of these may be nil).
460 The function should return the new buffer name."
eec82323 461 :group 'message-buffers
23f87bed 462 :link '(custom-manual "(message)Message Buffers")
815b81c8
MB
463 :type '(choice (const nil)
464 (sexp :tag "unique" :format "unique\n" :value unique
465 :match (lambda (widget value) (memq value '(unique t))))
466 (const unsent)
467 (const standard)
468 (function :format "\n %{%t%}: %v")))
eec82323
LMI
469
470(defcustom message-kill-buffer-on-exit nil
471 "*Non-nil means that the message buffer will be killed after sending a message."
472 :group 'message-buffers
23f87bed 473 :link '(custom-manual "(message)Message Buffers")
eec82323
LMI
474 :type 'boolean)
475
01c52d31
MB
476(defcustom message-kill-buffer-query t
477 "*Non-nil means that killing a modified message buffer has to be confirmed.
478This is used by `message-kill-buffer'."
330f707b 479 :version "23.1" ;; No Gnus
01c52d31
MB
480 :group 'message-buffers
481 :type 'boolean)
482
9efa445f 483(defvar gnus-local-organization)
eec82323
LMI
484(defcustom message-user-organization
485 (or (and (boundp 'gnus-local-organization)
486 (stringp gnus-local-organization)
487 gnus-local-organization)
488 (getenv "ORGANIZATION")
489 t)
490 "*String to be used as an Organization header.
491If t, use `message-user-organization-file'."
492 :group 'message-headers
493 :type '(choice string
494 (const :tag "consult file" t)))
495
01c52d31
MB
496(defcustom message-user-organization-file
497 (let (orgfile)
498 (dolist (f (list "/etc/organization"
499 "/etc/news/organization"
500 "/usr/lib/news/organization"))
501 (when (file-readable-p f)
502 (setq orgfile f)))
503 orgfile)
eec82323
LMI
504 "*Local news organization file."
505 :type 'file
23f87bed 506 :link '(custom-manual "(message)News Headers")
eec82323
LMI
507 :group 'message-headers)
508
6748645f 509(defcustom message-make-forward-subject-function
23f87bed 510 #'message-forward-subject-name-subject
7d829636 511 "*List of functions called to generate subject headers for forwarded messages.
6748645f
LMI
512The subject generated by the previous function is passed into each
513successive function.
514
515The provided functions are:
516
23f87bed
MB
517* `message-forward-subject-author-subject' Source of article (author or
518 newsgroup), in brackets followed by the subject
519* `message-forward-subject-name-subject' Source of article (name of author
520 or newsgroup), in brackets followed by the subject
521* `message-forward-subject-fwd' Subject of article with 'Fwd:' prepended
6748645f 522 to it."
16409b0b 523 :group 'message-forwarding
23f87bed 524 :link '(custom-manual "(message)Forwarding")
16409b0b 525 :type '(radio (function-item message-forward-subject-author-subject)
7d829636 526 (function-item message-forward-subject-fwd)
23f87bed 527 (function-item message-forward-subject-name-subject)
7d829636 528 (repeat :tag "List of functions" function)))
16409b0b
GM
529
530(defcustom message-forward-as-mime t
23f87bed
MB
531 "*Non-nil means forward messages as an inline/rfc822 MIME section.
532Otherwise, directly inline the old message in the forwarded message."
2d447df6 533 :version "21.1"
16409b0b 534 :group 'message-forwarding
23f87bed 535 :link '(custom-manual "(message)Forwarding")
16409b0b
GM
536 :type 'boolean)
537
23f87bed
MB
538(defcustom message-forward-show-mml 'best
539 "*Non-nil means show forwarded messages as MML (decoded from MIME).
540Otherwise, forwarded messages are unchanged.
541Can also be the symbol `best' to indicate that MML should be
542used, except when it is a bad idea to use MML. One example where
543it is a bad idea is when forwarding a signed or encrypted
544message, because converting MIME to MML would invalidate the
545digital signature."
88818fbe 546 :version "21.1"
16409b0b 547 :group 'message-forwarding
23f87bed
MB
548 :type '(choice (const :tag "use MML" t)
549 (const :tag "don't use MML " nil)
550 (const :tag "use MML when appropriate" best)))
16409b0b
GM
551
552(defcustom message-forward-before-signature t
23f87bed 553 "*Non-nil means put forwarded message before signature, else after."
16409b0b
GM
554 :group 'message-forwarding
555 :type 'boolean)
6748645f
LMI
556
557(defcustom message-wash-forwarded-subjects nil
23f87bed
MB
558 "*Non-nil means try to remove as much cruft as possible from the subject.
559Done before generating the new subject of a forward."
6748645f 560 :group 'message-forwarding
23f87bed 561 :link '(custom-manual "(message)Forwarding")
6748645f
LMI
562 :type 'boolean)
563
23f87bed 564(defcustom message-ignored-resent-headers "^Return-receipt\\|^X-Gnus\\|^Gnus-Warning:\\|^>?From "
eec82323
LMI
565 "*All headers that match this regexp will be deleted when resending a message."
566 :group 'message-interface
23f87bed 567 :link '(custom-manual "(message)Resending")
8903a9c8
MB
568 :type '(repeat :value-to-internal (lambda (widget value)
569 (custom-split-regexp-maybe value))
570 :match (lambda (widget value)
571 (or (stringp value)
572 (widget-editable-list-match widget value)))
573 regexp))
eec82323 574
16409b0b
GM
575(defcustom message-forward-ignored-headers "^Content-Transfer-Encoding:\\|^X-Gnus"
576 "*All headers that match this regexp will be deleted when forwarding a message."
2d447df6 577 :version "21.1"
16409b0b 578 :group 'message-forwarding
8903a9c8
MB
579 :type '(repeat :value-to-internal (lambda (widget value)
580 (custom-split-regexp-maybe value))
581 :match (lambda (widget value)
582 (or (stringp value)
583 (widget-editable-list-match widget value)))
16409b0b
GM
584 regexp))
585
eec82323
LMI
586(defcustom message-ignored-cited-headers "."
587 "*Delete these headers from the messages you yank."
588 :group 'message-insertion
23f87bed
MB
589 :link '(custom-manual "(message)Insertion Variables")
590 :type 'regexp)
591
592(defcustom message-cite-prefix-regexp
b890d447
MB
593 (if (string-match "[[:digit:]]" "1")
594 ;; Support POSIX? XEmacs 21.5.27 doesn't.
595 "\\([ \t]*[_.[:word:]]+>+\\|[ \t]*[]>|}]\\)+"
23f87bed 596 ;; ?-, ?_ or ?. MUST NOT be in syntax entry w.
01c52d31
MB
597 (let (non-word-constituents)
598 (with-syntax-table text-mode-syntax-table
599 (setq non-word-constituents
600 (concat
01c52d31
MB
601 (if (string-match "\\w" "_") "" "_")
602 (if (string-match "\\w" ".") "" "."))))
23f87bed 603 (if (equal non-word-constituents "")
b890d447 604 "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>|}]\\)+"
23f87bed
MB
605 (concat "\\([ \t]*\\(\\w\\|["
606 non-word-constituents
b890d447 607 "]\\)+>+\\|[ \t]*[]>|}]\\)+"))))
23f87bed 608 "*Regexp matching the longest possible citation prefix on a line."
bf247b6e 609 :version "22.1"
23f87bed
MB
610 :group 'message-insertion
611 :link '(custom-manual "(message)Insertion Variables")
01c52d31
MB
612 :type 'regexp
613 :set (lambda (symbol value)
614 (prog1
615 (custom-set-default symbol value)
616 (if (boundp 'gnus-message-cite-prefix-regexp)
617 (setq gnus-message-cite-prefix-regexp
618 (concat "^\\(?:" value "\\)"))))))
eec82323 619
f129a4df 620(defcustom message-cancel-message "I am canceling my own article.\n"
eec82323
LMI
621 "Message to be inserted in the cancel message."
622 :group 'message-interface
23f87bed 623 :link '(custom-manual "(message)Canceling News")
eec82323
LMI
624 :type 'string)
625
5e174b3d
RS
626(defvar smtpmail-default-smtp-server)
627
2ea6167b
RS
628(defun message-send-mail-function ()
629 "Return suitable value for the variable `message-send-mail-function'."
b62a39c4
RS
630 (cond ((and (require 'sendmail)
631 (boundp 'sendmail-program)
632 sendmail-program
9e0a8576 633 (executable-find sendmail-program))
2ea6167b 634 'message-send-mail-with-sendmail)
9e0a8576
RS
635 ((and (locate-library "smtpmail")
636 (require 'smtpmail)
637 smtpmail-default-smtp-server)
638 'message-smtpmail-send-it)
639 ((locate-library "mailclient")
2ea6167b
RS
640 'message-send-mail-with-mailclient)
641 (t
9e0a8576 642 (lambda ()
82816ba1 643 (error "Don't know how to send mail. Please customize `message-send-mail-function'")))))
2ea6167b 644
eec82323 645;; Useful to set in site-init.el
2ea6167b 646(defcustom message-send-mail-function (message-send-mail-function)
eec82323
LMI
647 "Function to call to send the current buffer as mail.
648The headers should be delimited by a line whose contents match the
649variable `mail-header-separator'.
650
2ea6167b 651Valid values include `message-send-mail-with-sendmail'
7d829636 652`message-send-mail-with-mh', `message-send-mail-with-qmail',
2ea6167b
RS
653`message-smtpmail-send-it', `smtpmail-send-it',
654`feedmail-send-it' and `message-send-mail-with-mailclient'. The
655default is system dependent.
7d829636
DL
656
657See also `send-mail-function'."
eec82323
LMI
658 :type '(radio (function-item message-send-mail-with-sendmail)
659 (function-item message-send-mail-with-mh)
660 (function-item message-send-mail-with-qmail)
23f87bed 661 (function-item message-smtpmail-send-it)
6748645f 662 (function-item smtpmail-send-it)
7d829636 663 (function-item feedmail-send-it)
2ea6167b
RS
664 (function :tag "Other")
665 (function-item message-send-mail-with-mailclient
666 :tag "Use Mailclient package")
667 (function :tag "Other"))
eec82323 668 :group 'message-sending
330f707b 669 :version "23.1" ;; No Gnus
2ea6167b 670 :initialize 'custom-initialize-default
23f87bed 671 :link '(custom-manual "(message)Mail Variables")
eec82323
LMI
672 :group 'message-mail)
673
674(defcustom message-send-news-function 'message-send-news
675 "Function to call to send the current buffer as news.
676The headers should be delimited by a line whose contents match the
677variable `mail-header-separator'."
678 :group 'message-sending
679 :group 'message-news
23f87bed 680 :link '(custom-manual "(message)News Variables")
eec82323
LMI
681 :type 'function)
682
683(defcustom message-reply-to-function nil
7d829636 684 "If non-nil, function that should return a list of headers.
eec82323
LMI
685This function should pick out addresses from the To, Cc, and From headers
686and respond with new To and Cc headers."
687 :group 'message-interface
23f87bed 688 :link '(custom-manual "(message)Reply")
7d829636 689 :type '(choice function (const nil)))
eec82323
LMI
690
691(defcustom message-wide-reply-to-function nil
7d829636 692 "If non-nil, function that should return a list of headers.
eec82323
LMI
693This function should pick out addresses from the To, Cc, and From headers
694and respond with new To and Cc headers."
695 :group 'message-interface
23f87bed 696 :link '(custom-manual "(message)Wide Reply")
7d829636 697 :type '(choice function (const nil)))
eec82323
LMI
698
699(defcustom message-followup-to-function nil
7d829636 700 "If non-nil, function that should return a list of headers.
eec82323
LMI
701This function should pick out addresses from the To, Cc, and From headers
702and respond with new To and Cc headers."
703 :group 'message-interface
23f87bed 704 :link '(custom-manual "(message)Followup")
7d829636 705 :type '(choice function (const nil)))
eec82323 706
01c52d31
MB
707(defcustom message-extra-wide-headers nil
708 "If non-nil, a list of additional address headers.
709These are used when composing a wide reply."
710 :group 'message-sending
711 :type '(repeat string))
712
eec82323
LMI
713(defcustom message-use-followup-to 'ask
714 "*Specifies what to do with Followup-To header.
715If nil, always ignore the header. If it is t, use its value, but
716query before using the \"poster\" value. If it is the symbol `ask',
717always query the user whether to use the value. If it is the symbol
718`use', always use the value."
719 :group 'message-interface
23f87bed 720 :link '(custom-manual "(message)Followup")
eec82323 721 :type '(choice (const :tag "ignore" nil)
23f87bed 722 (const :tag "use & query" t)
eec82323
LMI
723 (const use)
724 (const ask)))
725
23f87bed
MB
726(defcustom message-use-mail-followup-to 'use
727 "*Specifies what to do with Mail-Followup-To header.
728If nil, always ignore the header. If it is the symbol `ask', always
729query the user whether to use the value. If it is the symbol `use',
730always use the value."
bf247b6e 731 :version "22.1"
23f87bed
MB
732 :group 'message-interface
733 :link '(custom-manual "(message)Mailing Lists")
734 :type '(choice (const :tag "ignore" nil)
735 (const use)
736 (const ask)))
737
738(defcustom message-subscribed-address-functions nil
739 "*Specifies functions for determining list subscription.
740If nil, do not attempt to determine list subscription with functions.
741If non-nil, this variable contains a list of functions which return
742regular expressions to match lists. These functions can be used in
743conjunction with `message-subscribed-regexps' and
744`message-subscribed-addresses'."
bf247b6e 745 :version "22.1"
23f87bed
MB
746 :group 'message-interface
747 :link '(custom-manual "(message)Mailing Lists")
748 :type '(repeat sexp))
749
750(defcustom message-subscribed-address-file nil
751 "*A file containing addresses the user is subscribed to.
752If nil, do not look at any files to determine list subscriptions. If
753non-nil, each line of this file should be a mailing list address."
bf247b6e 754 :version "22.1"
23f87bed
MB
755 :group 'message-interface
756 :link '(custom-manual "(message)Mailing Lists")
ad136a7c 757 :type '(radio file (const nil)))
23f87bed
MB
758
759(defcustom message-subscribed-addresses nil
760 "*Specifies a list of addresses the user is subscribed to.
761If nil, do not use any predefined list subscriptions. This list of
762addresses can be used in conjunction with
763`message-subscribed-address-functions' and `message-subscribed-regexps'."
bf247b6e 764 :version "22.1"
23f87bed
MB
765 :group 'message-interface
766 :link '(custom-manual "(message)Mailing Lists")
767 :type '(repeat string))
768
769(defcustom message-subscribed-regexps nil
770 "*Specifies a list of addresses the user is subscribed to.
771If nil, do not use any predefined list subscriptions. This list of
772regular expressions can be used in conjunction with
773`message-subscribed-address-functions' and `message-subscribed-addresses'."
bf247b6e 774 :version "22.1"
23f87bed
MB
775 :group 'message-interface
776 :link '(custom-manual "(message)Mailing Lists")
777 :type '(repeat regexp))
778
779(defcustom message-allow-no-recipients 'ask
780 "Specifies what to do when there are no recipients other than Gcc/Fcc.
781If it is the symbol `always', the posting is allowed. If it is the
782symbol `never', the posting is not allowed. If it is the symbol
783`ask', you are prompted."
bf247b6e 784 :version "22.1"
23f87bed
MB
785 :group 'message-interface
786 :link '(custom-manual "(message)Message Headers")
787 :type '(choice (const always)
788 (const never)
789 (const ask)))
790
eec82323 791(defcustom message-sendmail-f-is-evil nil
7d829636 792 "*Non-nil means don't add \"-f username\" to the sendmail command line.
16409b0b 793Doing so would be even more evil than leaving it out."
eec82323 794 :group 'message-sending
23f87bed 795 :link '(custom-manual "(message)Mail Variables")
eec82323
LMI
796 :type 'boolean)
797
23f87bed
MB
798(defcustom message-sendmail-envelope-from nil
799 "*Envelope-from when sending mail with sendmail.
800If this is nil, use `user-mail-address'. If it is the symbol
801`header', use the From: header of the message."
bf247b6e 802 :version "22.1"
23f87bed
MB
803 :type '(choice (string :tag "From name")
804 (const :tag "Use From: header from message" header)
805 (const :tag "Use `user-mail-address'" nil))
806 :link '(custom-manual "(message)Mail Variables")
807 :group 'message-sending)
808
01c52d31
MB
809(defcustom message-sendmail-extra-arguments nil
810 "Additional arguments to `sendmail-program'."
811 ;; E.g. '("-a" "account") for msmtp
330f707b 812 :version "23.1" ;; No Gnus
01c52d31
MB
813 :type '(repeat string)
814 ;; :link '(custom-manual "(message)Mail Variables")
815 :group 'message-sending)
816
eec82323
LMI
817;; qmail-related stuff
818(defcustom message-qmail-inject-program "/var/qmail/bin/qmail-inject"
819 "Location of the qmail-inject program."
820 :group 'message-sending
23f87bed 821 :link '(custom-manual "(message)Mail Variables")
eec82323
LMI
822 :type 'file)
823
824(defcustom message-qmail-inject-args nil
825 "Arguments passed to qmail-inject programs.
23f87bed
MB
826This should be a list of strings, one string for each argument. It
827may also be a function.
eec82323
LMI
828
829For e.g., if you wish to set the envelope sender address so that bounces
830go to the right place or to deal with listserv's usage of that address, you
831might set this variable to '(\"-f\" \"you@some.where\")."
832 :group 'message-sending
23f87bed
MB
833 :link '(custom-manual "(message)Mail Variables")
834 :type '(choice (function)
835 (repeat string)))
eec82323 836
9efa445f
DN
837(defvar gnus-post-method)
838(defvar gnus-select-method)
eec82323
LMI
839(defcustom message-post-method
840 (cond ((and (boundp 'gnus-post-method)
6748645f 841 (listp gnus-post-method)
eec82323
LMI
842 gnus-post-method)
843 gnus-post-method)
844 ((boundp 'gnus-select-method)
845 gnus-select-method)
846 (t '(nnspool "")))
6748645f
LMI
847 "*Method used to post news.
848Note that when posting from inside Gnus, for instance, this
849variable isn't used."
eec82323
LMI
850 :group 'message-news
851 :group 'message-sending
852 ;; This should be the `gnus-select-method' widget, but that might
853 ;; create a dependence to `gnus.el'.
854 :type 'sexp)
855
23f87bed
MB
856;; FIXME: This should be a temporary workaround until someone implements a
857;; proper solution. If a crash happens while replying, the auto-save file
858;; will *not* have a `References:' header if `message-generate-headers-first'
859;; is nil. See: http://article.gmane.org/gmane.emacs.gnus.general/51138
860(defcustom message-generate-headers-first '(references)
861 "Which headers should be generated before starting to compose a message.
f5d01350 862If t, generate all required headers. This can also be a list of headers to
23f87bed
MB
863generate. The variables `message-required-news-headers' and
864`message-required-mail-headers' specify which headers to generate.
865
866Note that the variable `message-deletable-headers' specifies headers which
867are to be deleted and then re-generated before sending, so this variable
868will not have a visible effect for those headers."
eec82323 869 :group 'message-headers
23f87bed
MB
870 :link '(custom-manual "(message)Message Headers")
871 :type '(choice (const :tag "None" nil)
01c52d31
MB
872 (const :tag "References" '(references))
873 (const :tag "All" t)
874 (repeat (sexp :tag "Header"))))
875
876(defcustom message-fill-column 72
877 "Column beyond which automatic line-wrapping should happen.
878Local value for message buffers. If non-nil, also turn on
879auto-fill in message buffers."
880 :group 'message-various
881 ;; :link '(custom-manual "(message)Message Headers")
882 :type '(choice (const :tag "Don't turn on auto fill" nil)
883 (integer)))
eec82323
LMI
884
885(defcustom message-setup-hook nil
886 "Normal hook, run each time a new outgoing message is initialized.
887The function `message-setup' runs this hook."
888 :group 'message-various
23f87bed 889 :link '(custom-manual "(message)Various Message Variables")
eec82323
LMI
890 :type 'hook)
891
16409b0b
GM
892(defcustom message-cancel-hook nil
893 "Hook run when cancelling articles."
894 :group 'message-various
23f87bed 895 :link '(custom-manual "(message)Various Message Variables")
16409b0b
GM
896 :type 'hook)
897
eec82323
LMI
898(defcustom message-signature-setup-hook nil
899 "Normal hook, run each time a new outgoing message is initialized.
900It is run after the headers have been inserted and before
901the signature is inserted."
902 :group 'message-various
23f87bed 903 :link '(custom-manual "(message)Various Message Variables")
eec82323
LMI
904 :type 'hook)
905
906(defcustom message-mode-hook nil
907 "Hook run in message mode buffers."
908 :group 'message-various
909 :type 'hook)
910
911(defcustom message-header-hook nil
912 "Hook run in a message mode buffer narrowed to the headers."
913 :group 'message-various
914 :type 'hook)
915
916(defcustom message-header-setup-hook nil
6748645f 917 "Hook called narrowed to the headers when setting up a message buffer."
eec82323 918 :group 'message-various
23f87bed 919 :link '(custom-manual "(message)Various Message Variables")
eec82323
LMI
920 :type 'hook)
921
23f87bed
MB
922(defcustom message-minibuffer-local-map
923 (let ((map (make-sparse-keymap 'message-minibuffer-local-map)))
924 (set-keymap-parent map minibuffer-local-map)
925 map)
e2642250 926 "Keymap for `message-read-from-minibuffer'."
d0859c9a
MB
927 :version "22.1"
928 :group 'message-various)
23f87bed 929
eec82323 930(defcustom message-citation-line-function 'message-insert-citation-line
23f87bed
MB
931 "*Function called to insert the \"Whomever writes:\" line.
932
01c52d31 933Predefined functions include `message-insert-citation-line' and
4d8a28ec 934`message-insert-formatted-citation-line' (see the variable
01c52d31
MB
935`message-citation-line-format').
936
23f87bed
MB
937Note that Gnus provides a feature where the reader can click on
938`writes:' to hide the cited text. If you change this line too much,
939people who read your message will have to change their Gnus
940configuration. See the variable `gnus-cite-attribution-suffix'."
01c52d31
MB
941 :type '(choice
942 (function-item :tag "plain" message-insert-citation-line)
4d8a28ec 943 (function-item :tag "formatted" message-insert-formatted-citation-line)
01c52d31 944 (function :tag "Other"))
23f87bed 945 :link '(custom-manual "(message)Insertion Variables")
eec82323
LMI
946 :group 'message-insertion)
947
01c52d31
MB
948(defcustom message-citation-line-format "On %a, %b %d %Y, %N wrote:\n"
949 "Format of the \"Whomever writes:\" line.
950
951The string is formatted using `format-spec'. The following
952constructs are replaced:
953
954 %f The full From, e.g. \"John Doe <john.doe@example.invalid>\".
955 %n The mail address, e.g. \"john.doe@example.invalid\".
956 %N The real name if present, e.g.: \"John Doe\", else fall
957 back to the mail address.
958 %F The first name if present, e.g.: \"John\".
959 %L The last name if present, e.g.: \"Doe\".
960
961All other format specifiers are passed to `format-time-string'
962which is called using the date from the article your replying to.
963Extracting the first (%F) and last name (%L) is done
964heuristically, so you should always check it yourself.
965
966Please also read the note in the documentation of
967`message-citation-line-function'."
968 :type '(choice (const :tag "Plain" "%f writes:")
969 (const :tag "Include date" "On %a, %b %d %Y, %n wrote:")
970 string)
971 :link '(custom-manual "(message)Insertion Variables")
330f707b 972 :version "23.1" ;; No Gnus
01c52d31
MB
973 :group 'message-insertion)
974
eec82323 975(defcustom message-yank-prefix "> "
23f87bed
MB
976 "*Prefix inserted on the lines of yanked messages.
977Fix `message-cite-prefix-regexp' if it is set to an abnormal value.
01c52d31 978See also `message-yank-cited-prefix' and `message-yank-empty-prefix'."
23f87bed
MB
979 :type 'string
980 :link '(custom-manual "(message)Insertion Variables")
981 :group 'message-insertion)
982
983(defcustom message-yank-cited-prefix ">"
01c52d31 984 "*Prefix inserted on cited lines of yanked messages.
23f87bed 985Fix `message-cite-prefix-regexp' if it is set to an abnormal value.
01c52d31
MB
986See also `message-yank-prefix' and `message-yank-empty-prefix'."
987 :version "22.1"
988 :type 'string
989 :link '(custom-manual "(message)Insertion Variables")
990 :group 'message-insertion)
991
992(defcustom message-yank-empty-prefix ">"
993 "*Prefix inserted on empty lines of yanked messages.
994See also `message-yank-prefix' and `message-yank-cited-prefix'."
bf247b6e 995 :version "22.1"
eec82323 996 :type 'string
23f87bed 997 :link '(custom-manual "(message)Insertion Variables")
eec82323
LMI
998 :group 'message-insertion)
999
1000(defcustom message-indentation-spaces 3
1001 "*Number of spaces to insert at the beginning of each cited line.
1002Used by `message-yank-original' via `message-yank-cite'."
1003 :group 'message-insertion
23f87bed 1004 :link '(custom-manual "(message)Insertion Variables")
eec82323
LMI
1005 :type 'integer)
1006
6748645f 1007(defcustom message-cite-function 'message-cite-original
4a55f847
RS
1008 "*Function for citing an original message.
1009Predefined functions include `message-cite-original' and
1010`message-cite-original-without-signature'.
01c52d31 1011Note that these functions use `mail-citation-hook' if that is non-nil."
eec82323 1012 :type '(radio (function-item message-cite-original)
16409b0b 1013 (function-item message-cite-original-without-signature)
eec82323
LMI
1014 (function-item sc-cite-original)
1015 (function :tag "Other"))
23f87bed 1016 :link '(custom-manual "(message)Insertion Variables")
eec82323
LMI
1017 :group 'message-insertion)
1018
eec82323
LMI
1019(defcustom message-indent-citation-function 'message-indent-citation
1020 "*Function for modifying a citation just inserted in the mail buffer.
1021This can also be a list of functions. Each function can find the
1022citation between (point) and (mark t). And each function should leave
1023point and mark around the citation text as modified."
1024 :type 'function
23f87bed 1025 :link '(custom-manual "(message)Insertion Variables")
eec82323
LMI
1026 :group 'message-insertion)
1027
eec82323
LMI
1028(defcustom message-signature t
1029 "*String to be inserted at the end of the message buffer.
1030If t, the `message-signature-file' file will be inserted instead.
1031If a function, the result from the function will be used instead.
1032If a form, the result from the form will be used instead."
1033 :type 'sexp
23f87bed 1034 :link '(custom-manual "(message)Insertion Variables")
eec82323
LMI
1035 :group 'message-insertion)
1036
eec82323 1037(defcustom message-signature-file "~/.signature"
5449c317
DL
1038 "*Name of file containing the text inserted at end of message buffer.
1039Ignored if the named file doesn't exist.
01c52d31
MB
1040If nil, don't insert a signature.
1041If a path is specified, the value of `message-signature-directory' is ignored,
1042even if set."
5449c317 1043 :type '(choice file (const :tags "None" nil))
23f87bed
MB
1044 :link '(custom-manual "(message)Insertion Variables")
1045 :group 'message-insertion)
1046
01c52d31
MB
1047(defcustom message-signature-directory nil
1048 "*Name of directory containing signature files.
1049Comes in handy if you have many such files, handled via posting styles for
1050instance.
1051If nil, `message-signature-file' is expected to specify the directory if
1052needed."
1053 :type '(choice string (const :tags "None" nil))
1054 :link '(custom-manual "(message)Insertion Variables")
1055 :group 'message-insertion)
1056
23f87bed
MB
1057(defcustom message-signature-insert-empty-line t
1058 "*If non-nil, insert an empty line before the signature separator."
bf247b6e 1059 :version "22.1"
23f87bed
MB
1060 :type 'boolean
1061 :link '(custom-manual "(message)Insertion Variables")
eec82323
LMI
1062 :group 'message-insertion)
1063
1064(defcustom message-distribution-function nil
1065 "*Function called to return a Distribution header."
1066 :group 'message-news
1067 :group 'message-headers
23f87bed 1068 :link '(custom-manual "(message)News Headers")
7d829636 1069 :type '(choice function (const nil)))
eec82323
LMI
1070
1071(defcustom message-expires 14
1072 "Number of days before your article expires."
1073 :group 'message-news
1074 :group 'message-headers
1075 :link '(custom-manual "(message)News Headers")
1076 :type 'integer)
1077
1078(defcustom message-user-path nil
1079 "If nil, use the NNTP server name in the Path header.
1080If stringp, use this; if non-nil, use no host name (user name only)."
1081 :group 'message-news
1082 :group 'message-headers
1083 :link '(custom-manual "(message)News Headers")
1084 :type '(choice (const :tag "nntp" nil)
1085 (string :tag "name")
1086 (sexp :tag "none" :format "%t" t)))
1087
1088(defvar message-reply-buffer nil)
23f87bed
MB
1089(defvar message-reply-headers nil
1090 "The headers of the current replied article.
1091It is a vector of the following headers:
1092\[number subject from date id references chars lines xref extra].")
eec82323
LMI
1093(defvar message-newsreader nil)
1094(defvar message-mailer nil)
1095(defvar message-sent-message-via nil)
1096(defvar message-checksum nil)
1097(defvar message-send-actions nil
1098 "A list of actions to be performed upon successful sending of a message.")
1099(defvar message-exit-actions nil
1100 "A list of actions to be performed upon exiting after sending a message.")
1101(defvar message-kill-actions nil
1102 "A list of actions to be performed before killing a message buffer.")
1103(defvar message-postpone-actions nil
1104 "A list of actions to be performed after postponing a message.")
1105
6748645f
LMI
1106(define-widget 'message-header-lines 'text
1107 "All header lines must be LFD terminated."
3536d0c1 1108 :format "%{%t%}:%n%v"
6748645f
LMI
1109 :valid-regexp "^\\'"
1110 :error "All header lines must be newline terminated")
1111
eec82323
LMI
1112(defcustom message-default-headers ""
1113 "*A string containing header lines to be inserted in outgoing messages.
1114It is inserted before you edit the message, so you can edit or delete
1115these lines."
1116 :group 'message-headers
23f87bed 1117 :link '(custom-manual "(message)Message Headers")
6748645f 1118 :type 'message-header-lines)
eec82323
LMI
1119
1120(defcustom message-default-mail-headers ""
1121 "*A string of header lines to be inserted in outgoing mails."
1122 :group 'message-headers
1123 :group 'message-mail
23f87bed 1124 :link '(custom-manual "(message)Mail Headers")
6748645f 1125 :type 'message-header-lines)
eec82323
LMI
1126
1127(defcustom message-default-news-headers ""
16409b0b 1128 "*A string of header lines to be inserted in outgoing news articles."
eec82323
LMI
1129 :group 'message-headers
1130 :group 'message-news
23f87bed 1131 :link '(custom-manual "(message)News Headers")
6748645f 1132 :type 'message-header-lines)
eec82323
LMI
1133
1134;; Note: could use /usr/ucb/mail instead of sendmail;
1135;; options -t, and -v if not interactive.
1136(defcustom message-mailer-swallows-blank-line
1137 (if (and (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)"
1138 system-configuration)
1139 (file-readable-p "/etc/sendmail.cf")
1140 (let ((buffer (get-buffer-create " *temp*")))
1141 (unwind-protect
82816ba1 1142 (with-current-buffer buffer
eec82323
LMI
1143 (insert-file-contents "/etc/sendmail.cf")
1144 (goto-char (point-min))
1145 (let ((case-fold-search nil))
1146 (re-search-forward "^OR\\>" nil t)))
1147 (kill-buffer buffer))))
1148 ;; According to RFC822, "The field-name must be composed of printable
1149 ;; ASCII characters (i. e., characters that have decimal values between
1150 ;; 33 and 126, except colon)", i. e., any chars except ctl chars,
1151 ;; space, or colon.
1152 '(looking-at "[ \t]\\|[][!\"#$%&'()*+,-./0-9;<=>?@A-Z\\\\^_`a-z{|}~]+:"))
6748645f 1153 "*Set this non-nil if the system's mailer runs the header and body together.
eec82323
LMI
1154\(This problem exists on Sunos 4 when sendmail is run in remote mode.)
1155The value should be an expression to test whether the problem will
1156actually occur."
1157 :group 'message-sending
23f87bed 1158 :link '(custom-manual "(message)Mail Variables")
eec82323
LMI
1159 :type 'sexp)
1160
961a48db 1161;;;###autoload
16409b0b
GM
1162(define-mail-user-agent 'message-user-agent
1163 'message-mail 'message-send-and-exit
1164 'message-kill-buffer 'message-send-hook)
eec82323
LMI
1165
1166(defvar message-mh-deletable-headers '(Message-ID Date Lines Sender)
1167 "If non-nil, delete the deletable headers before feeding to mh.")
1168
a8151ef7
LMI
1169(defvar message-send-method-alist
1170 '((news message-news-p message-send-via-news)
1171 (mail message-mail-p message-send-via-mail))
1172 "Alist of ways to send outgoing messages.
1173Each element has the form
1174
1175 \(TYPE PREDICATE FUNCTION)
1176
1177where TYPE is a symbol that names the method; PREDICATE is a function
1178called without any parameters to determine whether the message is
1179a message of type TYPE; and FUNCTION is a function to be called if
1180PREDICATE returns non-nil. FUNCTION is called with one parameter --
1181the prefix.")
1182
c541eb9a 1183(defcustom message-mail-alias-type 'abbrev
a8151ef7 1184 "*What alias expansion type to use in Message buffers.
01c52d31
MB
1185The default is `abbrev', which uses mailabbrev. `ecomplete' uses
1186an electric completion mode. nil switches mail aliases off.
1187This can also be a list of values."
c541eb9a
DL
1188 :group 'message
1189 :link '(custom-manual "(message)Mail Aliases")
1190 :type '(choice (const :tag "Use Mailabbrev" abbrev)
01c52d31 1191 (const :tag "Use ecomplete" ecomplete)
c541eb9a 1192 (const :tag "No expansion" nil)))
a8151ef7 1193
01c52d31
MB
1194(defcustom message-self-insert-commands '(self-insert-command)
1195 "List of `self-insert-command's used to trigger ecomplete.
1196When one of those commands is invoked to enter a character in To or Cc
1197header, ecomplete will suggest the candidates of recipients (see also
1198`message-mail-alias-type'). If you use some tool to enter non-ASCII
1199text and it replaces `self-insert-command' with the other command, e.g.
1200`egg-self-insert-command', you may want to add it to this list."
1201 :group 'message-various
1202 :type '(repeat function))
1203
6748645f 1204(defcustom message-auto-save-directory
8c6f6f4b 1205 (file-name-as-directory (nnheader-concat message-directory "drafts"))
6748645f
LMI
1206 "*Directory where Message auto-saves buffers if Gnus isn't running.
1207If nil, Message won't auto-save."
1208 :group 'message-buffers
23f87bed 1209 :link '(custom-manual "(message)Various Message Variables")
7d829636 1210 :type '(choice directory (const :tag "Don't auto-save" nil)))
6748645f 1211
7d829636 1212(defcustom message-default-charset
83595c0c
DL
1213 (and (not (mm-multibyte-p)) 'iso-8859-1)
1214 "Default charset used in non-MULE Emacsen.
1215If nil, you might be asked to input the charset."
2d447df6 1216 :version "21.1"
16409b0b 1217 :group 'message
23f87bed 1218 :link '(custom-manual "(message)Various Message Variables")
16409b0b
GM
1219 :type 'symbol)
1220
7d829636 1221(defcustom message-dont-reply-to-names
16409b0b 1222 (and (boundp 'rmail-dont-reply-to-names) rmail-dont-reply-to-names)
01c52d31 1223 "*Addresses to prune when doing wide replies.
82816ba1 1224This can be a regexp or a list of regexps. Also, a value of nil means
01c52d31 1225exclude your own user name only."
2d447df6 1226 :version "21.1"
16409b0b 1227 :group 'message
23f87bed 1228 :link '(custom-manual "(message)Wide Reply")
16409b0b 1229 :type '(choice (const :tag "Yourself" nil)
01c52d31
MB
1230 regexp
1231 (repeat :tag "Regexp List" regexp)))
1232
1233(defsubst message-dont-reply-to-names ()
1234 (gmm-regexp-concat message-dont-reply-to-names))
16409b0b 1235
23f87bed
MB
1236(defvar message-shoot-gnksa-feet nil
1237 "*A list of GNKSA feet you are allowed to shoot.
1238Gnus gives you all the opportunity you could possibly want for
1239shooting yourself in the foot. Also, Gnus allows you to shoot the
1240feet of Good Net-Keeping Seal of Approval. The following are foot
1241candidates:
1242`empty-article' Allow you to post an empty article;
1243`quoted-text-only' Allow you to post quoted text only;
1244`multiple-copies' Allow you to post multiple copies;
1245`cancel-messages' Allow you to cancel or supersede messages from
01c52d31 1246 your other email addresses.")
23f87bed
MB
1247
1248(defsubst message-gnksa-enable-p (feature)
1249 (or (not (listp message-shoot-gnksa-feet))
1250 (memq feature message-shoot-gnksa-feet)))
1251
01c52d31
MB
1252(defcustom message-hidden-headers '("^References:" "^Face:" "^X-Face:"
1253 "^X-Draft-From:")
23f87bed
MB
1254 "Regexp of headers to be hidden when composing new messages.
1255This can also be a list of regexps to match headers. Or a list
1256starting with `not' and followed by regexps."
bf247b6e 1257 :version "22.1"
23f87bed
MB
1258 :group 'message
1259 :link '(custom-manual "(message)Message Headers")
01c52d31
MB
1260 :type '(choice
1261 :format "%{%t%}: %[Value Type%] %v"
1262 (regexp :menu-tag "regexp" :format "regexp\n%t: %v")
1263 (repeat :menu-tag "(regexp ...)" :format "(regexp ...)\n%v%i"
1264 (regexp :format "%t: %v"))
1265 (cons :menu-tag "(not regexp ...)" :format "(not regexp ...)\n%v"
1266 (const not)
1267 (repeat :format "%v%i"
1268 (regexp :format "%t: %v")))))
1269
1270(defcustom message-cite-articles-with-x-no-archive t
1271 "If non-nil, cite text from articles that has X-No-Archive set."
1272 :group 'message
1273 :type 'boolean)
23f87bed 1274
eec82323
LMI
1275;;; Internal variables.
1276;;; Well, not really internal.
1277
1278(defvar message-mode-syntax-table
1279 (let ((table (copy-syntax-table text-mode-syntax-table)))
1280 (modify-syntax-entry ?% ". " table)
16409b0b
GM
1281 (modify-syntax-entry ?> ". " table)
1282 (modify-syntax-entry ?< ". " table)
eec82323
LMI
1283 table)
1284 "Syntax table used while in Message mode.")
1285
0f49874b 1286(defface message-header-to
eec82323
LMI
1287 '((((class color)
1288 (background dark))
01c52d31 1289 (:foreground "DarkOliveGreen1" :bold t))
eec82323
LMI
1290 (((class color)
1291 (background light))
23f87bed 1292 (:foreground "MidnightBlue" :bold t))
eec82323 1293 (t
23f87bed 1294 (:bold t :italic t)))
eec82323
LMI
1295 "Face used for displaying From headers."
1296 :group 'message-faces)
0f49874b
MB
1297;; backward-compatibility alias
1298(put 'message-header-to-face 'face-alias 'message-header-to)
eec82323 1299
0f49874b 1300(defface message-header-cc
eec82323
LMI
1301 '((((class color)
1302 (background dark))
01c52d31 1303 (:foreground "chartreuse1" :bold t))
eec82323
LMI
1304 (((class color)
1305 (background light))
1306 (:foreground "MidnightBlue"))
1307 (t
23f87bed 1308 (:bold t)))
eec82323
LMI
1309 "Face used for displaying Cc headers."
1310 :group 'message-faces)
0f49874b
MB
1311;; backward-compatibility alias
1312(put 'message-header-cc-face 'face-alias 'message-header-cc)
eec82323 1313
0f49874b 1314(defface message-header-subject
eec82323
LMI
1315 '((((class color)
1316 (background dark))
01c52d31 1317 (:foreground "OliveDrab1"))
eec82323
LMI
1318 (((class color)
1319 (background light))
23f87bed 1320 (:foreground "navy blue" :bold t))
eec82323 1321 (t
23f87bed 1322 (:bold t)))
eec82323
LMI
1323 "Face used for displaying subject headers."
1324 :group 'message-faces)
0f49874b
MB
1325;; backward-compatibility alias
1326(put 'message-header-subject-face 'face-alias 'message-header-subject)
eec82323 1327
0f49874b 1328(defface message-header-newsgroups
eec82323
LMI
1329 '((((class color)
1330 (background dark))
23f87bed 1331 (:foreground "yellow" :bold t :italic t))
eec82323
LMI
1332 (((class color)
1333 (background light))
23f87bed 1334 (:foreground "blue4" :bold t :italic t))
eec82323 1335 (t
23f87bed 1336 (:bold t :italic t)))
eec82323
LMI
1337 "Face used for displaying newsgroups headers."
1338 :group 'message-faces)
0f49874b
MB
1339;; backward-compatibility alias
1340(put 'message-header-newsgroups-face 'face-alias 'message-header-newsgroups)
eec82323 1341
0f49874b 1342(defface message-header-other
eec82323
LMI
1343 '((((class color)
1344 (background dark))
01c52d31 1345 (:foreground "VioletRed1"))
eec82323
LMI
1346 (((class color)
1347 (background light))
1348 (:foreground "steel blue"))
1349 (t
23f87bed 1350 (:bold t :italic t)))
eec82323
LMI
1351 "Face used for displaying newsgroups headers."
1352 :group 'message-faces)
0f49874b
MB
1353;; backward-compatibility alias
1354(put 'message-header-other-face 'face-alias 'message-header-other)
eec82323 1355
0f49874b 1356(defface message-header-name
eec82323
LMI
1357 '((((class color)
1358 (background dark))
01c52d31 1359 (:foreground "green"))
eec82323
LMI
1360 (((class color)
1361 (background light))
1362 (:foreground "cornflower blue"))
1363 (t
23f87bed 1364 (:bold t)))
eec82323
LMI
1365 "Face used for displaying header names."
1366 :group 'message-faces)
0f49874b
MB
1367;; backward-compatibility alias
1368(put 'message-header-name-face 'face-alias 'message-header-name)
eec82323 1369
0f49874b 1370(defface message-header-xheader
eec82323
LMI
1371 '((((class color)
1372 (background dark))
01c52d31 1373 (:foreground "DeepSkyBlue1"))
eec82323
LMI
1374 (((class color)
1375 (background light))
1376 (:foreground "blue"))
1377 (t
23f87bed 1378 (:bold t)))
eec82323
LMI
1379 "Face used for displaying X-Header headers."
1380 :group 'message-faces)
0f49874b
MB
1381;; backward-compatibility alias
1382(put 'message-header-xheader-face 'face-alias 'message-header-xheader)
eec82323 1383
0f49874b 1384(defface message-separator
eec82323
LMI
1385 '((((class color)
1386 (background dark))
01c52d31 1387 (:foreground "LightSkyBlue1"))
eec82323
LMI
1388 (((class color)
1389 (background light))
1390 (:foreground "brown"))
1391 (t
23f87bed 1392 (:bold t)))
eec82323
LMI
1393 "Face used for displaying the separator."
1394 :group 'message-faces)
0f49874b
MB
1395;; backward-compatibility alias
1396(put 'message-separator-face 'face-alias 'message-separator)
eec82323 1397
0f49874b 1398(defface message-cited-text
eec82323
LMI
1399 '((((class color)
1400 (background dark))
01c52d31 1401 (:foreground "LightPink1"))
eec82323
LMI
1402 (((class color)
1403 (background light))
1404 (:foreground "red"))
1405 (t
23f87bed 1406 (:bold t)))
eec82323
LMI
1407 "Face used for displaying cited text names."
1408 :group 'message-faces)
0f49874b
MB
1409;; backward-compatibility alias
1410(put 'message-cited-text-face 'face-alias 'message-cited-text)
eec82323 1411
0f49874b 1412(defface message-mml
16409b0b
GM
1413 '((((class color)
1414 (background dark))
01c52d31 1415 (:foreground "MediumSpringGreen"))
16409b0b
GM
1416 (((class color)
1417 (background light))
1418 (:foreground "ForestGreen"))
1419 (t
23f87bed 1420 (:bold t)))
16409b0b
GM
1421 "Face used for displaying MML."
1422 :group 'message-faces)
0f49874b
MB
1423;; backward-compatibility alias
1424(put 'message-mml-face 'face-alias 'message-mml)
16409b0b 1425
23f87bed
MB
1426(defun message-font-lock-make-header-matcher (regexp)
1427 (let ((form
1428 `(lambda (limit)
1429 (let ((start (point)))
1430 (save-restriction
1431 (widen)
1432 (goto-char (point-min))
1433 (if (re-search-forward
1434 (concat "^" (regexp-quote mail-header-separator) "$")
1435 nil t)
1436 (setq limit (min limit (match-beginning 0))))
1437 (goto-char start))
1438 (and (< start limit)
1439 (re-search-forward ,regexp limit t))))))
1440 (if (featurep 'bytecomp)
1441 (byte-compile form)
1442 form)))
1443
eec82323 1444(defvar message-font-lock-keywords
23f87bed
MB
1445 (let ((content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)\n?"))
1446 `((,(message-font-lock-make-header-matcher
1447 (concat "^\\([Tt]o:\\)" content))
0f49874b
MB
1448 (1 'message-header-name)
1449 (2 'message-header-to nil t))
23f87bed
MB
1450 (,(message-font-lock-make-header-matcher
1451 (concat "^\\(^[GBF]?[Cc][Cc]:\\|^[Rr]eply-[Tt]o:\\)" content))
0f49874b
MB
1452 (1 'message-header-name)
1453 (2 'message-header-cc nil t))
23f87bed
MB
1454 (,(message-font-lock-make-header-matcher
1455 (concat "^\\([Ss]ubject:\\)" content))
0f49874b
MB
1456 (1 'message-header-name)
1457 (2 'message-header-subject nil t))
23f87bed
MB
1458 (,(message-font-lock-make-header-matcher
1459 (concat "^\\([Nn]ewsgroups:\\|Followup-[Tt]o:\\)" content))
0f49874b
MB
1460 (1 'message-header-name)
1461 (2 'message-header-newsgroups nil t))
23f87bed 1462 (,(message-font-lock-make-header-matcher
01c52d31 1463 (concat "^\\(X-[A-Za-z0-9-]+:\\|In-Reply-To:\\)" content))
0f49874b 1464 (1 'message-header-name)
01c52d31 1465 (2 'message-header-xheader))
23f87bed 1466 (,(message-font-lock-make-header-matcher
01c52d31 1467 (concat "^\\([A-Z][^: \n\t]+:\\)" content))
0f49874b 1468 (1 'message-header-name)
01c52d31 1469 (2 'message-header-other nil t))
6748645f
LMI
1470 ,@(if (and mail-header-separator
1471 (not (equal mail-header-separator "")))
1472 `((,(concat "^\\(" (regexp-quote mail-header-separator) "\\)$")
0f49874b 1473 1 'message-separator))
6748645f 1474 nil)
23f87bed
MB
1475 ((lambda (limit)
1476 (re-search-forward (concat "^\\("
1477 message-cite-prefix-regexp
1478 "\\).*")
1479 limit t))
0f49874b 1480 (0 'message-cited-text))
23f87bed 1481 ("<#/?\\(multipart\\|part\\|external\\|mml\\|secure\\)[^>]*>"
0f49874b 1482 (0 'message-mml))))
eec82323
LMI
1483 "Additional expressions to highlight in Message mode.")
1484
23f87bed 1485
6748645f
LMI
1486;; XEmacs does it like this. For Emacs, we have to set the
1487;; `font-lock-defaults' buffer-local variable.
1488(put 'message-mode 'font-lock-defaults '(message-font-lock-keywords t))
1489
eec82323 1490(defvar message-face-alist
01c52d31 1491 '((bold . message-bold-region)
eec82323
LMI
1492 (underline . underline-region)
1493 (default . (lambda (b e)
01c52d31 1494 (message-unbold-region b e)
eec82323
LMI
1495 (ununderline-region b e))))
1496 "Alist of mail and news faces for facemenu.
8f688cb0 1497The cdr of each entry is a function for applying the face to a region.")
eec82323
LMI
1498
1499(defcustom message-send-hook nil
23f87bed
MB
1500 "Hook run before sending messages.
1501This hook is run quite early when sending."
eec82323
LMI
1502 :group 'message-various
1503 :options '(ispell-message)
23f87bed 1504 :link '(custom-manual "(message)Various Message Variables")
eec82323
LMI
1505 :type 'hook)
1506
1507(defcustom message-send-mail-hook nil
23f87bed
MB
1508 "Hook run before sending mail messages.
1509This hook is run very late -- just before the message is sent as
1510mail."
eec82323 1511 :group 'message-various
23f87bed 1512 :link '(custom-manual "(message)Various Message Variables")
eec82323
LMI
1513 :type 'hook)
1514
1515(defcustom message-send-news-hook nil
23f87bed
MB
1516 "Hook run before sending news messages.
1517This hook is run very late -- just before the message is sent as
1518news."
eec82323 1519 :group 'message-various
23f87bed 1520 :link '(custom-manual "(message)Various Message Variables")
eec82323
LMI
1521 :type 'hook)
1522
1523(defcustom message-sent-hook nil
1524 "Hook run after sending messages."
1525 :group 'message-various
1526 :type 'hook)
1527
6748645f
LMI
1528(defvar message-send-coding-system 'binary
1529 "Coding system to encode outgoing mail.")
1530
16409b0b
GM
1531(defvar message-draft-coding-system
1532 mm-auto-save-coding-system
23f87bed
MB
1533 "*Coding system to compose mail.
1534If you'd like to make it possible to share draft files between XEmacs
1535and Emacs, you may use `iso-2022-7bit' for this value at your own risk.
1536Note that the coding-system `iso-2022-7bit' isn't suitable to all data.")
16409b0b
GM
1537
1538(defcustom message-send-mail-partially-limit 1000000
1539 "The limitation of messages sent as message/partial.
7d829636
DL
1540The lower bound of message size in characters, beyond which the message
1541should be sent in several parts. If it is nil, the size is unlimited."
2d447df6 1542 :version "21.1"
16409b0b 1543 :group 'message-buffers
23f87bed 1544 :link '(custom-manual "(message)Mail Variables")
16409b0b
GM
1545 :type '(choice (const :tag "unlimited" nil)
1546 (integer 1000000)))
1547
83595c0c 1548(defcustom message-alternative-emails nil
46e8fe3d
MB
1549 "*Regexp matching alternative email addresses.
1550The first address in the To, Cc or From headers of the original
1551article matching this variable is used as the From field of
1552outgoing messages.
1553
1554This variable has precedence over posting styles and anything that runs
1555off `message-setup-hook'."
83595c0c 1556 :group 'message-headers
23f87bed 1557 :link '(custom-manual "(message)Message Headers")
83595c0c
DL
1558 :type '(choice (const :tag "Always use primary" nil)
1559 regexp))
1560
23f87bed
MB
1561(defcustom message-hierarchical-addresses nil
1562 "A list of hierarchical mail address definitions.
1563
1564Inside each entry, the first address is the \"top\" address, and
1565subsequent addresses are subaddresses; this is used to indicate that
1566mail sent to the first address will automatically be delivered to the
1567subaddresses. So if the first address appears in the recipient list
1568for a message, the subaddresses will be removed (if present) before
1569the mail is sent. All addresses in this structure should be
1570downcased."
bf247b6e 1571 :version "22.1"
23f87bed
MB
1572 :group 'message-headers
1573 :type '(repeat (repeat string)))
1574
88818fbe
SZ
1575(defcustom message-mail-user-agent nil
1576 "Like `mail-user-agent'.
7d829636 1577Except if it is nil, use Gnus native MUA; if it is t, use
88818fbe 1578`mail-user-agent'."
bf247b6e 1579 :version "22.1"
88818fbe
SZ
1580 :type '(radio (const :tag "Gnus native"
1581 :format "%t\n"
1582 nil)
1583 (const :tag "`mail-user-agent'"
1584 :format "%t\n"
1585 t)
1586 (function-item :tag "Default Emacs mail"
1587 :format "%t\n"
1588 sendmail-user-agent)
1589 (function-item :tag "Emacs interface to MH"
1590 :format "%t\n"
1591 mh-e-user-agent)
1592 (function :tag "Other"))
1593 :version "21.1"
1594 :group 'message)
1595
23f87bed
MB
1596(defcustom message-wide-reply-confirm-recipients nil
1597 "Whether to confirm a wide reply to multiple email recipients.
1598If this variable is nil, don't ask whether to reply to all recipients.
1599If this variable is non-nil, pose the question \"Reply to all
1600recipients?\" before a wide reply to multiple recipients. If the user
1601answers yes, reply to all recipients as usual. If the user answers
1602no, only reply back to the author."
bf247b6e 1603 :version "22.1"
23f87bed
MB
1604 :group 'message-headers
1605 :link '(custom-manual "(message)Wide Reply")
1606 :type 'boolean)
1607
1608(defcustom message-user-fqdn nil
bcc7dd61 1609 "*Domain part of Message-Ids."
bf247b6e 1610 :version "22.1"
23f87bed
MB
1611 :group 'message-headers
1612 :link '(custom-manual "(message)News Headers")
1613 :type '(radio (const :format "%v " nil)
ad136a7c 1614 (string :format "FQDN: %v")))
23f87bed
MB
1615
1616(defcustom message-use-idna (and (condition-case nil (require 'idna)
1617 (file-error))
1618 (mm-coding-system-p 'utf-8)
1619 (executable-find idna-program)
a33704bb
MB
1620