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."
117 :type '(repeat (cons (choice (regexp)
122 (choice (const signature)
123 (const signature-file)
128 (string :tag "Header"))
134 (defcustom gnus-inews-mark-gcc-as-read nil
135 "If non-nil, automatically mark Gcc articles as read."
139 (defcustom gnus-group-posting-charset-alist
140 '(("^\\(no\\|fr\\)\\.[^,]*\\(,[ \t\n]*\\(no\\|fr\\)\\.[^,]*\\)*$" iso-8859-1 (iso-8859-1))
141 ("^\\(fido7\\|relcom\\)\\.[^,]*\\(,[ \t\n]*\\(fido7\\|relcom\\)\\.[^,]*\\)*$" koi8-r (koi8-r))
142 (message-this-is-mail nil nil)
143 (message-this-is-news nil t))
144 "Alist of regexps and permitted unencoded charsets for posting.
145 Each element of the alist has the form (TEST HEADER BODY-LIST), where
146 TEST is either a regular expression matching the newsgroup header or a
148 HEADER is the charset which may be left unencoded in the header (nil
149 means encode all charsets),
150 BODY-LIST is a list of charsets which may be encoded using 8bit
151 content-transfer encoding in the body, or one of the special values
152 nil (always encode using quoted-printable) or t (always use 8bit).
154 Note that any value other than nil for HEADER infringes some RFCs, so
155 use this option with care."
156 :type '(repeat (list :tag "Permitted unencoded charsets"
158 (regexp :tag "Group")
159 (const :tag "Mail message" :value message-this-is-mail)
160 (const :tag "News article" :value message-this-is-news))
161 (choice :tag "Header"
162 (const :tag "None" nil)
163 (symbol :tag "Charset"))
165 (const :tag "Any" :value t)
166 (const :tag "None" :value nil)
167 (repeat :tag "Charsets"
168 (symbol :tag "Charset")))))
169 :group 'gnus-charset)
171 ;;; Internal variables.
173 (defvar gnus-inhibit-posting-styles nil
174 "Inhibit the use of posting styles.")
176 (defvar gnus-message-buffer "*Mail Gnus*")
177 (defvar gnus-article-copy nil)
178 (defvar gnus-check-before-posting nil)
179 (defvar gnus-last-posting-server nil)
180 (defvar gnus-message-group-art nil)
182 (defvar gnus-msg-force-broken-reply-to nil)
184 (defconst gnus-bug-message
185 "Sending a bug report to the Gnus Towers.
186 ========================================
188 The buffer below is a mail buffer. When you press `C-c C-c', it will
189 be sent to the Gnus Bug Exterminators.
191 The thing near the bottom of the buffer is how the environment
192 settings will be included in the mail. Please do not delete that.
193 They will tell the Bug People what your environment is, so that it
194 will be easier to locate the bugs.
196 If you have found a bug that makes Emacs go \"beep\", set
197 debug-on-error to t (`M-x set-variable RET debug-on-error RET t RET')
198 and include the backtrace in your bug report.
200 Please describe the bug in annoying, painstaking detail.
202 Thank you for your help in stamping out bugs.
206 (autoload 'gnus-uu-post-news "gnus-uu" nil t)
207 (autoload 'news-setup "rnewspost")
208 (autoload 'news-reply-mode "rnewspost")
209 (autoload 'rmail-dont-reply-to "mail-utils")
210 (autoload 'rmail-output "rmailout"))
214 ;;; Gnus Posting Functions
217 (gnus-define-keys (gnus-summary-send-map "S" gnus-summary-mode-map)
218 "p" gnus-summary-post-news
219 "f" gnus-summary-followup
220 "F" gnus-summary-followup-with-original
221 "c" gnus-summary-cancel-article
222 "s" gnus-summary-supersede-article
223 "r" gnus-summary-reply
224 "y" gnus-summary-yank-message
225 "R" gnus-summary-reply-with-original
226 "w" gnus-summary-wide-reply
227 "W" gnus-summary-wide-reply-with-original
228 "v" gnus-summary-very-wide-reply
229 "W" gnus-summary-very-wide-reply-with-original
230 "n" gnus-summary-followup-to-mail
231 "N" gnus-summary-followup-to-mail-with-original
232 "m" gnus-summary-mail-other-window
233 "u" gnus-uu-post-news
234 "\M-c" gnus-summary-mail-crosspost-complaint
235 "Br" gnus-summary-reply-broken-reply-to
236 "BR" gnus-summary-reply-broken-reply-to-with-original
237 "om" gnus-summary-mail-forward
238 "op" gnus-summary-post-forward
239 "Om" gnus-uu-digest-mail-forward
240 "Op" gnus-uu-digest-post-forward)
242 (gnus-define-keys (gnus-send-bounce-map "D" gnus-summary-send-map)
243 "b" gnus-summary-resend-bounced-mail
244 ;; "c" gnus-summary-send-draft
245 "r" gnus-summary-resend-message)
247 ;;; Internal functions.
249 (defvar gnus-article-reply nil)
250 (defmacro gnus-setup-message (config &rest forms)
251 (let ((winconf (make-symbol "gnus-setup-message-winconf"))
252 (buffer (make-symbol "gnus-setup-message-buffer"))
253 (article (make-symbol "gnus-setup-message-article"))
254 (group (make-symbol "gnus-setup-message-group")))
255 `(let ((,winconf (current-window-configuration))
256 (,buffer (buffer-name (current-buffer)))
257 (,article gnus-article-reply)
258 (,group gnus-newsgroup-name)
259 (message-header-setup-hook
260 (copy-sequence message-header-setup-hook))
261 (mbl mml-buffer-list)
262 (message-mode-hook (copy-sequence message-mode-hook)))
263 (setq mml-buffer-list nil)
264 (add-hook 'message-header-setup-hook 'gnus-inews-insert-gcc)
265 (add-hook 'message-header-setup-hook 'gnus-inews-insert-archive-gcc)
266 (add-hook 'message-mode-hook 'gnus-configure-posting-styles)
270 (gnus-inews-add-send-actions ,winconf ,buffer ,article ,config)
271 (gnus-inews-insert-draft-meta-information ,group ,article)
272 (setq gnus-message-buffer (current-buffer))
273 (set (make-local-variable 'gnus-message-group-art)
274 (cons ,group ,article))
275 (set (make-local-variable 'gnus-newsgroup-name) ,group)
276 (gnus-run-hooks 'gnus-message-setup-hook)
277 (if (eq major-mode 'message-mode)
278 (let ((mbl1 mml-buffer-list))
279 (setq mml-buffer-list mbl) ;; Global value
280 (set (make-local-variable 'mml-buffer-list) mbl1);; Local value
281 ;; LOCAL argument of add-hook differs between GNU Emacs
282 ;; and XEmacs. make-local-hook makes sure they are local.
283 (make-local-hook 'kill-buffer-hook)
284 (make-local-hook 'change-major-mode-hook)
285 (add-hook 'change-major-mode-hook 'mml-destroy-buffers nil t)
286 (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t))
287 (mml-destroy-buffers)
288 (setq mml-buffer-list mbl)))
290 (gnus-configure-windows ,config t)
291 (run-hooks 'post-command-hook)
292 (set-buffer-modified-p nil))))
294 (defun gnus-inews-insert-draft-meta-information (group article)
297 (not (string= group ""))
298 (not (message-fetch-field gnus-draft-meta-information-header)))
299 (goto-char (point-min))
300 (insert gnus-draft-meta-information-header ": (\"" group "\" "
301 (if article (number-to-string
308 (defun gnus-msg-mail (&optional to subject other-headers continue
309 switch-action yank-action send-actions)
310 "Start editing a mail message to be sent.
311 Like `message-mail', but with Gnus paraphernalia, particularly the
312 Gcc: header for archiving purposes."
314 (let ((buf (current-buffer))
316 (gnus-setup-message 'message
317 (message-mail to subject other-headers continue
318 nil yank-action send-actions))
320 (setq mail-buf (current-buffer))
321 (switch-to-buffer buf)
322 (apply switch-action mail-buf nil)))
323 ;; COMPOSEFUNC should return t if succeed. Undocumented ???
326 (defvar save-selected-window-window)
329 (defun gnus-button-mailto (address)
331 (set-buffer (gnus-copy-article-buffer))
332 (gnus-setup-message 'message
333 (message-reply address))
334 (and (boundp 'save-selected-window-window)
335 (not (window-live-p save-selected-window-window))
336 (setq save-selected-window-window (selected-window))))
339 (defun gnus-button-reply (&optional to-address wide)
340 "Like `message-reply'."
342 (gnus-setup-message 'message
343 (message-reply to-address wide))
344 (and (boundp 'save-selected-window-window)
345 (not (window-live-p save-selected-window-window))
346 (setq save-selected-window-window (selected-window))))
349 (define-mail-user-agent 'gnus-user-agent
350 'gnus-msg-mail 'message-send-and-exit
351 'message-kill-buffer 'message-send-hook)
353 (defun gnus-setup-posting-charset (group)
354 (let ((alist gnus-group-posting-charset-alist)
355 (group (or group ""))
359 (while (setq elem (pop alist))
360 (when (or (and (stringp (car elem))
361 (string-match (car elem) group))
362 (and (gnus-functionp (car elem))
363 (funcall (car elem) group))
364 (and (symbolp (car elem))
365 (symbol-value (car elem))))
366 (throw 'found (cons (cadr elem) (caddr elem)))))))))
368 (defun gnus-inews-add-send-actions (winconf buffer article &optional config)
369 (make-local-hook 'message-sent-hook)
370 (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc
371 'gnus-inews-do-gcc) nil t)
373 (make-local-hook 'message-header-hook)
374 (add-hook 'message-header-hook 'gnus-agent-possibly-save-gcc nil t))
375 (setq message-post-method
377 (gnus-post-method arg ,gnus-newsgroup-name)))
378 (setq message-newsreader (setq message-mailer (gnus-extended-version)))
380 `(set-window-configuration ,winconf) 'exit 'postpone 'kill)
382 `(when (gnus-buffer-exists-p ,buffer)
386 (if (eq config 'forward)
387 `(gnus-summary-mark-article-as-forwarded ',article)
388 `(gnus-summary-mark-article-as-replied ',article)))))
391 (put 'gnus-setup-message 'lisp-indent-function 1)
392 (put 'gnus-setup-message 'edebug-form-spec '(form body))
394 ;;; Post news commands of Gnus group mode and summary mode
396 (defun gnus-group-mail (&optional arg)
397 "Start composing a mail.
398 If ARG, use the group under the point to find a posting style.
399 If ARG is 1, prompt for a group name to find the posting style."
401 ;; We can't `let' gnus-newsgroup-name here, since that leads
402 ;; to local variables leaking.
403 (let ((group gnus-newsgroup-name)
404 (buffer (current-buffer)))
407 (setq gnus-newsgroup-name
409 (if (= 1 (prefix-numeric-value arg))
410 (completing-read "Use posting style of group: "
411 gnus-active-hashtb nil
412 (gnus-read-active-file-p))
413 (gnus-group-group-name))
415 (gnus-setup-message 'message (message-mail)))
418 (setq gnus-newsgroup-name group)))))
420 (defun gnus-group-post-news (&optional arg)
421 "Start composing a news message.
422 If ARG, post to the group under point.
423 If ARG is 1, prompt for a group name."
425 ;; Bind this variable here to make message mode hooks work ok.
426 (let ((gnus-newsgroup-name
428 (if (= 1 (prefix-numeric-value arg))
429 (completing-read "Newsgroup: " gnus-active-hashtb nil
430 (gnus-read-active-file-p))
431 (gnus-group-group-name))
433 (gnus-post-news 'post gnus-newsgroup-name)))
435 (defun gnus-summary-post-news ()
436 "Start composing a news message."
438 (gnus-post-news 'post gnus-newsgroup-name))
440 (defun gnus-summary-followup (yank &optional force-news)
441 "Compose a followup to an article.
442 If prefix argument YANK is non-nil, original article is yanked automatically."
444 (list (and current-prefix-arg
445 (gnus-summary-work-articles 1))))
447 (gnus-summary-goto-subject (car yank)))
448 (save-window-excursion
449 (gnus-summary-select-article))
450 (let ((headers (gnus-summary-article-header (gnus-summary-article-number)))
451 (gnus-newsgroup-name gnus-newsgroup-name))
453 (gnus-post-news nil gnus-newsgroup-name
454 headers gnus-article-buffer
455 yank nil force-news)))
457 (defun gnus-summary-followup-with-original (n &optional force-news)
458 "Compose a followup to an article and include the original article."
460 (gnus-summary-followup (gnus-summary-work-articles n) force-news))
462 (defun gnus-summary-followup-to-mail (&optional arg)
463 "Followup to the current mail message via news."
465 (list (and current-prefix-arg
466 (gnus-summary-work-articles 1))))
467 (gnus-summary-followup arg t))
469 (defun gnus-summary-followup-to-mail-with-original (&optional arg)
470 "Followup to the current mail message via news."
472 (gnus-summary-followup (gnus-summary-work-articles arg) t))
474 (defun gnus-inews-yank-articles (articles)
477 (while (setq article (pop articles))
478 (save-window-excursion
479 (set-buffer gnus-summary-buffer)
480 (gnus-summary-select-article nil nil nil article)
481 (gnus-summary-remove-process-mark article))
482 (gnus-copy-article-buffer)
483 (let ((message-reply-buffer gnus-article-copy)
484 (message-reply-headers
485 (with-current-buffer gnus-article-copy
486 ;; The headers are decoded.
487 (nnheader-parse-head t))))
488 (message-yank-original)
489 (setq beg (or beg (mark t))))
495 (defun gnus-summary-cancel-article (&optional n symp)
496 "Cancel an article you posted.
497 Uses the process-prefix convention. If given the symbolic
498 prefix `a', cancel using the standard posting method; if not
499 post using the current select method."
500 (interactive (gnus-interactive "P\ny"))
501 (let ((articles (gnus-summary-work-articles n))
504 (gnus-post-method (not (eq symp 'a)) ,gnus-newsgroup-name)))
506 (while (setq article (pop articles))
507 (when (gnus-summary-select-article t nil nil article)
508 (when (gnus-eval-in-buffer-window gnus-original-article-buffer
509 (message-cancel-news))
510 (gnus-summary-mark-as-read article gnus-canceled-mark)
511 (gnus-cache-remove-article 1))
512 (gnus-article-hide-headers-if-wanted))
513 (gnus-summary-remove-process-mark article))))
515 (defun gnus-summary-supersede-article ()
516 "Compose an article that will supersede a previous article.
517 This is done simply by taking the old article and adding a Supersedes
518 header line with the old Message-ID."
520 (let ((article (gnus-summary-article-number)))
521 (gnus-setup-message 'reply-yank
522 (gnus-summary-select-article t)
523 (set-buffer gnus-original-article-buffer)
527 (when (gnus-buffer-exists-p ,gnus-summary-buffer)
529 (set-buffer ,gnus-summary-buffer)
530 (gnus-cache-possibly-remove-article ,article nil nil nil t)
531 (gnus-summary-mark-as-read ,article gnus-canceled-mark)))))
532 message-send-actions))))
536 (defun gnus-copy-article-buffer (&optional article-buffer)
537 ;; make a copy of the article buffer with all text properties removed
538 ;; this copy is in the buffer gnus-article-copy.
539 ;; if ARTICLE-BUFFER is nil, gnus-article-buffer is used
540 ;; this buffer should be passed to all mail/news reply/post routines.
541 (setq gnus-article-copy (gnus-get-buffer-create " *gnus article copy*"))
543 (set-buffer gnus-article-copy)
544 (mm-enable-multibyte))
545 (let ((article-buffer (or article-buffer gnus-article-buffer))
547 (if (not (and (get-buffer article-buffer)
548 (gnus-buffer-exists-p article-buffer)))
549 (error "Can't find any article buffer")
551 (set-buffer article-buffer)
552 (let ((gnus-newsgroup-charset (or gnus-article-charset
553 gnus-newsgroup-charset))
554 (gnus-newsgroup-ignored-charsets
555 (or gnus-article-ignored-charsets
556 gnus-newsgroup-ignored-charsets)))
558 ;; Copy over the (displayed) article buffer, delete
559 ;; hidden text and remove text properties.
561 (copy-to-buffer gnus-article-copy (point-min) (point-max))
562 (set-buffer gnus-article-copy)
563 (gnus-article-delete-text-of-type 'annotation)
564 (gnus-remove-text-with-property 'gnus-prev)
565 (gnus-remove-text-with-property 'gnus-next)
568 (buffer-substring-no-properties (point-min) (point-max))
570 ;; Find the original headers.
571 (set-buffer gnus-original-article-buffer)
572 (goto-char (point-min))
573 (while (looking-at message-unix-mail-delimiter)
576 (setq end (or (message-goto-body) beg))
577 ;; Delete the headers from the displayed articles.
578 (set-buffer gnus-article-copy)
579 (delete-region (goto-char (point-min))
580 (or (message-goto-body) (point-max)))
581 ;; Insert the original article headers.
582 (insert-buffer-substring gnus-original-article-buffer beg end)
584 (let ((gnus-article-decode-hook
585 (delq 'article-decode-charset
586 (copy-sequence gnus-article-decode-hook))))
587 (run-hooks 'gnus-article-decode-hook)))))
590 (defun gnus-post-news (post &optional group header article-buffer yank subject
593 (gnus-copy-article-buffer))
594 (let ((gnus-article-reply (and article-buffer (gnus-summary-article-number)))
595 (add-to-list gnus-add-to-list))
596 (gnus-setup-message (cond (yank 'reply-yank)
597 (article-buffer 'reply)
599 (let* ((group (or group gnus-newsgroup-name))
600 (charset (gnus-group-name-charset nil group))
602 to-address to-group mailing-list to-list
605 (setq to-address (gnus-parameter-to-address group)
606 to-group (gnus-group-find-parameter group 'to-group)
607 to-list (gnus-parameter-to-list group)
608 newsgroup-p (gnus-group-find-parameter group 'newsgroup)
609 mailing-list (when gnus-mailing-list-groups
610 (string-match gnus-mailing-list-groups group))
611 group (gnus-group-name-decode (gnus-group-real-name group)
613 (if (or (and to-group
614 (gnus-news-group-p to-group))
617 (and (gnus-news-group-p
618 (or pgroup gnus-newsgroup-name)
619 (or header gnus-current-article))
625 (message-news (or to-group group))
626 (set-buffer gnus-article-copy)
627 (gnus-msg-treat-broken-reply-to)
628 (message-followup (if (or newsgroup-p force-news)
629 (if (save-restriction
630 (article-narrow-to-head)
631 (message-fetch-field "newsgroups"))
638 (message-mail (or to-address to-list))
639 ;; Arrange for mail groups that have no `to-address' to
640 ;; get that when the user sends off the mail.
641 (when (and (not to-list)
644 (push (list 'gnus-inews-add-to-address pgroup)
645 message-send-actions)))
646 (set-buffer gnus-article-copy)
647 (gnus-msg-treat-broken-reply-to)
648 (message-wide-reply to-address)))
650 (gnus-inews-yank-articles yank))))))
652 (defun gnus-msg-treat-broken-reply-to (&optional force)
653 "Remove the Reply-to header iff broken-reply-to."
655 (gnus-group-find-parameter
656 gnus-newsgroup-name 'broken-reply-to))
658 (message-narrow-to-head)
659 (message-remove-header "reply-to"))))
661 (defun gnus-post-method (arg group &optional silent)
662 "Return the posting method based on GROUP and ARG.
663 If SILENT, don't prompt the user."
664 (let ((gnus-post-method (or (gnus-parameter-post-method group)
666 (group-method (gnus-find-method-for-group group)))
668 ;; If the group-method is nil (which shouldn't happen) we use
669 ;; the default method.
671 (or (and (listp gnus-post-method) ;If not current/native/nil
672 (not (listp (car gnus-post-method))) ; and not a list of methods
673 gnus-post-method) ;then use it.
675 message-post-method))
676 ;; We want the inverse of the default
677 ((and arg (not (eq arg 0)))
678 (if (eq gnus-post-method 'current)
681 ;; We query the user for a post method.
683 (and (listp gnus-post-method)
684 (listp (car gnus-post-method))))
686 ;; Collect all methods we know about.
688 (when (listp gnus-post-method)
689 (if (listp (car gnus-post-method))
691 (list gnus-post-method)))
692 gnus-secondary-select-methods
693 (mapcar 'cdr gnus-server-alist)
694 (mapcar 'car gnus-opened-servers)
695 (list gnus-select-method)
696 (list group-method)))
697 method-alist post-methods method)
698 ;; Weed out all mail methods.
700 (setq method (gnus-server-get-method "" (pop methods)))
701 (when (and (or (gnus-method-option-p method 'post)
702 (gnus-method-option-p method 'post-mail))
703 (not (member method post-methods)))
704 (push method post-methods)))
705 ;; Create a name-method alist.
709 (if (equal (cadr m) "")
710 (list (symbol-name (car m)) m)
711 (list (concat (cadr m) " (" (symbol-name (car m)) ")") m)))
716 (setq gnus-last-posting-server
718 gnus-last-posting-server)
719 ;; Just use the last value.
720 gnus-last-posting-server
722 "Posting method: " method-alist nil t
723 (cons (or gnus-last-posting-server "") 0))))
725 ;; Override normal method.
726 ((and (eq gnus-post-method 'current)
727 (not (eq (car group-method) 'nndraft))
728 (gnus-get-function group-method 'request-post t))
731 ;; Use gnus-post-method.
732 ((listp gnus-post-method) ;A method...
733 (assert (not (listp (car gnus-post-method)))) ;... not a list of methods.
735 ;; Use the normal select method (nil or native).
736 (t gnus-select-method))))
740 ;; Dummies to avoid byte-compile warning.
742 (defvar nnspool-rejected-article-hook)
743 (defvar xemacs-codename))
745 (defun gnus-extended-version ()
746 "Stringified Gnus version and Emacs version."
749 "Gnus/" (prin1-to-string (gnus-continuum-version gnus-version) t)
750 " (" gnus-version ")"
753 ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version)
754 (concat "Emacs/" (match-string 1 emacs-version)
755 " (" system-configuration ")"))
756 ((string-match "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)[^(]*\\(\\((beta.*)\\|'\\)\\)?"
758 (concat (match-string 1 emacs-version)
759 (format "/%d.%d" emacs-major-version emacs-minor-version)
760 (if (match-beginning 3)
761 (match-string 3 emacs-version)
763 (if (boundp 'xemacs-codename)
764 (concat " (" xemacs-codename ", " system-configuration ")")
770 ;;; Gnus Mail Functions
773 ;;; Mail reply commands of Gnus summary mode
775 (defun gnus-summary-reply (&optional yank wide very-wide)
776 "Start composing a mail reply to the current message.
777 If prefix argument YANK is non-nil, the original article is yanked
779 If WIDE, make a wide reply.
780 If VERY-WIDE, make a very wide reply."
782 (list (and current-prefix-arg
783 (gnus-summary-work-articles 1))))
784 ;; Stripping headers should be specified with mail-yank-ignored-headers.
786 (gnus-summary-goto-subject (car yank)))
787 (let ((gnus-article-reply (or yank (gnus-summary-article-number)))
789 (gnus-setup-message (if yank 'reply-yank 'reply)
791 (gnus-summary-select-article)
792 (dolist (article very-wide)
793 (gnus-summary-select-article nil nil nil article)
795 (set-buffer (gnus-copy-article-buffer))
796 (gnus-msg-treat-broken-reply-to)
798 (message-narrow-to-head)
799 (setq headers (concat headers (buffer-string)))))))
800 (set-buffer (gnus-copy-article-buffer))
801 (gnus-msg-treat-broken-reply-to gnus-msg-force-broken-reply-to)
803 (message-narrow-to-head)
807 (goto-char (point-max)))
808 (mml-quote-region (point) (point-max))
809 (message-reply nil wide)
811 (gnus-inews-yank-articles yank)))))
813 (defun gnus-summary-reply-with-original (n &optional wide)
814 "Start composing a reply mail to the current message.
815 The original article will be yanked."
817 (gnus-summary-reply (gnus-summary-work-articles n) wide))
819 (defun gnus-summary-reply-broken-reply-to (&optional yank wide very-wide)
820 "Like `gnus-summary-reply' except removing reply-to field.
821 If prefix argument YANK is non-nil, the original article is yanked
823 If WIDE, make a wide reply.
824 If VERY-WIDE, make a very wide reply."
826 (list (and current-prefix-arg
827 (gnus-summary-work-articles 1))))
828 (let ((gnus-msg-force-broken-reply-to t))
829 (gnus-summary-reply yank wide very-wide)))
831 (defun gnus-summary-reply-broken-reply-to-with-original (n &optional wide)
832 "Like `gnus-summary-reply-with-original' except removing reply-to field.
833 The original article will be yanked."
835 (gnus-summary-reply-broken-reply-to (gnus-summary-work-articles n) wide))
837 (defun gnus-summary-wide-reply (&optional yank)
838 "Start composing a wide reply mail to the current message.
839 If prefix argument YANK is non-nil, the original article is yanked
842 (list (and current-prefix-arg
843 (gnus-summary-work-articles 1))))
844 (gnus-summary-reply yank t))
846 (defun gnus-summary-wide-reply-with-original (n)
847 "Start composing a wide reply mail to the current message.
848 The original article will be yanked."
850 (gnus-summary-reply-with-original n t))
852 (defun gnus-summary-very-wide-reply (&optional yank)
853 "Start composing a very wide reply mail to the current message.
854 If prefix argument YANK is non-nil, the original article is yanked
857 (list (and current-prefix-arg
858 (gnus-summary-work-articles 1))))
859 (gnus-summary-reply yank t (gnus-summary-work-articles yank)))
861 (defun gnus-summary-very-wide-reply-with-original (n)
862 "Start composing a very wide reply mail to the current message.
863 The original article will be yanked."
866 (gnus-summary-work-articles n) t (gnus-summary-work-articles n)))
868 (defun gnus-summary-mail-forward (&optional arg post)
869 "Forward the current message to another user.
870 If ARG is nil, see `message-forward-as-mime' and `message-forward-show-mml';
871 if ARG is 1, decode the message and forward directly inline;
872 if ARG is 2, forward message as an rfc822 MIME section;
873 if ARG is 3, decode message and forward as an rfc822 MIME section;
874 if ARG is 4, forward message directly inline;
875 otherwise, use flipped `message-forward-as-mime'.
876 If POST, post instead of mail.
877 For the `inline' alternatives, also see the variable
878 `message-forward-ignored-headers'."
880 (let ((message-forward-as-mime message-forward-as-mime)
881 (message-forward-show-mml message-forward-show-mml))
885 (setq message-forward-as-mime nil
886 message-forward-show-mml t))
888 (setq message-forward-as-mime t
889 message-forward-show-mml nil))
891 (setq message-forward-as-mime t
892 message-forward-show-mml t))
894 (setq message-forward-as-mime nil
895 message-forward-show-mml nil))
897 (setq message-forward-as-mime (not message-forward-as-mime))))
898 (let ((gnus-article-reply (gnus-summary-article-number)))
899 (gnus-setup-message 'forward
900 (gnus-summary-select-article)
901 (let ((mail-parse-charset gnus-newsgroup-charset)
902 (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets))
903 (set-buffer gnus-original-article-buffer)
904 (message-forward post))))))
906 (defun gnus-summary-resend-message (address n)
907 "Resend the current article to ADDRESS."
909 (list (message-read-from-minibuffer "Resend message(s) to: ")
911 (let ((articles (gnus-summary-work-articles n))
913 (while (setq article (pop articles))
914 (gnus-summary-select-article nil nil nil article)
916 (set-buffer gnus-original-article-buffer)
917 (message-resend address))
918 (gnus-summary-mark-article-as-forwarded article))))
920 (defun gnus-summary-post-forward (&optional arg)
921 "Forward the current article to a newsgroup.
922 See `gnus-summary-mail-forward' for ARG."
924 (gnus-summary-mail-forward arg t))
926 (defvar gnus-nastygram-message
927 "The following article was inappropriately posted to %s.\n\n"
928 "Format string to insert in nastygrams.
929 The current group name will be inserted at \"%s\".")
931 (defun gnus-summary-mail-nastygram (n)
932 "Send a nastygram to the author of the current article."
934 (when (or gnus-expert-user
936 "Really send a nastygram to the author of the current article? "))
937 (let ((group gnus-newsgroup-name))
938 (gnus-summary-reply-with-original n)
939 (set-buffer gnus-message-buffer)
941 (insert (format gnus-nastygram-message group))
942 (message-send-and-exit))))
944 (defun gnus-summary-mail-crosspost-complaint (n)
945 "Send a complaint about crossposting to the current article(s)."
947 (let ((articles (gnus-summary-work-articles n))
949 (while (setq article (pop articles))
950 (set-buffer gnus-summary-buffer)
951 (gnus-summary-goto-subject article)
952 (let ((group (gnus-group-real-name gnus-newsgroup-name))
953 newsgroups followup-to)
954 (gnus-summary-select-article)
955 (set-buffer gnus-original-article-buffer)
956 (if (and (<= (length (message-tokenize-header
958 (mail-fetch-field "newsgroups"))
961 (or (not (setq followup-to (mail-fetch-field "followup-to")))
962 (not (member group (message-tokenize-header
963 followup-to ", ")))))
965 (gnus-message 1 "Followup-to restricted")
966 (gnus-message 1 "Not a crossposted article"))
967 (set-buffer gnus-summary-buffer)
968 (gnus-summary-reply-with-original 1)
969 (set-buffer gnus-message-buffer)
971 (insert (format gnus-crosspost-complaint newsgroups group))
972 (message-goto-subject)
973 (re-search-forward " *$")
974 (replace-match " (crosspost notification)" t t)
975 (gnus-deactivate-mark)
976 (when (gnus-y-or-n-p "Send this complaint? ")
977 (message-send-and-exit)))))))
979 (defun gnus-summary-mail-other-window ()
980 "Compose mail in other window."
982 (gnus-setup-message 'message
985 (defun gnus-mail-parse-comma-list ()
988 (skip-chars-forward " ")
991 (skip-chars-forward "^,")
996 (narrow-to-region beg (point))
999 (while (search-forward "\"" nil t)
1003 (skip-chars-forward ",")
1004 (skip-chars-forward "^,"))
1005 (skip-chars-backward " ")
1006 (push (buffer-substring beg (point))
1008 (skip-chars-forward "^,")
1009 (skip-chars-forward ", "))
1012 (defun gnus-inews-add-to-address (group)
1013 (let ((to-address (mail-fetch-field "to")))
1014 (when (and to-address
1016 ;; This mail group doesn't have a `to-list', so we add one
1018 (when (gnus-y-or-n-p
1019 (format "Do you want to add this as `to-list': %s " to-address))
1020 (gnus-group-add-parameter group (cons 'to-list to-address))))))
1022 (defun gnus-put-message ()
1023 "Put the current message in some group and return to Gnus."
1025 (let ((reply gnus-article-reply)
1026 (winconf gnus-prev-winconf)
1027 (group gnus-newsgroup-name))
1029 (not (gnus-group-read-only-p group)))
1030 (setq group (read-string "Put in group: " nil (gnus-writable-groups))))
1032 (when (gnus-gethash group gnus-newsrc-hashtb)
1033 (error "No such group: %s" group))
1037 (message-narrow-to-headers)
1038 (let ((gnus-deletable-headers nil))
1039 (message-generate-headers
1040 (if (message-news-p)
1041 message-required-news-headers
1042 message-required-mail-headers)))
1043 (goto-char (point-max))
1044 (insert "Gcc: " group "\n")
1047 (when (and (get-buffer gnus-group-buffer)
1048 (gnus-buffer-exists-p (car-safe reply))
1050 (set-buffer (car reply))
1051 (gnus-summary-mark-article-as-replied (cdr reply)))
1053 (set-window-configuration winconf))))
1055 (defun gnus-article-mail (yank)
1056 "Send a reply to the address near point.
1057 If YANK is non-nil, include the original article."
1061 (save-excursion (re-search-backward "[ \t\n]" nil t) (1+ (point)))
1062 (save-excursion (re-search-forward "[ \t\n]" nil t) (1- (point))))))
1064 (message-reply address)
1066 (gnus-inews-yank-articles (list (cdr gnus-article-current)))))))
1068 (defvar nntp-server-type)
1070 "Send a bug report to the Gnus maintainers."
1072 (unless (gnus-alive-p)
1073 (error "Gnus has been shut down"))
1074 (gnus-setup-message (if (message-mail-user-agent) 'message 'bug)
1075 (unless (message-mail-user-agent)
1076 (delete-other-windows)
1077 (when gnus-bug-create-help-buffer
1078 (switch-to-buffer "*Gnus Help Bug*")
1080 (insert gnus-bug-message)
1081 (goto-char (point-min)))
1082 (message-pop-to-buffer "*Gnus Bug*"))
1083 (let ((message-this-is-mail t))
1084 (message-setup `((To . ,gnus-maintainer) (Subject . ""))))
1085 (when gnus-bug-create-help-buffer
1086 (push `(gnus-bug-kill-buffer) message-send-actions))
1087 (goto-char (point-min))
1088 (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$"))
1090 (insert (gnus-version) "\n"
1091 (emacs-version) "\n")
1092 (when (and (boundp 'nntp-server-type)
1093 (stringp nntp-server-type))
1094 (insert nntp-server-type))
1095 (insert "\n\n\n\n\n")
1098 (set-buffer (gnus-get-buffer-create " *gnus environment info*"))
1101 (setq text (buffer-string)))
1102 (insert "<#part type=application/x-emacs-lisp disposition=inline description=\"User settings\">\n" text "\n<#/part>"))
1103 (goto-char (point-min))
1104 (search-forward "Subject: " nil t)
1107 (defun gnus-bug-kill-buffer ()
1108 (when (get-buffer "*Gnus Help Bug*")
1109 (kill-buffer "*Gnus Help Bug*")))
1111 (defun gnus-summary-yank-message (buffer n)
1112 "Yank the current article into a composed message."
1114 (list (completing-read "Buffer: " (mapcar 'list (message-buffers)) nil t)
1115 current-prefix-arg))
1116 (gnus-summary-iterate n
1117 (let ((gnus-display-mime-function nil)
1118 (gnus-inhibit-treatment t))
1119 (gnus-summary-select-article))
1122 (message-yank-buffer gnus-article-buffer))))
1124 (defun gnus-debug ()
1125 "Attempts to go through the Gnus source file and report what variables have been changed.
1126 The source file has to be in the Emacs load path."
1128 (let ((files '("gnus.el" "gnus-sum.el" "gnus-group.el"
1129 "gnus-art.el" "gnus-start.el" "gnus-async.el"
1130 "gnus-msg.el" "gnus-score.el" "gnus-win.el" "gnus-topic.el"
1131 "nnmail.el" "message.el"))
1133 file expr olist sym)
1134 (gnus-message 4 "Please wait while we snoop your variables...")
1136 ;; Go through all the files looking for non-default values for variables.
1138 (set-buffer (gnus-get-buffer-create " *gnus bug info*"))
1141 (when (and (setq file (locate-library (pop files)))
1142 (file-exists-p file))
1143 (insert-file-contents file)
1144 (goto-char (point-min))
1145 (if (not (re-search-forward "^;;* *Internal variables" nil t))
1146 (gnus-message 4 "Malformed sources in file %s" file)
1147 (narrow-to-region (point-min) (point))
1148 (goto-char (point-min))
1149 (while (setq expr (ignore-errors (read (current-buffer))))
1151 (and (or (eq (car expr) 'defvar)
1152 (eq (car expr) 'defcustom))
1153 (stringp (nth 3 expr))
1154 (or (not (boundp (nth 1 expr)))
1155 (not (equal (eval (nth 2 expr))
1156 (symbol-value (nth 1 expr)))))
1157 (push (nth 1 expr) olist)))))))
1158 (kill-buffer (current-buffer)))
1159 (when (setq olist (nreverse olist))
1160 (insert "------------------ Environment follows ------------------\n\n"))
1162 (if (boundp (car olist))
1164 (pp `(setq ,(car olist)
1165 ,(if (or (consp (setq sym (symbol-value (car olist))))
1167 (not (or (eq sym nil)
1169 (list 'quote (symbol-value (car olist)))
1170 (symbol-value (car olist))))
1173 (format "(setq %s 'whatever)\n" (car olist))))
1174 (insert ";; (makeunbound '" (symbol-name (car olist)) ")\n"))
1175 (setq olist (cdr olist)))
1177 ;; Remove any control chars - they seem to cause trouble for some
1178 ;; mailers. (Byte-compiled output from the stuff above.)
1180 (while (re-search-forward "[\000-\010\013-\037\200-\237]" nil t)
1181 (replace-match (format "\\%03o" (string-to-char (match-string 0)))
1184 ;;; Treatment of rejected articles.
1187 (defun gnus-summary-resend-bounced-mail (&optional fetch)
1188 "Re-mail the current message.
1189 This only makes sense if the current message is a bounce message than
1190 contains some mail you have written which has been bounced back to
1192 If FETCH, try to fetch the article that this is a reply to, if indeed
1195 (gnus-summary-select-article t)
1196 (set-buffer gnus-original-article-buffer)
1197 (gnus-setup-message 'compose-bounce
1198 (let* ((references (mail-fetch-field "references"))
1199 (parent (and references (gnus-parent-id references))))
1201 ;; If there are references, we fetch the article we answered to.
1203 (gnus-summary-refer-article parent)
1204 (gnus-summary-show-all-headers)))))
1208 (defun gnus-inews-group-method (group)
1210 ;; If the group doesn't exist, we assume
1211 ;; it's an archive group...
1212 ((and (null (gnus-get-info group))
1213 (eq (car (gnus-server-to-method gnus-message-archive-method))
1214 (car (gnus-server-to-method (gnus-group-method group)))))
1215 gnus-message-archive-method)
1217 ((gnus-info-method (gnus-get-info group))
1218 (gnus-info-method (gnus-get-info group)))
1220 (t (gnus-server-to-method (gnus-group-method group)))))
1222 ;; Do Gcc handling, which copied the message over to some group.
1223 (defun gnus-inews-do-gcc (&optional gcc)
1227 (message-narrow-to-headers)
1228 (let ((gcc (or gcc (mail-fetch-field "gcc" nil t)))
1229 (cur (current-buffer))
1230 groups group method group-art)
1232 (message-remove-header "gcc")
1234 (setq groups (message-unquote-tokens
1235 (message-tokenize-header gcc " ,")))
1236 ;; Copy the article over to some group(s).
1237 (while (setq group (pop groups))
1238 (unless (gnus-check-server
1239 (setq method (gnus-inews-group-method group)))
1240 (error "Can't open server %s" (if (stringp method) method
1242 (unless (gnus-request-group group nil method)
1243 (gnus-request-create-group group method))
1245 (nnheader-set-temp-buffer " *acc*")
1246 (insert-buffer-substring cur)
1247 (message-encode-message-body)
1249 (message-narrow-to-headers)
1250 (let* ((mail-parse-charset message-default-charset)
1251 (newsgroups-field (save-restriction
1252 (message-narrow-to-headers-or-head)
1253 (message-fetch-field "Newsgroups")))
1254 (followup-field (save-restriction
1255 (message-narrow-to-headers-or-head)
1256 (message-fetch-field "Followup-To")))
1257 ;; BUG: We really need to get the charset for
1258 ;; each name in the Newsgroups and Followup-To
1259 ;; lines to allow crossposting between group
1260 ;; namess with incompatible character sets.
1261 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2001-10-08.
1262 (group-field-charset
1263 (gnus-group-name-charset
1264 method (or newsgroups-field "")))
1265 (followup-field-charset
1266 (gnus-group-name-charset
1267 method (or followup-field "")))
1268 (rfc2047-header-encoding-alist
1270 (when group-field-charset
1271 (list (cons "Newsgroups" group-field-charset)))
1272 (when followup-field-charset
1273 (list (cons "Followup-To" followup-field-charset)))
1274 rfc2047-header-encoding-alist)))
1275 (mail-encode-encoded-word-buffer)))
1276 (goto-char (point-min))
1277 (when (re-search-forward
1278 (concat "^" (regexp-quote mail-header-separator) "$")
1280 (replace-match "" t t ))
1281 (unless (setq group-art
1282 (gnus-request-accept-article group method t t))
1283 (gnus-message 1 "Couldn't store article in group %s: %s"
1284 group (gnus-status-message method))
1286 (when (and group-art gnus-inews-mark-gcc-as-read)
1287 (gnus-group-mark-article-read group (cdr group-art)))
1288 (kill-buffer (current-buffer)))))))))
1290 (defun gnus-inews-insert-gcc ()
1291 "Insert Gcc headers based on `gnus-outgoing-message-group'."
1294 (message-narrow-to-headers)
1295 (let* ((group gnus-outgoing-message-group)
1297 ((gnus-functionp group)
1299 ((or (stringp group) (list group))
1303 (if (stringp gcc) gcc
1304 (mapconcat 'identity gcc " "))
1307 (defun gnus-inews-insert-archive-gcc (&optional group)
1308 "Insert the Gcc to say where the article is to be archived."
1309 (let* ((var gnus-message-archive-group)
1310 (group (or group gnus-newsgroup-name ""))
1312 (and gnus-newsgroup-name
1313 (not (equal gnus-newsgroup-name ""))
1314 (gnus-group-find-parameter
1315 gnus-newsgroup-name 'gcc-self)))
1319 ((null gnus-message-archive-method)
1323 ;; Just a single group.
1326 ;; We don't want this.
1328 ((and (listp var) (stringp (car var)))
1329 ;; A list of groups.
1331 ((gnus-functionp var)
1333 (funcall var group))
1335 ;; An alist of regexps/functions/forms.
1340 ((stringp (caar var))
1342 (when (string-match (caar var) group)
1344 ((gnus-functionp (car var))
1346 (funcall (car var) group))
1348 (eval (car var)))))))
1349 (setq var (cdr var)))
1352 (when (or groups gcc-self-val)
1353 (when (stringp groups)
1354 (setq groups (list groups)))
1357 (message-narrow-to-headers)
1358 (goto-char (point-max))
1361 ;; Use the `gcc-self' param value instead.
1364 (if (stringp gcc-self-val)
1367 (if (not (eq gcc-self-val 'none))
1372 ;; Use the list of groups.
1373 (while (setq name (pop groups))
1374 (insert (if (string-match ":" name)
1376 (gnus-group-prefixed-name
1377 name gnus-message-archive-method)))
1384 (defun gnus-configure-posting-styles ()
1385 "Configure posting styles according to `gnus-posting-styles'."
1386 (unless gnus-inhibit-posting-styles
1387 (let ((group (or gnus-newsgroup-name ""))
1388 (styles gnus-posting-styles)
1389 style match variable attribute value v results
1390 filep name address element)
1391 ;; If the group has a posting-style parameter, add it at the end with a
1392 ;; regexp matching everything, to be sure it takes precedence over all
1394 (when gnus-newsgroup-name
1395 (let ((tmp-style (gnus-group-find-parameter group 'posting-style t)))
1397 (setq styles (append styles (list (cons ".*" tmp-style)))))))
1398 ;; Go through all styles and look for matches.
1399 (dolist (style styles)
1400 (setq match (pop style))
1401 (goto-char (point-min))
1404 ;; Regexp string match on the group name.
1405 (string-match match group))
1407 (and (gnus-buffer-live-p gnus-article-copy)
1408 (with-current-buffer gnus-article-copy
1409 (let ((header (message-fetch-field (pop style))))
1411 (string-match (pop style) header))))))
1412 ((or (symbolp match)
1413 (gnus-functionp match))
1415 ((gnus-functionp match)
1416 ;; Function to be called.
1419 ;; Variable to be checked.
1420 (symbol-value match))))
1422 ;; This is a form to be evaled.
1424 ;; We have a match, so we set the variables.
1425 (dolist (attribute style)
1426 (setq element (pop attribute)
1431 ((eq (car attribute) :file)
1434 ((eq (car attribute) :value)
1438 ;; We get the value.
1443 ((or (symbolp value)
1444 (gnus-functionp value))
1445 (cond ((gnus-functionp value)
1448 (symbol-value value))))
1451 ;; Translate obsolescent value.
1452 (when (eq element 'signature-file)
1453 (setq element 'signature
1455 ;; Get the contents of file elems.
1457 (setq v (with-temp-buffer
1458 (insert-file-contents v)
1460 (setq results (delq (assoc element results) results))
1461 (push (cons element v) results))))
1462 ;; Now we have all the styles, so we insert them.
1463 (setq name (assq 'name results)
1464 address (assq 'address results))
1465 (setq results (delq name (delq address results)))
1466 (make-local-variable 'message-setup-hook)
1467 (dolist (result results)
1468 (add-hook 'message-setup-hook
1470 ((eq 'eval (car result))
1472 ((eq 'body (car result))
1476 (insert ,(cdr result)))))
1477 ((eq 'signature (car result))
1478 (set (make-local-variable 'message-signature) nil)
1479 (set (make-local-variable 'message-signature-file) nil)
1480 (if (not (cdr result))
1484 (let ((message-signature ,(cdr result)))
1485 (when message-signature
1486 (message-insert-signature)))))))
1489 (if (symbolp (car result))
1490 (capitalize (symbol-name (car result)))
1494 (message-remove-header ,header)
1495 (let ((value ,(cdr result)))
1498 (insert ,header ": " value "\n"))))))))))
1499 (when (or name address)
1500 (add-hook 'message-setup-hook
1502 (set (make-local-variable 'user-mail-address)
1503 ,(or (cdr address) user-mail-address))
1504 (let ((user-full-name ,(or (cdr name) (user-full-name)))
1506 ,(or (cdr address) user-mail-address)))
1508 (message-remove-header "From")
1510 (insert "From: " (message-make-from) "\n")))))))))
1512 ;;; Allow redefinition of functions.
1518 ;;; gnus-msg.el ends here