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