1 ;;; gnus-msg.el --- mail and post interface for Gnus
2 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
3 ;; Free Software Foundation, Inc.
5 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
6 ;; Lars Magne Ingebrigtsen <larsi@gnus.org>
9 ;; This file is part of GNU Emacs.
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
13 ;; the Free Software Foundation; either version 2, or (at your option)
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.
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
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
30 (eval-when-compile (require 'cl))
37 (defcustom gnus-post-method 'current
38 "*Preferred method for posting USENET news.
40 If this variable is `current' (which is the default), Gnus will use
41 the \"current\" select method when posting. If it is `native', Gnus
42 will use the native select method when posting.
44 This method will not be used in mail groups and the like, only in
47 If not `native' nor `current', the value must be a valid method as discussed
48 in the documentation of `gnus-select-method'. It can also be a list of
49 methods. If that is the case, the user will be queried for what select
50 method to use when posting."
51 :group 'gnus-group-foreign
52 :link '(custom-manual "(gnus)Posting Server")
53 :type `(choice (const native)
55 (sexp :tag "Methods" ,gnus-select-method)))
57 (defcustom gnus-outgoing-message-group nil
58 "*All outgoing messages will be put in this group.
59 If you want to store all your outgoing mail and articles in the group
60 \"nnml:archive\", you set this variable to that value. This variable
61 can also be a list of group names.
63 If you want to have greater control over what group to put each
64 message in, you can set this variable to a function that checks the
65 current newsgroup name and then returns a suitable group name (or list
68 :type '(choice (string :tag "Group")
71 (defcustom gnus-mailing-list-groups nil
72 "*Regexp matching groups that are really mailing lists.
73 This is useful when you're reading a mailing list that has been
74 gatewayed to a newsgroup, and you want to followup to an article in
79 (defcustom gnus-add-to-list nil
80 "*If non-nil, add a `to-list' parameter automatically."
84 (defcustom gnus-crosspost-complaint
87 You posted the article below with the following Newsgroups header:
91 The %s group, at least, was an inappropriate recipient
92 of this message. Please trim your Newsgroups header to exclude this
93 group before posting in the future.
98 "Format string to be inserted when complaining about crossposts.
99 The first %s will be replaced by the Newsgroups header;
100 the second with the current group name."
104 (defcustom gnus-message-setup-hook nil
105 "Hook run after setting up a message buffer."
109 (defcustom gnus-bug-create-help-buffer t
110 "*Should we create the *Gnus Help Bug* buffer?"
114 (defcustom gnus-posting-styles nil
115 "*Alist of styles to use when posting.
116 See Info node `(gnus)Posting Styles'."
118 :type '(repeat (cons (choice (regexp)
123 (choice (const signature)
124 (const signature-file)
129 (string :tag "Header"))
135 (defcustom gnus-inews-mark-gcc-as-read nil
136 "If non-nil, automatically mark Gcc articles as read."
140 (defcustom gnus-group-posting-charset-alist
141 '(("^\\(no\\|fr\\)\\.[^,]*\\(,[ \t\n]*\\(no\\|fr\\)\\.[^,]*\\)*$" iso-8859-1 (iso-8859-1))
142 ("^\\(fido7\\|relcom\\)\\.[^,]*\\(,[ \t\n]*\\(fido7\\|relcom\\)\\.[^,]*\\)*$" koi8-r (koi8-r))
143 (message-this-is-mail nil nil)
144 (message-this-is-news nil t))
145 "Alist of regexps and permitted unencoded charsets for posting.
146 Each element of the alist has the form (TEST HEADER BODY-LIST), where
147 TEST is either a regular expression matching the newsgroup header or a
149 HEADER is the charset which may be left unencoded in the header (nil
150 means encode all charsets),
151 BODY-LIST is a list of charsets which may be encoded using 8bit
152 content-transfer encoding in the body, or one of the special values
153 nil (always encode using quoted-printable) or t (always use 8bit).
155 Note that any value other than nil for HEADER infringes some RFCs, so
156 use this option with care."
157 :type '(repeat (list :tag "Permitted unencoded charsets"
159 (regexp :tag "Group")
160 (const :tag "Mail message" :value message-this-is-mail)
161 (const :tag "News article" :value message-this-is-news))
162 (choice :tag "Header"
163 (const :tag "None" nil)
164 (symbol :tag "Charset"))
166 (const :tag "Any" :value t)
167 (const :tag "None" :value nil)
168 (repeat :tag "Charsets"
169 (symbol :tag "Charset")))))
170 :group 'gnus-charset)
172 ;;; Internal variables.
174 (defvar gnus-inhibit-posting-styles nil
175 "Inhibit the use of posting styles.")
177 (defvar gnus-message-buffer "*Mail Gnus*")
178 (defvar gnus-article-copy nil)
179 (defvar gnus-check-before-posting nil)
180 (defvar gnus-last-posting-server nil)
181 (defvar gnus-message-group-art nil)
183 (defvar gnus-msg-force-broken-reply-to nil)
185 (defconst gnus-bug-message
186 "Sending a bug report to the Gnus Towers.
187 ========================================
189 The buffer below is a mail buffer. When you press `C-c C-c', it will
190 be sent to the Gnus Bug Exterminators.
192 The thing near the bottom of the buffer is how the environment
193 settings will be included in the mail. Please do not delete that.
194 They will tell the Bug People what your environment is, so that it
195 will be easier to locate the bugs.
197 If you have found a bug that makes Emacs go \"beep\", set
198 debug-on-error to t (`M-x set-variable RET debug-on-error RET t RET')
199 and include the backtrace in your bug report.
201 Please describe the bug in annoying, painstaking detail.
203 Thank you for your help in stamping out bugs.
207 (autoload 'gnus-uu-post-news "gnus-uu" nil t)
208 (autoload 'news-setup "rnewspost")
209 (autoload 'news-reply-mode "rnewspost")
210 (autoload 'rmail-dont-reply-to "mail-utils")
211 (autoload 'rmail-output "rmailout"))
215 ;;; Gnus Posting Functions
218 (gnus-define-keys (gnus-summary-send-map "S" gnus-summary-mode-map)
219 "p" gnus-summary-post-news
220 "f" gnus-summary-followup
221 "F" gnus-summary-followup-with-original
222 "c" gnus-summary-cancel-article
223 "s" gnus-summary-supersede-article
224 "r" gnus-summary-reply
225 "y" gnus-summary-yank-message
226 "R" gnus-summary-reply-with-original
227 "w" gnus-summary-wide-reply
228 "W" gnus-summary-wide-reply-with-original
229 "v" gnus-summary-very-wide-reply
230 "W" gnus-summary-very-wide-reply-with-original
231 "n" gnus-summary-followup-to-mail
232 "N" gnus-summary-followup-to-mail-with-original
233 "m" gnus-summary-mail-other-window
234 "u" gnus-uu-post-news
235 "\M-c" gnus-summary-mail-crosspost-complaint
236 "Br" gnus-summary-reply-broken-reply-to
237 "BR" gnus-summary-reply-broken-reply-to-with-original
238 "om" gnus-summary-mail-forward
239 "op" gnus-summary-post-forward
240 "Om" gnus-uu-digest-mail-forward
241 "Op" gnus-uu-digest-post-forward)
243 (gnus-define-keys (gnus-send-bounce-map "D" gnus-summary-send-map)
244 "b" gnus-summary-resend-bounced-mail
245 ;; "c" gnus-summary-send-draft
246 "r" gnus-summary-resend-message)
248 ;;; Internal functions.
250 (defvar gnus-article-reply nil)
251 (defmacro gnus-setup-message (config &rest forms)
252 (let ((winconf (make-symbol "gnus-setup-message-winconf"))
253 (buffer (make-symbol "gnus-setup-message-buffer"))
254 (article (make-symbol "gnus-setup-message-article"))
255 (group (make-symbol "gnus-setup-message-group")))
256 `(let ((,winconf (current-window-configuration))
257 (,buffer (buffer-name (current-buffer)))
258 (,article gnus-article-reply)
259 (,group gnus-newsgroup-name)
260 (message-header-setup-hook
261 (copy-sequence message-header-setup-hook))
262 (mbl mml-buffer-list)
263 (message-mode-hook (copy-sequence message-mode-hook)))
264 (setq mml-buffer-list nil)
265 (add-hook 'message-header-setup-hook 'gnus-inews-insert-gcc)
266 (add-hook 'message-header-setup-hook 'gnus-inews-insert-archive-gcc)
267 (add-hook 'message-mode-hook 'gnus-configure-posting-styles)
271 (gnus-inews-add-send-actions ,winconf ,buffer ,article ,config)
272 (gnus-inews-insert-draft-meta-information ,group ,article)
273 (setq gnus-message-buffer (current-buffer))
274 (set (make-local-variable 'gnus-message-group-art)
275 (cons ,group ,article))
276 (set (make-local-variable 'gnus-newsgroup-name) ,group)
277 (gnus-run-hooks 'gnus-message-setup-hook)
278 (if (eq major-mode 'message-mode)
279 (let ((mbl1 mml-buffer-list))
280 (setq mml-buffer-list mbl) ;; Global value
281 (set (make-local-variable 'mml-buffer-list) mbl1);; Local value
282 ;; LOCAL argument of add-hook differs between GNU Emacs
283 ;; and XEmacs. make-local-hook makes sure they are local.
284 (make-local-hook 'kill-buffer-hook)
285 (make-local-hook 'change-major-mode-hook)
286 (add-hook 'change-major-mode-hook 'mml-destroy-buffers nil t)
287 (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t))
288 (mml-destroy-buffers)
289 (setq mml-buffer-list mbl)))
291 (gnus-configure-windows ,config t)
292 (run-hooks 'post-command-hook)
293 (set-buffer-modified-p nil))))
295 (defun gnus-inews-insert-draft-meta-information (group article)
298 (not (string= group ""))
299 (not (message-fetch-field gnus-draft-meta-information-header)))
300 (goto-char (point-min))
301 (insert gnus-draft-meta-information-header ": (\"" group "\" "
302 (if article (number-to-string
309 (defun gnus-msg-mail (&optional to subject other-headers continue
310 switch-action yank-action send-actions)
311 "Start editing a mail message to be sent.
312 Like `message-mail', but with Gnus paraphernalia, particularly the
313 Gcc: header for archiving purposes."
315 (let ((buf (current-buffer))
317 (gnus-setup-message 'message
318 (message-mail to subject other-headers continue
319 nil yank-action send-actions))
321 (setq mail-buf (current-buffer))
322 (switch-to-buffer buf)
323 (apply switch-action mail-buf nil)))
324 ;; COMPOSEFUNC should return t if succeed. Undocumented ???
327 (defvar save-selected-window-window)
330 (defun gnus-button-mailto (address)
332 (set-buffer (gnus-copy-article-buffer))
333 (gnus-setup-message 'message
334 (message-reply address))
335 (and (boundp 'save-selected-window-window)
336 (not (window-live-p save-selected-window-window))
337 (setq save-selected-window-window (selected-window))))
340 (defun gnus-button-reply (&optional to-address wide)
341 "Like `message-reply'."
343 (gnus-setup-message 'message
344 (message-reply to-address wide))
345 (and (boundp 'save-selected-window-window)
346 (not (window-live-p save-selected-window-window))
347 (setq save-selected-window-window (selected-window))))
350 (define-mail-user-agent 'gnus-user-agent
351 'gnus-msg-mail 'message-send-and-exit
352 'message-kill-buffer 'message-send-hook)
354 (defun gnus-setup-posting-charset (group)
355 (let ((alist gnus-group-posting-charset-alist)
356 (group (or group ""))
360 (while (setq elem (pop alist))
361 (when (or (and (stringp (car elem))
362 (string-match (car elem) group))
363 (and (gnus-functionp (car elem))
364 (funcall (car elem) group))
365 (and (symbolp (car elem))
366 (symbol-value (car elem))))
367 (throw 'found (cons (cadr elem) (caddr elem)))))))))
369 (defun gnus-inews-add-send-actions (winconf buffer article &optional config)
370 (make-local-hook 'message-sent-hook)
371 (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc
372 'gnus-inews-do-gcc) nil t)
374 (make-local-hook 'message-header-hook)
375 (add-hook 'message-header-hook 'gnus-agent-possibly-save-gcc nil t))
376 (setq message-post-method
378 (gnus-post-method arg ,gnus-newsgroup-name)))
379 (setq message-newsreader (setq message-mailer (gnus-extended-version)))
381 `(set-window-configuration ,winconf) 'exit 'postpone 'kill)
383 `(when (gnus-buffer-exists-p ,buffer)
387 (if (eq config 'forward)
388 `(gnus-summary-mark-article-as-forwarded ',article)
389 `(gnus-summary-mark-article-as-replied ',article)))))
392 (put 'gnus-setup-message 'lisp-indent-function 1)
393 (put 'gnus-setup-message 'edebug-form-spec '(form body))
395 ;;; Post news commands of Gnus group mode and summary mode
397 (defun gnus-group-mail (&optional arg)
398 "Start composing a mail.
399 If ARG, use the group under the point to find a posting style.
400 If ARG is 1, prompt for a group name to find the posting style."
402 ;; We can't `let' gnus-newsgroup-name here, since that leads
403 ;; to local variables leaking.
404 (let ((group gnus-newsgroup-name)
405 (buffer (current-buffer)))
408 (setq gnus-newsgroup-name
410 (if (= 1 (prefix-numeric-value arg))
411 (completing-read "Use posting style of group: "
412 gnus-active-hashtb nil
413 (gnus-read-active-file-p))
414 (gnus-group-group-name))
416 (gnus-setup-message 'message (message-mail)))
419 (setq gnus-newsgroup-name group)))))
421 (defun gnus-group-post-news (&optional arg)
422 "Start composing a news message.
423 If ARG, post to the group under point.
424 If ARG is 1, prompt for a group name."
426 ;; Bind this variable here to make message mode hooks work ok.
427 (let ((gnus-newsgroup-name
429 (if (= 1 (prefix-numeric-value arg))
430 (completing-read "Newsgroup: " gnus-active-hashtb nil
431 (gnus-read-active-file-p))
432 (gnus-group-group-name))
434 (gnus-post-news 'post gnus-newsgroup-name)))
436 (defun gnus-summary-post-news ()
437 "Start composing a news message."
439 (gnus-post-news 'post gnus-newsgroup-name))
441 (defun gnus-summary-followup (yank &optional force-news)
442 "Compose a followup to an article.
443 If prefix argument YANK is non-nil, original article is yanked automatically."
445 (list (and current-prefix-arg
446 (gnus-summary-work-articles 1))))
448 (gnus-summary-goto-subject (car yank)))
449 (save-window-excursion
450 (gnus-summary-select-article))
451 (let ((headers (gnus-summary-article-header (gnus-summary-article-number)))
452 (gnus-newsgroup-name gnus-newsgroup-name))
454 (gnus-post-news nil gnus-newsgroup-name
455 headers gnus-article-buffer
456 yank nil force-news)))
458 (defun gnus-summary-followup-with-original (n &optional force-news)
459 "Compose a followup to an article and include the original article."
461 (gnus-summary-followup (gnus-summary-work-articles n) force-news))
463 (defun gnus-summary-followup-to-mail (&optional arg)
464 "Followup to the current mail message via news."
466 (list (and current-prefix-arg
467 (gnus-summary-work-articles 1))))
468 (gnus-summary-followup arg t))
470 (defun gnus-summary-followup-to-mail-with-original (&optional arg)
471 "Followup to the current mail message via news."
473 (gnus-summary-followup (gnus-summary-work-articles arg) t))
475 (defun gnus-inews-yank-articles (articles)
478 (while (setq article (pop articles))
479 (save-window-excursion
480 (set-buffer gnus-summary-buffer)
481 (gnus-summary-select-article nil nil nil article)
482 (gnus-summary-remove-process-mark article))
483 (gnus-copy-article-buffer)
484 (let ((message-reply-buffer gnus-article-copy)
485 (message-reply-headers
486 (with-current-buffer gnus-article-copy
487 ;; The headers are decoded.
488 (nnheader-parse-head t))))
489 (message-yank-original)
490 (setq beg (or beg (mark t))))
496 (defun gnus-summary-cancel-article (&optional n symp)
497 "Cancel an article you posted.
498 Uses the process-prefix convention. If given the symbolic
499 prefix `a', cancel using the standard posting method; if not
500 post using the current select method."
501 (interactive (gnus-interactive "P\ny"))
502 (let ((articles (gnus-summary-work-articles n))
505 (gnus-post-method (not (eq symp 'a)) ,gnus-newsgroup-name)))
507 (while (setq article (pop articles))
508 (when (gnus-summary-select-article t nil nil article)
509 (when (gnus-eval-in-buffer-window gnus-original-article-buffer
510 (message-cancel-news))
511 (gnus-summary-mark-as-read article gnus-canceled-mark)
512 (gnus-cache-remove-article 1))
513 (gnus-article-hide-headers-if-wanted))
514 (gnus-summary-remove-process-mark article))))
516 (defun gnus-summary-supersede-article ()
517 "Compose an article that will supersede a previous article.
518 This is done simply by taking the old article and adding a Supersedes
519 header line with the old Message-ID."
521 (let ((article (gnus-summary-article-number)))
522 (gnus-setup-message 'reply-yank
523 (gnus-summary-select-article t)
524 (set-buffer gnus-original-article-buffer)
528 (when (gnus-buffer-exists-p ,gnus-summary-buffer)
530 (set-buffer ,gnus-summary-buffer)
531 (gnus-cache-possibly-remove-article ,article nil nil nil t)
532 (gnus-summary-mark-as-read ,article gnus-canceled-mark)))))
533 message-send-actions))))
537 (defun gnus-copy-article-buffer (&optional article-buffer)
538 ;; make a copy of the article buffer with all text properties removed
539 ;; this copy is in the buffer gnus-article-copy.
540 ;; if ARTICLE-BUFFER is nil, gnus-article-buffer is used
541 ;; this buffer should be passed to all mail/news reply/post routines.
542 (setq gnus-article-copy (gnus-get-buffer-create " *gnus article copy*"))
544 (set-buffer gnus-article-copy)
545 (mm-enable-multibyte))
546 (let ((article-buffer (or article-buffer gnus-article-buffer))
548 (if (not (and (get-buffer article-buffer)
549 (gnus-buffer-exists-p article-buffer)))
550 (error "Can't find any article buffer")
552 (set-buffer article-buffer)
553 (let ((gnus-newsgroup-charset (or gnus-article-charset
554 gnus-newsgroup-charset))
555 (gnus-newsgroup-ignored-charsets
556 (or gnus-article-ignored-charsets
557 gnus-newsgroup-ignored-charsets)))
559 ;; Copy over the (displayed) article buffer, delete
560 ;; hidden text and remove text properties.
562 (copy-to-buffer gnus-article-copy (point-min) (point-max))
563 (set-buffer gnus-article-copy)
564 (gnus-article-delete-text-of-type 'annotation)
565 (gnus-remove-text-with-property 'gnus-prev)
566 (gnus-remove-text-with-property 'gnus-next)
569 (buffer-substring-no-properties (point-min) (point-max))
571 ;; Find the original headers.
572 (set-buffer gnus-original-article-buffer)
573 (goto-char (point-min))
574 (while (looking-at message-unix-mail-delimiter)
577 (setq end (or (message-goto-body) beg))
578 ;; Delete the headers from the displayed articles.
579 (set-buffer gnus-article-copy)
580 (delete-region (goto-char (point-min))
581 (or (message-goto-body) (point-max)))
582 ;; Insert the original article headers.
583 (insert-buffer-substring gnus-original-article-buffer beg end)
585 (let ((gnus-article-decode-hook
586 (delq 'article-decode-charset
587 (copy-sequence gnus-article-decode-hook))))
588 (run-hooks 'gnus-article-decode-hook)))))
591 (defun gnus-post-news (post &optional group header article-buffer yank subject
594 (gnus-copy-article-buffer))
595 (let ((gnus-article-reply (and article-buffer (gnus-summary-article-number)))
596 (add-to-list gnus-add-to-list))
597 (gnus-setup-message (cond (yank 'reply-yank)
598 (article-buffer 'reply)
600 (let* ((group (or group gnus-newsgroup-name))
601 (charset (gnus-group-name-charset nil group))
603 to-address to-group mailing-list to-list
606 (setq to-address (gnus-parameter-to-address group)
607 to-group (gnus-group-find-parameter group 'to-group)
608 to-list (gnus-parameter-to-list group)
609 newsgroup-p (gnus-group-find-parameter group 'newsgroup)
610 mailing-list (when gnus-mailing-list-groups
611 (string-match gnus-mailing-list-groups group))
612 group (gnus-group-name-decode (gnus-group-real-name group)
614 (if (or (and to-group
615 (gnus-news-group-p to-group))
618 (and (gnus-news-group-p
619 (or pgroup gnus-newsgroup-name)
620 (or header gnus-current-article))
626 (message-news (or to-group group))
627 (set-buffer gnus-article-copy)
628 (gnus-msg-treat-broken-reply-to)
629 (message-followup (if (or newsgroup-p force-news)
630 (if (save-restriction
631 (article-narrow-to-head)
632 (message-fetch-field "newsgroups"))
639 (message-mail (or to-address to-list))
640 ;; Arrange for mail groups that have no `to-address' to
641 ;; get that when the user sends off the mail.
642 (when (and (not to-list)
645 (push (list 'gnus-inews-add-to-address pgroup)
646 message-send-actions)))
647 (set-buffer gnus-article-copy)
648 (gnus-msg-treat-broken-reply-to)
649 (message-wide-reply to-address)))
651 (gnus-inews-yank-articles yank))))))
653 (defun gnus-msg-treat-broken-reply-to (&optional force)
654 "Remove the Reply-to header iff broken-reply-to."
656 (gnus-group-find-parameter
657 gnus-newsgroup-name 'broken-reply-to))
659 (message-narrow-to-head)
660 (message-remove-header "reply-to"))))
662 (defun gnus-post-method (arg group &optional silent)
663 "Return the posting method based on GROUP and ARG.
664 If SILENT, don't prompt the user."
665 (let ((gnus-post-method (or (gnus-parameter-post-method group)
667 (group-method (gnus-find-method-for-group group)))
669 ;; If the group-method is nil (which shouldn't happen) we use
670 ;; the default method.
672 (or (and (listp gnus-post-method) ;If not current/native/nil
673 (not (listp (car gnus-post-method))) ; and not a list of methods
674 gnus-post-method) ;then use it.
676 message-post-method))
677 ;; We want the inverse of the default
678 ((and arg (not (eq arg 0)))
679 (if (eq gnus-post-method 'current)
682 ;; We query the user for a post method.
684 (and (listp gnus-post-method)
685 (listp (car gnus-post-method))))
687 ;; Collect all methods we know about.
689 (when (listp gnus-post-method)
690 (if (listp (car gnus-post-method))
692 (list gnus-post-method)))
693 gnus-secondary-select-methods
694 (mapcar 'cdr gnus-server-alist)
695 (mapcar 'car gnus-opened-servers)
696 (list gnus-select-method)
697 (list group-method)))
698 method-alist post-methods method)
699 ;; Weed out all mail methods.
701 (setq method (gnus-server-get-method "" (pop methods)))
702 (when (and (or (gnus-method-option-p method 'post)
703 (gnus-method-option-p method 'post-mail))
704 (not (member method post-methods)))
705 (push method post-methods)))
706 ;; Create a name-method alist.
710 (if (equal (cadr m) "")
711 (list (symbol-name (car m)) m)
712 (list (concat (cadr m) " (" (symbol-name (car m)) ")") m)))
717 (setq gnus-last-posting-server
719 gnus-last-posting-server)
720 ;; Just use the last value.
721 gnus-last-posting-server
723 "Posting method: " method-alist nil t
724 (cons (or gnus-last-posting-server "") 0))))
726 ;; Override normal method.
727 ((and (eq gnus-post-method 'current)
728 (not (eq (car group-method) 'nndraft))
729 (gnus-get-function group-method 'request-post t))
732 ;; Use gnus-post-method.
733 ((listp gnus-post-method) ;A method...
734 (assert (not (listp (car gnus-post-method)))) ;... not a list of methods.
736 ;; Use the normal select method (nil or native).
737 (t gnus-select-method))))
741 ;; Dummies to avoid byte-compile warning.
743 (defvar nnspool-rejected-article-hook)
744 (defvar xemacs-codename))
746 (defun gnus-extended-version ()
747 "Stringified Gnus version and Emacs version."
750 "Gnus/" (prin1-to-string (gnus-continuum-version gnus-version) t)
751 " (" gnus-version ")"
754 ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version)
755 (concat "Emacs/" (match-string 1 emacs-version)
756 " (" system-configuration ")"))
757 ((string-match "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)[^(]*\\(\\((beta.*)\\|'\\)\\)?"
759 (concat (match-string 1 emacs-version)
760 (format "/%d.%d" emacs-major-version emacs-minor-version)
761 (if (match-beginning 3)
762 (match-string 3 emacs-version)
764 (if (boundp 'xemacs-codename)
765 (concat " (" xemacs-codename ", " system-configuration ")")
771 ;;; Gnus Mail Functions
774 ;;; Mail reply commands of Gnus summary mode
776 (defun gnus-summary-reply (&optional yank wide very-wide)
777 "Start composing a mail reply to the current message.
778 If prefix argument YANK is non-nil, the original article is yanked
780 If WIDE, make a wide reply.
781 If VERY-WIDE, make a very wide reply."
783 (list (and current-prefix-arg
784 (gnus-summary-work-articles 1))))
785 ;; Stripping headers should be specified with mail-yank-ignored-headers.
787 (gnus-summary-goto-subject (car yank)))
788 (let ((gnus-article-reply (or yank (gnus-summary-article-number)))
790 (gnus-setup-message (if yank 'reply-yank 'reply)
792 (gnus-summary-select-article)
793 (dolist (article very-wide)
794 (gnus-summary-select-article nil nil nil article)
796 (set-buffer (gnus-copy-article-buffer))
797 (gnus-msg-treat-broken-reply-to)
799 (message-narrow-to-head)
800 (setq headers (concat headers (buffer-string)))))))
801 (set-buffer (gnus-copy-article-buffer))
802 (gnus-msg-treat-broken-reply-to gnus-msg-force-broken-reply-to)
804 (message-narrow-to-head)
808 (goto-char (point-max)))
809 (mml-quote-region (point) (point-max))
810 (message-reply nil wide)
812 (gnus-inews-yank-articles yank)))))
814 (defun gnus-summary-reply-with-original (n &optional wide)
815 "Start composing a reply mail to the current message.
816 The original article will be yanked."
818 (gnus-summary-reply (gnus-summary-work-articles n) wide))
820 (defun gnus-summary-reply-broken-reply-to (&optional yank wide very-wide)
821 "Like `gnus-summary-reply' except removing reply-to field.
822 If prefix argument YANK is non-nil, the original article is yanked
824 If WIDE, make a wide reply.
825 If VERY-WIDE, make a very wide reply."
827 (list (and current-prefix-arg
828 (gnus-summary-work-articles 1))))
829 (let ((gnus-msg-force-broken-reply-to t))
830 (gnus-summary-reply yank wide very-wide)))
832 (defun gnus-summary-reply-broken-reply-to-with-original (n &optional wide)
833 "Like `gnus-summary-reply-with-original' except removing reply-to field.
834 The original article will be yanked."
836 (gnus-summary-reply-broken-reply-to (gnus-summary-work-articles n) wide))
838 (defun gnus-summary-wide-reply (&optional yank)
839 "Start composing a wide reply mail to the current message.
840 If prefix argument YANK is non-nil, the original article is yanked
843 (list (and current-prefix-arg
844 (gnus-summary-work-articles 1))))
845 (gnus-summary-reply yank t))
847 (defun gnus-summary-wide-reply-with-original (n)
848 "Start composing a wide reply mail to the current message.
849 The original article will be yanked."
851 (gnus-summary-reply-with-original n t))
853 (defun gnus-summary-very-wide-reply (&optional yank)
854 "Start composing a very wide reply mail to the current message.
855 If prefix argument YANK is non-nil, the original article is yanked
858 (list (and current-prefix-arg
859 (gnus-summary-work-articles 1))))
860 (gnus-summary-reply yank t (gnus-summary-work-articles yank)))
862 (defun gnus-summary-very-wide-reply-with-original (n)
863 "Start composing a very wide reply mail to the current message.
864 The original article will be yanked."
867 (gnus-summary-work-articles n) t (gnus-summary-work-articles n)))
869 (defun gnus-summary-mail-forward (&optional arg post)
870 "Forward the current message to another user.
871 If ARG is nil, see `message-forward-as-mime' and `message-forward-show-mml';
872 if ARG is 1, decode the message and forward directly inline;
873 if ARG is 2, forward message as an rfc822 MIME section;
874 if ARG is 3, decode message and forward as an rfc822 MIME section;
875 if ARG is 4, forward message directly inline;
876 otherwise, use flipped `message-forward-as-mime'.
877 If POST, post instead of mail.
878 For the `inline' alternatives, also see the variable
879 `message-forward-ignored-headers'."
881 (let ((message-forward-as-mime message-forward-as-mime)
882 (message-forward-show-mml message-forward-show-mml))
886 (setq message-forward-as-mime nil
887 message-forward-show-mml t))
889 (setq message-forward-as-mime t
890 message-forward-show-mml nil))
892 (setq message-forward-as-mime t
893 message-forward-show-mml t))
895 (setq message-forward-as-mime nil
896 message-forward-show-mml nil))
898 (setq message-forward-as-mime (not message-forward-as-mime))))
899 (let ((gnus-article-reply (gnus-summary-article-number)))
900 (gnus-setup-message 'forward
901 (gnus-summary-select-article)
902 (let ((mail-parse-charset gnus-newsgroup-charset)
903 (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets))
904 (set-buffer gnus-original-article-buffer)
905 (message-forward post))))))
907 (defun gnus-summary-resend-message (address n)
908 "Resend the current article to ADDRESS."
910 (list (message-read-from-minibuffer "Resend message(s) to: ")
912 (let ((articles (gnus-summary-work-articles n))
914 (while (setq article (pop articles))
915 (gnus-summary-select-article nil nil nil article)
917 (set-buffer gnus-original-article-buffer)
918 (message-resend address))
919 (gnus-summary-mark-article-as-forwarded article))))
921 (defun gnus-summary-post-forward (&optional arg)
922 "Forward the current article to a newsgroup.
923 See `gnus-summary-mail-forward' for ARG."
925 (gnus-summary-mail-forward arg t))
927 (defvar gnus-nastygram-message
928 "The following article was inappropriately posted to %s.\n\n"
929 "Format string to insert in nastygrams.
930 The current group name will be inserted at \"%s\".")
932 (defun gnus-summary-mail-nastygram (n)
933 "Send a nastygram to the author of the current article."
935 (when (or gnus-expert-user
937 "Really send a nastygram to the author of the current article? "))
938 (let ((group gnus-newsgroup-name))
939 (gnus-summary-reply-with-original n)
940 (set-buffer gnus-message-buffer)
942 (insert (format gnus-nastygram-message group))
943 (message-send-and-exit))))
945 (defun gnus-summary-mail-crosspost-complaint (n)
946 "Send a complaint about crossposting to the current article(s)."
948 (let ((articles (gnus-summary-work-articles n))
950 (while (setq article (pop articles))
951 (set-buffer gnus-summary-buffer)
952 (gnus-summary-goto-subject article)
953 (let ((group (gnus-group-real-name gnus-newsgroup-name))
954 newsgroups followup-to)
955 (gnus-summary-select-article)
956 (set-buffer gnus-original-article-buffer)
957 (if (and (<= (length (message-tokenize-header
959 (mail-fetch-field "newsgroups"))
962 (or (not (setq followup-to (mail-fetch-field "followup-to")))
963 (not (member group (message-tokenize-header
964 followup-to ", ")))))
966 (gnus-message 1 "Followup-to restricted")
967 (gnus-message 1 "Not a crossposted article"))
968 (set-buffer gnus-summary-buffer)
969 (gnus-summary-reply-with-original 1)
970 (set-buffer gnus-message-buffer)
972 (insert (format gnus-crosspost-complaint newsgroups group))
973 (message-goto-subject)
974 (re-search-forward " *$")
975 (replace-match " (crosspost notification)" t t)
976 (gnus-deactivate-mark)
977 (when (gnus-y-or-n-p "Send this complaint? ")
978 (message-send-and-exit)))))))
980 (defun gnus-summary-mail-other-window ()
981 "Compose mail in other window."
983 (gnus-setup-message 'message
986 (defun gnus-mail-parse-comma-list ()
989 (skip-chars-forward " ")
992 (skip-chars-forward "^,")
997 (narrow-to-region beg (point))
1000 (while (search-forward "\"" nil t)
1004 (skip-chars-forward ",")
1005 (skip-chars-forward "^,"))
1006 (skip-chars-backward " ")
1007 (push (buffer-substring beg (point))
1009 (skip-chars-forward "^,")
1010 (skip-chars-forward ", "))
1013 (defun gnus-inews-add-to-address (group)
1014 (let ((to-address (mail-fetch-field "to")))
1015 (when (and to-address
1017 ;; This mail group doesn't have a `to-list', so we add one
1019 (when (gnus-y-or-n-p
1020 (format "Do you want to add this as `to-list': %s " to-address))
1021 (gnus-group-add-parameter group (cons 'to-list to-address))))))
1023 (defun gnus-put-message ()
1024 "Put the current message in some group and return to Gnus."
1026 (let ((reply gnus-article-reply)
1027 (winconf gnus-prev-winconf)
1028 (group gnus-newsgroup-name))
1030 (not (gnus-group-read-only-p group)))
1031 (setq group (read-string "Put in group: " nil (gnus-writable-groups))))
1033 (when (gnus-gethash group gnus-newsrc-hashtb)
1034 (error "No such group: %s" group))
1038 (message-narrow-to-headers)
1039 (let ((gnus-deletable-headers nil))
1040 (message-generate-headers
1041 (if (message-news-p)
1042 message-required-news-headers
1043 message-required-mail-headers)))
1044 (goto-char (point-max))
1045 (insert "Gcc: " group "\n")
1048 (when (and (get-buffer gnus-group-buffer)
1049 (gnus-buffer-exists-p (car-safe reply))
1051 (set-buffer (car reply))
1052 (gnus-summary-mark-article-as-replied (cdr reply)))
1054 (set-window-configuration winconf))))
1056 (defun gnus-article-mail (yank)
1057 "Send a reply to the address near point.
1058 If YANK is non-nil, include the original article."
1062 (save-excursion (re-search-backward "[ \t\n]" nil t) (1+ (point)))
1063 (save-excursion (re-search-forward "[ \t\n]" nil t) (1- (point))))))
1065 (message-reply address)
1067 (gnus-inews-yank-articles (list (cdr gnus-article-current)))))))
1069 (defvar nntp-server-type)
1071 "Send a bug report to the Gnus maintainers."
1073 (unless (gnus-alive-p)
1074 (error "Gnus has been shut down"))
1075 (gnus-setup-message (if (message-mail-user-agent) 'message 'bug)
1076 (unless (message-mail-user-agent)
1077 (delete-other-windows)
1078 (when gnus-bug-create-help-buffer
1079 (switch-to-buffer "*Gnus Help Bug*")
1081 (insert gnus-bug-message)
1082 (goto-char (point-min)))
1083 (message-pop-to-buffer "*Gnus Bug*"))
1084 (let ((message-this-is-mail t))
1085 (message-setup `((To . ,gnus-maintainer) (Subject . ""))))
1086 (when gnus-bug-create-help-buffer
1087 (push `(gnus-bug-kill-buffer) message-send-actions))
1088 (goto-char (point-min))
1089 (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$"))
1091 (insert (gnus-version) "\n"
1092 (emacs-version) "\n")
1093 (when (and (boundp 'nntp-server-type)
1094 (stringp nntp-server-type))
1095 (insert nntp-server-type))
1096 (insert "\n\n\n\n\n")
1099 (set-buffer (gnus-get-buffer-create " *gnus environment info*"))
1102 (setq text (buffer-string)))
1103 (insert "<#part type=application/x-emacs-lisp disposition=inline description=\"User settings\">\n" text "\n<#/part>"))
1104 (goto-char (point-min))
1105 (search-forward "Subject: " nil t)
1108 (defun gnus-bug-kill-buffer ()
1109 (when (get-buffer "*Gnus Help Bug*")
1110 (kill-buffer "*Gnus Help Bug*")))
1112 (defun gnus-summary-yank-message (buffer n)
1113 "Yank the current article into a composed message."
1115 (list (completing-read "Buffer: " (mapcar 'list (message-buffers)) nil t)
1116 current-prefix-arg))
1117 (gnus-summary-iterate n
1118 (let ((gnus-display-mime-function nil)
1119 (gnus-inhibit-treatment t))
1120 (gnus-summary-select-article))
1123 (message-yank-buffer gnus-article-buffer))))
1125 (defun gnus-debug ()
1126 "Attempts to go through the Gnus source file and report what variables have been changed.
1127 The source file has to be in the Emacs load path."
1129 (let ((files '("gnus.el" "gnus-sum.el" "gnus-group.el"
1130 "gnus-art.el" "gnus-start.el" "gnus-async.el"
1131 "gnus-msg.el" "gnus-score.el" "gnus-win.el" "gnus-topic.el"
1132 "nnmail.el" "message.el"))
1134 file expr olist sym)
1135 (gnus-message 4 "Please wait while we snoop your variables...")
1137 ;; Go through all the files looking for non-default values for variables.
1139 (set-buffer (gnus-get-buffer-create " *gnus bug info*"))
1142 (when (and (setq file (locate-library (pop files)))
1143 (file-exists-p file))
1144 (insert-file-contents file)
1145 (goto-char (point-min))
1146 (if (not (re-search-forward "^;;* *Internal variables" nil t))
1147 (gnus-message 4 "Malformed sources in file %s" file)
1148 (narrow-to-region (point-min) (point))
1149 (goto-char (point-min))
1150 (while (setq expr (ignore-errors (read (current-buffer))))
1152 (and (or (eq (car expr) 'defvar)
1153 (eq (car expr) 'defcustom))
1154 (stringp (nth 3 expr))
1155 (or (not (boundp (nth 1 expr)))
1156 (not (equal (eval (nth 2 expr))
1157 (symbol-value (nth 1 expr)))))
1158 (push (nth 1 expr) olist)))))))
1159 (kill-buffer (current-buffer)))
1160 (when (setq olist (nreverse olist))
1161 (insert "------------------ Environment follows ------------------\n\n"))
1163 (if (boundp (car olist))
1165 (pp `(setq ,(car olist)
1166 ,(if (or (consp (setq sym (symbol-value (car olist))))
1168 (not (or (eq sym nil)
1170 (list 'quote (symbol-value (car olist)))
1171 (symbol-value (car olist))))
1174 (format "(setq %s 'whatever)\n" (car olist))))
1175 (insert ";; (makeunbound '" (symbol-name (car olist)) ")\n"))
1176 (setq olist (cdr olist)))
1178 ;; Remove any control chars - they seem to cause trouble for some
1179 ;; mailers. (Byte-compiled output from the stuff above.)
1181 (while (re-search-forward "[\000-\010\013-\037\200-\237]" nil t)
1182 (replace-match (format "\\%03o" (string-to-char (match-string 0)))
1185 ;;; Treatment of rejected articles.
1188 (defun gnus-summary-resend-bounced-mail (&optional fetch)
1189 "Re-mail the current message.
1190 This only makes sense if the current message is a bounce message than
1191 contains some mail you have written which has been bounced back to
1193 If FETCH, try to fetch the article that this is a reply to, if indeed
1196 (gnus-summary-select-article t)
1197 (set-buffer gnus-original-article-buffer)
1198 (gnus-setup-message 'compose-bounce
1199 (let* ((references (mail-fetch-field "references"))
1200 (parent (and references (gnus-parent-id references))))
1202 ;; If there are references, we fetch the article we answered to.
1204 (gnus-summary-refer-article parent)
1205 (gnus-summary-show-all-headers)))))
1209 (defun gnus-inews-group-method (group)
1211 ;; If the group doesn't exist, we assume
1212 ;; it's an archive group...
1213 ((and (null (gnus-get-info group))
1214 (eq (car (gnus-server-to-method gnus-message-archive-method))
1215 (car (gnus-server-to-method (gnus-group-method group)))))
1216 gnus-message-archive-method)
1218 ((gnus-info-method (gnus-get-info group))
1219 (gnus-info-method (gnus-get-info group)))
1221 (t (gnus-server-to-method (gnus-group-method group)))))
1223 ;; Do Gcc handling, which copied the message over to some group.
1224 (defun gnus-inews-do-gcc (&optional gcc)
1228 (message-narrow-to-headers)
1229 (let ((gcc (or gcc (mail-fetch-field "gcc" nil t)))
1230 (cur (current-buffer))
1231 groups group method group-art)
1233 (message-remove-header "gcc")
1235 (setq groups (message-unquote-tokens
1236 (message-tokenize-header gcc " ,")))
1237 ;; Copy the article over to some group(s).
1238 (while (setq group (pop groups))
1239 (unless (gnus-check-server
1240 (setq method (gnus-inews-group-method group)))
1241 (error "Can't open server %s" (if (stringp method) method
1243 (unless (gnus-request-group group nil method)
1244 (gnus-request-create-group group method))
1246 (nnheader-set-temp-buffer " *acc*")
1247 (insert-buffer-substring cur)
1248 (message-encode-message-body)
1250 (message-narrow-to-headers)
1251 (let* ((mail-parse-charset message-default-charset)
1252 (newsgroups-field (save-restriction
1253 (message-narrow-to-headers-or-head)
1254 (message-fetch-field "Newsgroups")))
1255 (followup-field (save-restriction
1256 (message-narrow-to-headers-or-head)
1257 (message-fetch-field "Followup-To")))
1258 ;; BUG: We really need to get the charset for
1259 ;; each name in the Newsgroups and Followup-To
1260 ;; lines to allow crossposting between group
1261 ;; namess with incompatible character sets.
1262 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2001-10-08.
1263 (group-field-charset
1264 (gnus-group-name-charset
1265 method (or newsgroups-field "")))
1266 (followup-field-charset
1267 (gnus-group-name-charset
1268 method (or followup-field "")))
1269 (rfc2047-header-encoding-alist
1271 (when group-field-charset
1272 (list (cons "Newsgroups" group-field-charset)))
1273 (when followup-field-charset
1274 (list (cons "Followup-To" followup-field-charset)))
1275 rfc2047-header-encoding-alist)))
1276 (mail-encode-encoded-word-buffer)))
1277 (goto-char (point-min))
1278 (when (re-search-forward
1279 (concat "^" (regexp-quote mail-header-separator) "$")
1281 (replace-match "" t t ))
1282 (unless (setq group-art
1283 (gnus-request-accept-article group method t t))
1284 (gnus-message 1 "Couldn't store article in group %s: %s"
1285 group (gnus-status-message method))
1287 (when (and group-art gnus-inews-mark-gcc-as-read)
1288 (gnus-group-mark-article-read group (cdr group-art)))
1289 (kill-buffer (current-buffer)))))))))
1291 (defun gnus-inews-insert-gcc ()
1292 "Insert Gcc headers based on `gnus-outgoing-message-group'."
1295 (message-narrow-to-headers)
1296 (let* ((group gnus-outgoing-message-group)
1298 ((gnus-functionp group)
1300 ((or (stringp group) (list group))
1304 (if (stringp gcc) gcc
1305 (mapconcat 'identity gcc " "))
1308 (defun gnus-inews-insert-archive-gcc (&optional group)
1309 "Insert the Gcc to say where the article is to be archived."
1310 (let* ((var gnus-message-archive-group)
1311 (group (or group gnus-newsgroup-name ""))
1313 (and gnus-newsgroup-name
1314 (not (equal gnus-newsgroup-name ""))
1315 (gnus-group-find-parameter
1316 gnus-newsgroup-name 'gcc-self)))
1320 ((null gnus-message-archive-method)
1324 ;; Just a single group.
1327 ;; We don't want this.
1329 ((and (listp var) (stringp (car var)))
1330 ;; A list of groups.
1332 ((gnus-functionp var)
1334 (funcall var group))
1336 ;; An alist of regexps/functions/forms.
1341 ((stringp (caar var))
1343 (when (string-match (caar var) group)
1345 ((gnus-functionp (car var))
1347 (funcall (car var) group))
1349 (eval (car var)))))))
1350 (setq var (cdr var)))
1353 (when (or groups gcc-self-val)
1354 (when (stringp groups)
1355 (setq groups (list groups)))
1358 (message-narrow-to-headers)
1359 (goto-char (point-max))
1362 ;; Use the `gcc-self' param value instead.
1365 (if (stringp gcc-self-val)
1368 (if (not (eq gcc-self-val 'none))
1373 ;; Use the list of groups.
1374 (while (setq name (pop groups))
1375 (insert (if (string-match ":" name)
1377 (gnus-group-prefixed-name
1378 name gnus-message-archive-method)))
1385 (defun gnus-configure-posting-styles ()
1386 "Configure posting styles according to `gnus-posting-styles'."
1387 (unless gnus-inhibit-posting-styles
1388 (let ((group (or gnus-newsgroup-name ""))
1389 (styles gnus-posting-styles)
1390 style match variable attribute value v results
1391 filep name address element)
1392 ;; If the group has a posting-style parameter, add it at the end with a
1393 ;; regexp matching everything, to be sure it takes precedence over all
1395 (when gnus-newsgroup-name
1396 (let ((tmp-style (gnus-group-find-parameter group 'posting-style t)))
1398 (setq styles (append styles (list (cons ".*" tmp-style)))))))
1399 ;; Go through all styles and look for matches.
1400 (dolist (style styles)
1401 (setq match (pop style))
1402 (goto-char (point-min))
1405 ;; Regexp string match on the group name.
1406 (string-match match group))
1408 (and (gnus-buffer-live-p gnus-article-copy)
1409 (with-current-buffer gnus-article-copy
1410 (let ((header (message-fetch-field (pop style))))
1412 (string-match (pop style) header))))))
1413 ((or (symbolp match)
1414 (gnus-functionp match))
1416 ((gnus-functionp match)
1417 ;; Function to be called.
1420 ;; Variable to be checked.
1421 (symbol-value match))))
1423 ;; This is a form to be evaled.
1425 ;; We have a match, so we set the variables.
1426 (dolist (attribute style)
1427 (setq element (pop attribute)
1432 ((eq (car attribute) :file)
1435 ((eq (car attribute) :value)
1439 ;; We get the value.
1444 ((or (symbolp value)
1445 (gnus-functionp value))
1446 (cond ((gnus-functionp value)
1449 (symbol-value value))))
1452 ;; Translate obsolescent value.
1453 (when (eq element 'signature-file)
1454 (setq element 'signature
1456 ;; Get the contents of file elems.
1458 (setq v (with-temp-buffer
1459 (insert-file-contents v)
1461 (setq results (delq (assoc element results) results))
1462 (push (cons element v) results))))
1463 ;; Now we have all the styles, so we insert them.
1464 (setq name (assq 'name results)
1465 address (assq 'address results))
1466 (setq results (delq name (delq address results)))
1467 (make-local-variable 'message-setup-hook)
1468 (dolist (result results)
1469 (add-hook 'message-setup-hook
1471 ((eq 'eval (car result))
1473 ((eq 'body (car result))
1477 (insert ,(cdr result)))))
1478 ((eq 'signature (car result))
1479 (set (make-local-variable 'message-signature) nil)
1480 (set (make-local-variable 'message-signature-file) nil)
1481 (if (not (cdr result))
1485 (let ((message-signature ,(cdr result)))
1486 (when message-signature
1487 (message-insert-signature)))))))
1490 (if (symbolp (car result))
1491 (capitalize (symbol-name (car result)))
1495 (message-remove-header ,header)
1496 (let ((value ,(cdr result)))
1499 (insert ,header ": " value "\n"))))))))))
1500 (when (or name address)
1501 (add-hook 'message-setup-hook
1503 (set (make-local-variable 'user-mail-address)
1504 ,(or (cdr address) user-mail-address))
1505 (let ((user-full-name ,(or (cdr name) (user-full-name)))
1507 ,(or (cdr address) user-mail-address)))
1509 (message-remove-header "From")
1511 (insert "From: " (message-make-from) "\n")))))))))
1513 ;;; Allow redefinition of functions.
1519 ;;; gnus-msg.el ends here