annotate lisp/gnus/gnus-msg.el @ 82966:28d9e552d178

Merge some changes from Emacs/trunk: 2004-08-22 Reiner Steib <Reiner.Steib@gmx.de> * gnus-mlspl.el (gnus-group-split-update): Fix docstring. 2004-08-22 Stefan Monnier <monnier@iro.umontreal.ca> * gnus-art.el: Use inhibit-read-only instead of buffer-read-only. (gnus-narrow-to-page): Don't assume point-min == 1. (gnus-article-edit-mode): Derive from message-mode. * gnus-score.el (gnus-score-find-bnews): Simplify and don't assume point-min == 1. * imap.el (imap-parse-address-list, imap-parse-body-ext): Disable incorrect use of `assert'. [Emacs/trunk 2004-03-22] * message.el (message-mode): Set comment-start-skip. [Emacs/trunk 2004-03-04] 2004-08-22 Sam Steingold <sds@gnu.org> * pop3.el (pop3-leave-mail-on-server): New user variable. (pop3-movemail): Delete mail only when it is nil. [Emacs/trunk 2003-06-11]
author Reiner Steib <Reiner.Steib@gmx.de>
date Sun, 22 Aug 2004 19:35:29 +0000
parents 0fde48feb604
children 590114f9753d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1 ;;; gnus-msg.el --- mail and post interface for Gnus
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
2 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
3 ;; Free Software Foundation, Inc.
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
4
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
5 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
6 ;; Lars Magne Ingebrigtsen <larsi@gnus.org>
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
7 ;; Keywords: news
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
8
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
10
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
14 ;; any later version.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
15
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
19 ;; GNU General Public License for more details.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
20
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
24 ;; Boston, MA 02111-1307, USA.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
25
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
26 ;;; Commentary:
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
27
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
28 ;;; Code:
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
29
19531
f5b98be7c142 Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents: 17493
diff changeset
30 (eval-when-compile (require 'cl))
f5b98be7c142 Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents: 17493
diff changeset
31
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
32 (require 'gnus)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
33 (require 'gnus-ems)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
34 (require 'message)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
35 (require 'gnus-art)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
36 (require 'gnus-util)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
37
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
38 (defcustom gnus-post-method 'current
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
39 "*Preferred method for posting USENET news.
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
40
43365
bcde2eb5438e * gnus-msg.el (gnus-post-method): Fix doc.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 40387
diff changeset
41 If this variable is `current' (which is the default), Gnus will use
bcde2eb5438e * gnus-msg.el (gnus-post-method): Fix doc.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 40387
diff changeset
42 the \"current\" select method when posting. If it is `native', Gnus
bcde2eb5438e * gnus-msg.el (gnus-post-method): Fix doc.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 40387
diff changeset
43 will use the native select method when posting.
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
44
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
45 This method will not be used in mail groups and the like, only in
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
46 \"real\" newsgroups.
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
47
43365
bcde2eb5438e * gnus-msg.el (gnus-post-method): Fix doc.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 40387
diff changeset
48 If not `native' nor `current', the value must be a valid method as discussed
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
49 in the documentation of `gnus-select-method'. It can also be a list of
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
50 methods. If that is the case, the user will be queried for what select
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
51 method to use when posting."
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
52 :group 'gnus-group-foreign
43365
bcde2eb5438e * gnus-msg.el (gnus-post-method): Fix doc.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 40387
diff changeset
53 :link '(custom-manual "(gnus)Posting Server")
bcde2eb5438e * gnus-msg.el (gnus-post-method): Fix doc.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 40387
diff changeset
54 :type `(choice (const native)
bcde2eb5438e * gnus-msg.el (gnus-post-method): Fix doc.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 40387
diff changeset
55 (const current)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
56 (sexp :tag "Methods" ,gnus-select-method)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
57
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
58 (defcustom gnus-outgoing-message-group nil
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
59 "*All outgoing messages will be put in this group.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
60 If you want to store all your outgoing mail and articles in the group
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
61 \"nnml:archive\", you set this variable to that value. This variable
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
62 can also be a list of group names.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
63
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
64 If you want to have greater control over what group to put each
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
65 message in, you can set this variable to a function that checks the
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
66 current newsgroup name and then returns a suitable group name (or list
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
67 of names)."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
68 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
69 :type '(choice (string :tag "Group")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
70 (function)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
71
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
72 (defcustom gnus-mailing-list-groups nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
73 "*If non-nil a regexp matching groups that are really mailing lists.
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
74 This is useful when you're reading a mailing list that has been
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
75 gatewayed to a newsgroup, and you want to followup to an article in
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
76 the group."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
77 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
78 :type '(choice (regexp)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
79 (const nil)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
80
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
81 (defcustom gnus-add-to-list nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
82 "*If non-nil, add a `to-list' parameter automatically."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
83 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
84 :type 'boolean)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
85
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
86 (defcustom gnus-crosspost-complaint
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
87 "Hi,
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
88
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
89 You posted the article below with the following Newsgroups header:
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
90
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
91 Newsgroups: %s
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
92
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
93 The %s group, at least, was an inappropriate recipient
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
94 of this message. Please trim your Newsgroups header to exclude this
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
95 group before posting in the future.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
96
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
97 Thank you.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
98
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
99 "
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
100 "Format string to be inserted when complaining about crossposts.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
101 The first %s will be replaced by the Newsgroups header;
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
102 the second with the current group name."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
103 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
104 :type 'string)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
105
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
106 (defcustom gnus-message-setup-hook nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
107 "Hook run after setting up a message buffer."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
108 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
109 :type 'hook)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
110
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
111 (defcustom gnus-bug-create-help-buffer t
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
112 "*Should we create the *Gnus Help Bug* buffer?"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
113 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
114 :type 'boolean)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
115
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
116 (defcustom gnus-posting-styles nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
117 "*Alist of styles to use when posting.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
118 See Info node `(gnus)Posting Styles'."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
119 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
120 :link '(custom-manual "(gnus)Posting Styles")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
121 :type '(repeat (cons (choice (regexp)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
122 (variable)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
123 (list (const header)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
124 (string :tag "Header")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
125 (regexp :tag "Regexp"))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
126 (function)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
127 (sexp))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
128 (repeat (list
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
129 (choice (const signature)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
130 (const signature-file)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
131 (const organization)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
132 (const address)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
133 (const x-face-file)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
134 (const name)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
135 (const body)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
136 (symbol)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
137 (string :tag "Header"))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
138 (choice (string)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
139 (function)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
140 (variable)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
141 (sexp)))))))
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
142
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
143 (defcustom gnus-gcc-mark-as-read nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
144 "If non-nil, automatically mark Gcc articles as read."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
145 :version "21.1"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
146 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
147 :type 'boolean)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
148
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
149 (make-obsolete-variable 'gnus-inews-mark-gcc-as-read
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
150 'gnus-gcc-mark-as-read)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
151
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
152 (defcustom gnus-gcc-externalize-attachments nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
153 "Should local-file attachments be included as external parts in Gcc copies?
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
154 If it is `all', attach files as external parts;
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
155 if a regexp and matches the Gcc group name, attach files as external parts;
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
156 if nil, attach files as normal parts."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
157 :version "21.1"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
158 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
159 :type '(choice (const nil :tag "None")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
160 (const all :tag "Any")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
161 (string :tag "Regexp")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
162
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
163 (gnus-define-group-parameter
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
164 posting-charset-alist
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
165 :type list
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
166 :function-document
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
167 "Return the permitted unencoded charsets for posting of GROUP."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
168 :variable gnus-group-posting-charset-alist
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
169 :variable-default
34192
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
170 '(("^\\(no\\|fr\\)\\.[^,]*\\(,[ \t\n]*\\(no\\|fr\\)\\.[^,]*\\)*$" iso-8859-1 (iso-8859-1))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
171 ("^\\(fido7\\|relcom\\)\\.[^,]*\\(,[ \t\n]*\\(fido7\\|relcom\\)\\.[^,]*\\)*$" koi8-r (koi8-r))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
172 (message-this-is-mail nil nil)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
173 (message-this-is-news nil t))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
174 :variable-document
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
175 "Alist of regexps and permitted unencoded charsets for posting.
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
176 Each element of the alist has the form (TEST HEADER BODY-LIST), where
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
177 TEST is either a regular expression matching the newsgroup header or a
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
178 variable to query,
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
179 HEADER is the charset which may be left unencoded in the header (nil
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
180 means encode all charsets),
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
181 BODY-LIST is a list of charsets which may be encoded using 8bit
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
182 content-transfer encoding in the body, or one of the special values
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
183 nil (always encode using quoted-printable) or t (always use 8bit).
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
184
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
185 Note that any value other than nil for HEADER infringes some RFCs, so
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
186 use this option with care."
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
187 :variable-group gnus-charset
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
188 :variable-type
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
189 '(repeat (list :tag "Permitted unencoded charsets"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
190 (choice :tag "Where"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
191 (regexp :tag "Group")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
192 (const :tag "Mail message" :value message-this-is-mail)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
193 (const :tag "News article" :value message-this-is-news))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
194 (choice :tag "Header"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
195 (const :tag "None" nil)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
196 (symbol :tag "Charset"))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
197 (choice :tag "Body"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
198 (const :tag "Any" :value t)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
199 (const :tag "None" :value nil)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
200 (repeat :tag "Charsets"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
201 (symbol :tag "Charset")))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
202 :parameter-type '(choice :tag "Permitted unencoded charsets"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
203 :value nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
204 (repeat (symbol)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
205 :parameter-document "\
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
206 List of charsets that are permitted to be unencoded.")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
207
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
208 (defcustom gnus-debug-files
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
209 '("gnus.el" "gnus-sum.el" "gnus-group.el"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
210 "gnus-art.el" "gnus-start.el" "gnus-async.el"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
211 "gnus-msg.el" "gnus-score.el" "gnus-win.el" "gnus-topic.el"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
212 "gnus-agent.el" "gnus-cache.el" "gnus-srvr.el"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
213 "mm-util.el" "mm-decode.el" "nnmail.el" "message.el")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
214 "Files whose variables will be reported in `gnus-bug'."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
215 :version "21.1"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
216 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
217 :type '(repeat (string :tag "File")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
218
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
219 (defcustom gnus-debug-exclude-variables
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
220 '(mm-mime-mule-charset-alist
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
221 nnmail-split-fancy message-minibuffer-local-map)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
222 "Variables that should not be reported in `gnus-bug'."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
223 :version "21.1"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
224 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
225 :type '(repeat (symbol :tag "Variable")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
226
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
227 (defcustom gnus-discouraged-post-methods
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
228 '(nndraft nnml nnimap nnmaildir nnmh nnfolder nndir)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
229 "A list of back ends that are not used in \"real\" newsgroups.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
230 This variable is used only when `gnus-post-method' is `current'."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
231 :version "21.3"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
232 :group 'gnus-group-foreign
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
233 :type '(repeat (symbol :tag "Back end")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
234
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
235 (defcustom gnus-message-replysign
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
236 nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
237 "Automatically sign replies to signed messages.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
238 See also the `mml-default-sign-method' variable."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
239 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
240 :type 'boolean)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
241
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
242 (defcustom gnus-message-replyencrypt
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
243 nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
244 "Automatically encrypt replies to encrypted messages.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
245 See also the `mml-default-encrypt-method' variable."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
246 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
247 :type 'boolean)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
248
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
249 (defcustom gnus-message-replysignencrypted
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
250 t
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
251 "Setting this causes automatically encrypted messages to also be signed."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
252 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
253 :type 'boolean)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
254
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
255 (defcustom gnus-confirm-mail-reply-to-news nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
256 "If non-nil, Gnus requests confirmation when replying to news.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
257 This is done because new users often reply by mistake when reading
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
258 news.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
259 This can also be a function receiving the group name as the only
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
260 parameter which should return non-nil iff a confirmation is needed, or
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
261 a regexp, in which case a confirmation is asked for iff the group name
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
262 matches the regexp."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
263 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
264 :type '(choice (const :tag "No" nil)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
265 (const :tag "Yes" t)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
266 (regexp :tag "Iff group matches regexp")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
267 (function :tag "Iff function evaluates to non-nil")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
268
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
269 (defcustom gnus-confirm-treat-mail-like-news
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
270 nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
271 "If non-nil, Gnus will treat mail like news with regard to confirmation
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
272 when replying by mail. See the `gnus-confirm-mail-reply-to-news' variable
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
273 for fine-tuning this.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
274 If nil, Gnus will never ask for confirmation if replying to mail."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
275 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
276 :type 'boolean)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
277
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
278 (defcustom gnus-summary-resend-default-address t
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
279 "If non-nil, Gnus tries to suggest a default address to resend to.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
280 If nil, the address field will always be empty after invoking
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
281 `gnus-summary-resend-message'."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
282 :group 'gnus-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
283 :type 'boolean)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
284
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
285 ;;; Internal variables.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
286
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
287 (defvar gnus-inhibit-posting-styles nil
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
288 "Inhibit the use of posting styles.")
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
289
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
290 (defvar gnus-article-yanked-articles nil)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
291 (defvar gnus-message-buffer "*Mail Gnus*")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
292 (defvar gnus-article-copy nil)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
293 (defvar gnus-check-before-posting nil)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
294 (defvar gnus-last-posting-server nil)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
295 (defvar gnus-message-group-art nil)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
296
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
297 (defvar gnus-msg-force-broken-reply-to nil)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
298
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
299 (defconst gnus-bug-message
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
300 "Sending a bug report to the Gnus Towers.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
301 ========================================
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
302
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
303 The buffer below is a mail buffer. When you press `C-c C-c', it will
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
304 be sent to the Gnus Bug Exterminators.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
305
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
306 The thing near the bottom of the buffer is how the environment
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
307 settings will be included in the mail. Please do not delete that.
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
308 They will tell the Bug People what your environment is, so that it
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
309 will be easier to locate the bugs.
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
310
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
311 If you have found a bug that makes Emacs go \"beep\", set
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
312 debug-on-error to t (`M-x set-variable RET debug-on-error RET t RET')
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
313 and include the backtrace in your bug report.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
314
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
315 Please describe the bug in annoying, painstaking detail.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
316
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
317 Thank you for your help in stamping out bugs.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
318 ")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
319
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
320 (eval-and-compile
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
321 (autoload 'gnus-uu-post-news "gnus-uu" nil t)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
322 (autoload 'news-setup "rnewspost")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
323 (autoload 'news-reply-mode "rnewspost")
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
324 (autoload 'rmail-dont-reply-to "mail-utils")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
325 (autoload 'rmail-output "rmailout"))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
326
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
327
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
328 ;;;
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
329 ;;; Gnus Posting Functions
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
330 ;;;
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
331
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
332 (gnus-define-keys (gnus-summary-send-map "S" gnus-summary-mode-map)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
333 "p" gnus-summary-post-news
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
334 "i" gnus-summary-news-other-window
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
335 "f" gnus-summary-followup
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
336 "F" gnus-summary-followup-with-original
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
337 "c" gnus-summary-cancel-article
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
338 "s" gnus-summary-supersede-article
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
339 "r" gnus-summary-reply
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
340 "y" gnus-summary-yank-message
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
341 "R" gnus-summary-reply-with-original
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
342 "w" gnus-summary-wide-reply
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
343 "W" gnus-summary-wide-reply-with-original
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
344 "v" gnus-summary-very-wide-reply
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
345 "V" gnus-summary-very-wide-reply-with-original
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
346 "n" gnus-summary-followup-to-mail
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
347 "N" gnus-summary-followup-to-mail-with-original
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
348 "m" gnus-summary-mail-other-window
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
349 "u" gnus-uu-post-news
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
350 "\M-c" gnus-summary-mail-crosspost-complaint
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
351 "Br" gnus-summary-reply-broken-reply-to
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
352 "BR" gnus-summary-reply-broken-reply-to-with-original
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
353 "om" gnus-summary-mail-forward
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
354 "op" gnus-summary-post-forward
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
355 "Om" gnus-uu-digest-mail-forward
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
356 "Op" gnus-uu-digest-post-forward)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
357
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
358 (gnus-define-keys (gnus-send-bounce-map "D" gnus-summary-send-map)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
359 "b" gnus-summary-resend-bounced-mail
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
360 ;; "c" gnus-summary-send-draft
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
361 "r" gnus-summary-resend-message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
362 "e" gnus-summary-resend-message-edit)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
363
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
364 ;;; Internal functions.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
365
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
366 (defun gnus-inews-make-draft ()
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
367 `(lambda ()
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
368 (gnus-inews-make-draft-meta-information
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
369 ,gnus-newsgroup-name ',gnus-article-reply)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
370
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
371 (defvar gnus-article-reply nil)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
372 (defmacro gnus-setup-message (config &rest forms)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
373 (let ((winconf (make-symbol "gnus-setup-message-winconf"))
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
374 (buffer (make-symbol "gnus-setup-message-buffer"))
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
375 (article (make-symbol "gnus-setup-message-article"))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
376 (yanked (make-symbol "gnus-setup-yanked-articles"))
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
377 (group (make-symbol "gnus-setup-message-group")))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
378 `(let ((,winconf (current-window-configuration))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
379 (,buffer (buffer-name (current-buffer)))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
380 (,article gnus-article-reply)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
381 (,yanked gnus-article-yanked-articles)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
382 (,group gnus-newsgroup-name)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
383 (message-header-setup-hook
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
384 (copy-sequence message-header-setup-hook))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
385 (mbl mml-buffer-list)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
386 (message-mode-hook (copy-sequence message-mode-hook)))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
387 (setq mml-buffer-list nil)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
388 (add-hook 'message-header-setup-hook 'gnus-inews-insert-gcc)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
389 (add-hook 'message-header-setup-hook 'gnus-inews-insert-archive-gcc)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
390 ;; #### FIXME: for a reason that I did not manage to identify yet,
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
391 ;; the variable `gnus-newsgroup-name' does not honor a dynamically
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
392 ;; scoped or setq'ed value from a caller like `C-u gnus-summary-mail'.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
393 ;; After evaluation of @forms below, it gets the value we actually want
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
394 ;; to override, and the posting styles are used. For that reason, I've
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
395 ;; added an optional argument to `gnus-configure-posting-styles' to
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
396 ;; make sure that the correct value for the group name is used. -- drv
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
397 (add-hook 'message-mode-hook
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
398 (lambda ()
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
399 (gnus-configure-posting-styles ,group)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
400 (gnus-pull ',(intern gnus-draft-meta-information-header)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
401 message-required-headers)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
402 (when (and ,group
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
403 (not (string= ,group "")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
404 (push (cons
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
405 (intern gnus-draft-meta-information-header)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
406 (gnus-inews-make-draft))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
407 message-required-headers))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
408 (unwind-protect
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
409 (progn
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
410 ,@forms)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
411 (gnus-inews-add-send-actions ,winconf ,buffer ,article ,config
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
412 ,yanked)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
413 (setq gnus-message-buffer (current-buffer))
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
414 (set (make-local-variable 'gnus-message-group-art)
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
415 (cons ,group ,article))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
416 (set (make-local-variable 'gnus-newsgroup-name) ,group)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
417 (gnus-run-hooks 'gnus-message-setup-hook)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
418 (if (eq major-mode 'message-mode)
34192
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
419 (let ((mbl1 mml-buffer-list))
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
420 (setq mml-buffer-list mbl) ;; Global value
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
421 (set (make-local-variable 'mml-buffer-list) mbl1);; Local value
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
422 (gnus-make-local-hook 'kill-buffer-hook)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
423 (gnus-make-local-hook 'change-major-mode-hook)
40387
8421000daff7 (gnus-setup-message): Setup reaper for MML buffers.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 34797
diff changeset
424 (add-hook 'change-major-mode-hook 'mml-destroy-buffers nil t)
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
425 (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
426 (mml-destroy-buffers)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
427 (setq mml-buffer-list mbl)))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
428 (message-hide-headers)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
429 (gnus-add-buffer)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
430 (gnus-configure-windows ,config t)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
431 (run-hooks 'post-command-hook)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
432 (set-buffer-modified-p nil))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
433
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
434 (defun gnus-inews-make-draft-meta-information (group article)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
435 (concat "(\"" group "\" "
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
436 (if article (number-to-string
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
437 (if (listp article)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
438 (car article)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
439 article)) "\"\"")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
440 ")"))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
441
34192
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
442 ;;;###autoload
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
443 (defun gnus-msg-mail (&optional to subject other-headers continue
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
444 switch-action yank-action send-actions)
34192
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
445 "Start editing a mail message to be sent.
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
446 Like `message-mail', but with Gnus paraphernalia, particularly the
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
447 Gcc: header for archiving purposes."
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
448 (interactive)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
449 (let ((buf (current-buffer))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
450 mail-buf)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
451 (gnus-setup-message 'message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
452 (message-mail to subject other-headers continue
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
453 nil yank-action send-actions))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
454 (when switch-action
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
455 (setq mail-buf (current-buffer))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
456 (switch-to-buffer buf)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
457 (apply switch-action mail-buf nil)))
34192
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
458 ;; COMPOSEFUNC should return t if succeed. Undocumented ???
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
459 t)
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
460
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
461 (defvar save-selected-window-window)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
462
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
463 ;;;###autoload
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
464 (defun gnus-button-mailto (address)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
465 "Mail to ADDRESS."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
466 (set-buffer (gnus-copy-article-buffer))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
467 (gnus-setup-message 'message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
468 (message-reply address))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
469 (and (boundp 'save-selected-window-window)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
470 (not (window-live-p save-selected-window-window))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
471 (setq save-selected-window-window (selected-window))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
472
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
473 ;;;###autoload
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
474 (defun gnus-button-reply (&optional to-address wide)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
475 "Like `message-reply'."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
476 (interactive)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
477 (gnus-setup-message 'message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
478 (message-reply to-address wide))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
479 (and (boundp 'save-selected-window-window)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
480 (not (window-live-p save-selected-window-window))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
481 (setq save-selected-window-window (selected-window))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
482
34192
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
483 ;;;###autoload
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
484 (define-mail-user-agent 'gnus-user-agent
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
485 'gnus-msg-mail 'message-send-and-exit
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
486 'message-kill-buffer 'message-send-hook)
34192
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
487
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
488 (defun gnus-setup-posting-charset (group)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
489 (let ((alist gnus-group-posting-charset-alist)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
490 (group (or group ""))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
491 elem)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
492 (when group
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
493 (catch 'found
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
494 (while (setq elem (pop alist))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
495 (when (or (and (stringp (car elem))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
496 (string-match (car elem) group))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
497 (and (functionp (car elem))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
498 (funcall (car elem) group))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
499 (and (symbolp (car elem))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
500 (symbol-value (car elem))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
501 (throw 'found (cons (cadr elem) (caddr elem)))))))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
502
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
503 (defun gnus-inews-add-send-actions (winconf buffer article
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
504 &optional config yanked)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
505 (gnus-make-local-hook 'message-sent-hook)
33271
9b3030bf32fc 2000-11-06 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31785
diff changeset
506 (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc
9b3030bf32fc 2000-11-06 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31785
diff changeset
507 'gnus-inews-do-gcc) nil t)
9b3030bf32fc 2000-11-06 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31785
diff changeset
508 (when gnus-agent
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
509 (gnus-make-local-hook 'message-header-hook)
33271
9b3030bf32fc 2000-11-06 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31785
diff changeset
510 (add-hook 'message-header-hook 'gnus-agent-possibly-save-gcc nil t))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
511 (setq message-post-method
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
512 `(lambda (arg)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
513 (gnus-post-method arg ,gnus-newsgroup-name)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
514 (setq message-newsreader (setq message-mailer (gnus-extended-version)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
515 (message-add-action
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
516 `(when (gnus-buffer-exists-p ,buffer)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
517 (set-window-configuration ,winconf))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
518 'exit 'postpone 'kill)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
519 (let ((to-be-marked (cond
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
520 (yanked
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
521 (mapcar
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
522 (lambda (x) (if (listp x) (car x) x)) yanked))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
523 (article (if (listp article) article (list article)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
524 (t nil))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
525 (message-add-action
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
526 `(when (gnus-buffer-exists-p ,buffer)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
527 (save-excursion
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
528 (set-buffer ,buffer)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
529 ,(when to-be-marked
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
530 (if (eq config 'forward)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
531 `(gnus-summary-mark-article-as-forwarded ',to-be-marked)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
532 `(gnus-summary-mark-article-as-replied ',to-be-marked)))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
533 'send)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
534
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
535 (put 'gnus-setup-message 'lisp-indent-function 1)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
536 (put 'gnus-setup-message 'edebug-form-spec '(form body))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
537
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
538 ;;; Post news commands of Gnus group mode and summary mode
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
539
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
540 (defun gnus-group-mail (&optional arg)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
541 "Start composing a mail.
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
542 If ARG, use the group under the point to find a posting style.
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
543 If ARG is 1, prompt for a group name to find the posting style."
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
544 (interactive "P")
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
545 ;; We can't `let' gnus-newsgroup-name here, since that leads
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
546 ;; to local variables leaking.
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
547 (let ((group gnus-newsgroup-name)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
548 ;; make sure last viewed article doesn't affect posting styles:
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
549 (gnus-article-copy)
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
550 (buffer (current-buffer)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
551 (unwind-protect
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
552 (progn
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
553 (setq gnus-newsgroup-name
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
554 (if arg
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
555 (if (= 1 (prefix-numeric-value arg))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
556 (completing-read "Use posting style of group: "
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
557 gnus-active-hashtb nil
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
558 (gnus-read-active-file-p))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
559 (gnus-group-group-name))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
560 ""))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
561 ;; #### see comment in gnus-setup-message -- drv
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
562 (gnus-setup-message 'message (message-mail)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
563 (save-excursion
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
564 (set-buffer buffer)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
565 (setq gnus-newsgroup-name group)))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
566
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
567 (defun gnus-group-news (&optional arg)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
568 "Start composing a news.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
569 If ARG, post to group under point.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
570 If ARG is 1, prompt for group name to post to.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
571
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
572 This function prepares a news even when using mail groups. This is useful
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
573 for posting messages to mail groups without actually sending them over the
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
574 network. The corresponding back end must have a 'request-post method."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
575 (interactive "P")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
576 ;; We can't `let' gnus-newsgroup-name here, since that leads
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
577 ;; to local variables leaking.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
578 (let ((group gnus-newsgroup-name)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
579 ;; make sure last viewed article doesn't affect posting styles:
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
580 (gnus-article-copy)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
581 (buffer (current-buffer)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
582 (unwind-protect
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
583 (progn
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
584 (setq gnus-newsgroup-name
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
585 (if arg
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
586 (if (= 1 (prefix-numeric-value arg))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
587 (completing-read "Use group: "
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
588 gnus-active-hashtb nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
589 (gnus-read-active-file-p))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
590 (gnus-group-group-name))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
591 ""))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
592 ;; #### see comment in gnus-setup-message -- drv
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
593 (gnus-setup-message 'message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
594 (message-news (gnus-group-real-name gnus-newsgroup-name))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
595 (save-excursion
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
596 (set-buffer buffer)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
597 (setq gnus-newsgroup-name group)))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
598
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
599 (defun gnus-group-post-news (&optional arg)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
600 "Start composing a message (a news by default).
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
601 If ARG, post to group under point. If ARG is 1, prompt for group name.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
602 Depending on the selected group, the message might be either a mail or
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
603 a news."
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
604 (interactive "P")
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
605 ;; Bind this variable here to make message mode hooks work ok.
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
606 (let ((gnus-newsgroup-name
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
607 (if arg
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
608 (if (= 1 (prefix-numeric-value arg))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
609 (completing-read "Newsgroup: " gnus-active-hashtb nil
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
610 (gnus-read-active-file-p))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
611 (gnus-group-group-name))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
612 ""))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
613 ;; make sure last viewed article doesn't affect posting styles:
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
614 (gnus-article-copy))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
615 (gnus-post-news 'post gnus-newsgroup-name nil nil nil nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
616 (string= gnus-newsgroup-name ""))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
617
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
618 (defun gnus-summary-mail-other-window (&optional arg)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
619 "Start composing a mail in another window.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
620 Use the posting of the current group by default.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
621 If ARG, don't do that. If ARG is 1, prompt for group name to find the
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
622 posting style."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
623 (interactive "P")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
624 ;; We can't `let' gnus-newsgroup-name here, since that leads
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
625 ;; to local variables leaking.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
626 (let ((group gnus-newsgroup-name)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
627 ;; make sure last viewed article doesn't affect posting styles:
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
628 (gnus-article-copy)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
629 (buffer (current-buffer)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
630 (unwind-protect
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
631 (progn
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
632 (setq gnus-newsgroup-name
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
633 (if arg
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
634 (if (= 1 (prefix-numeric-value arg))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
635 (completing-read "Use group: "
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
636 gnus-active-hashtb nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
637 (gnus-read-active-file-p))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
638 "")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
639 gnus-newsgroup-name))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
640 ;; #### see comment in gnus-setup-message -- drv
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
641 (gnus-setup-message 'message (message-mail)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
642 (save-excursion
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
643 (set-buffer buffer)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
644 (setq gnus-newsgroup-name group)))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
645
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
646 (defun gnus-summary-news-other-window (&optional arg)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
647 "Start composing a news in another window.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
648 Post to the current group by default.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
649 If ARG, don't do that. If ARG is 1, prompt for group name to post to.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
650
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
651 This function prepares a news even when using mail groups. This is useful
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
652 for posting messages to mail groups without actually sending them over the
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
653 network. The corresponding back end must have a 'request-post method."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
654 (interactive "P")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
655 ;; We can't `let' gnus-newsgroup-name here, since that leads
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
656 ;; to local variables leaking.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
657 (let ((group gnus-newsgroup-name)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
658 ;; make sure last viewed article doesn't affect posting styles:
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
659 (gnus-article-copy)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
660 (buffer (current-buffer)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
661 (unwind-protect
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
662 (progn
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
663 (setq gnus-newsgroup-name
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
664 (if arg
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
665 (if (= 1 (prefix-numeric-value arg))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
666 (completing-read "Use group: "
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
667 gnus-active-hashtb nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
668 (gnus-read-active-file-p))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
669 "")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
670 gnus-newsgroup-name))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
671 ;; #### see comment in gnus-setup-message -- drv
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
672 (gnus-setup-message 'message
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
673 (progn
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
674 (message-news (gnus-group-real-name gnus-newsgroup-name))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
675 (set (make-local-variable 'gnus-discouraged-post-methods)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
676 (delq
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
677 (car (gnus-find-method-for-group gnus-newsgroup-name))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
678 (copy-sequence gnus-discouraged-post-methods))))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
679 (save-excursion
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
680 (set-buffer buffer)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
681 (setq gnus-newsgroup-name group)))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
682
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
683 (defun gnus-summary-post-news (&optional arg)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
684 "Start composing a message. Post to the current group by default.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
685 If ARG, don't do that. If ARG is 1, prompt for a group name to post to.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
686 Depending on the selected group, the message might be either a mail or
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
687 a news."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
688 (interactive "P")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
689 ;; Bind this variable here to make message mode hooks work ok.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
690 (let ((gnus-newsgroup-name
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
691 (if arg
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
692 (if (= 1 (prefix-numeric-value arg))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
693 (completing-read "Newsgroup: " gnus-active-hashtb nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
694 (gnus-read-active-file-p))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
695 "")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
696 gnus-newsgroup-name))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
697 ;; make sure last viewed article doesn't affect posting styles:
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
698 (gnus-article-copy))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
699 (gnus-post-news 'post gnus-newsgroup-name)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
700
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
701
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
702 (defun gnus-summary-followup (yank &optional force-news)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
703 "Compose a followup to an article.
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
704 If prefix argument YANK is non-nil, the original article is yanked
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
705 automatically.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
706 YANK is a list of elements, where the car of each element is the
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
707 article number, and the cdr is the string to be yanked."
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
708 (interactive
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
709 (list (and current-prefix-arg
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
710 (gnus-summary-work-articles 1))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
711 (when yank
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
712 (gnus-summary-goto-subject
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
713 (if (listp (car yank))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
714 (caar yank)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
715 (car yank))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
716 (save-window-excursion
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
717 (gnus-summary-select-article))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
718 (let ((headers (gnus-summary-article-header (gnus-summary-article-number)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
719 (gnus-newsgroup-name gnus-newsgroup-name))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
720 ;; Send a followup.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
721 (gnus-post-news nil gnus-newsgroup-name
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
722 headers gnus-article-buffer
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
723 yank nil force-news)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
724 (gnus-summary-handle-replysign)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
725
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
726 (defun gnus-summary-followup-with-original (n &optional force-news)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
727 "Compose a followup to an article and include the original article.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
728 The text in the region will be yanked. If the region isn't
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
729 active, the entire article will be yanked."
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
730 (interactive "P")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
731 (gnus-summary-followup (gnus-summary-work-articles n) force-news))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
732
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
733 (defun gnus-summary-followup-to-mail (&optional arg)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
734 "Followup to the current mail message via news."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
735 (interactive
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
736 (list (and current-prefix-arg
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
737 (gnus-summary-work-articles 1))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
738 (gnus-summary-followup arg t))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
739
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
740 (defun gnus-summary-followup-to-mail-with-original (&optional arg)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
741 "Followup to the current mail message via news."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
742 (interactive "P")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
743 (gnus-summary-followup (gnus-summary-work-articles arg) t))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
744
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
745 (defun gnus-inews-yank-articles (articles)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
746 (let (beg article yank-string)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
747 (message-goto-body)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
748 (while (setq article (pop articles))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
749 (when (listp article)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
750 (setq yank-string (nth 1 article)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
751 article (nth 0 article)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
752 (save-window-excursion
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
753 (set-buffer gnus-summary-buffer)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
754 (gnus-summary-select-article nil nil nil article)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
755 (gnus-summary-remove-process-mark article))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
756 (gnus-copy-article-buffer nil yank-string)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
757 (let ((message-reply-buffer gnus-article-copy)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
758 (message-reply-headers
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
759 ;; The headers are decoded.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
760 (with-current-buffer gnus-article-copy
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
761 (save-restriction
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
762 (nnheader-narrow-to-headers)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
763 (nnheader-parse-naked-head)))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
764 (message-yank-original)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
765 (setq beg (or beg (mark t))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
766 (when articles
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
767 (insert "\n")))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
768 (push-mark)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
769 (goto-char beg)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
770
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
771 (defun gnus-summary-cancel-article (&optional n symp)
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
772 "Cancel an article you posted.
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
773 Uses the process-prefix convention. If given the symbolic
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
774 prefix `a', cancel using the standard posting method; if not
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
775 post using the current select method."
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
776 (interactive (gnus-interactive "P\ny"))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
777 (let ((articles (gnus-summary-work-articles n))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
778 (message-post-method
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
779 `(lambda (arg)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
780 (gnus-post-method (eq ',symp 'a) ,gnus-newsgroup-name)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
781 article)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
782 (while (setq article (pop articles))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
783 (when (gnus-summary-select-article t nil nil article)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
784 (when (gnus-eval-in-buffer-window gnus-original-article-buffer
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
785 (message-cancel-news))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
786 (gnus-summary-mark-as-read article gnus-canceled-mark)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
787 (gnus-cache-remove-article 1))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
788 (gnus-article-hide-headers-if-wanted))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
789 (gnus-summary-remove-process-mark article))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
790
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
791 (defun gnus-summary-supersede-article ()
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
792 "Compose an article that will supersede a previous article.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
793 This is done simply by taking the old article and adding a Supersedes
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
794 header line with the old Message-ID."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
795 (interactive)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
796 (let ((article (gnus-summary-article-number)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
797 (gnus-setup-message 'reply-yank
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
798 (gnus-summary-select-article t)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
799 (set-buffer gnus-original-article-buffer)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
800 (message-supersede)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
801 (push
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
802 `((lambda ()
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
803 (when (gnus-buffer-exists-p ,gnus-summary-buffer)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
804 (save-excursion
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
805 (set-buffer ,gnus-summary-buffer)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
806 (gnus-cache-possibly-remove-article ,article nil nil nil t)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
807 (gnus-summary-mark-as-read ,article gnus-canceled-mark)))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
808 message-send-actions))))
34192
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
809
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
810
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
811
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
812 (defun gnus-copy-article-buffer (&optional article-buffer yank-string)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
813 ;; make a copy of the article buffer with all text properties removed
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
814 ;; this copy is in the buffer gnus-article-copy.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
815 ;; if ARTICLE-BUFFER is nil, gnus-article-buffer is used
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
816 ;; this buffer should be passed to all mail/news reply/post routines.
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
817 (setq gnus-article-copy (gnus-get-buffer-create " *gnus article copy*"))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
818 (save-excursion
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
819 (set-buffer gnus-article-copy)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
820 (mm-enable-multibyte))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
821 (let ((article-buffer (or article-buffer gnus-article-buffer))
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
822 end beg)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
823 (if (not (and (get-buffer article-buffer)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
824 (gnus-buffer-exists-p article-buffer)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
825 (error "Can't find any article buffer")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
826 (save-excursion
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
827 (set-buffer article-buffer)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
828 (let ((gnus-newsgroup-charset (or gnus-article-charset
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
829 gnus-newsgroup-charset))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
830 (gnus-newsgroup-ignored-charsets
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
831 (or gnus-article-ignored-charsets
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
832 gnus-newsgroup-ignored-charsets)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
833 (save-restriction
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
834 ;; Copy over the (displayed) article buffer, delete
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
835 ;; hidden text and remove text properties.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
836 (widen)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
837 (copy-to-buffer gnus-article-copy (point-min) (point-max))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
838 (set-buffer gnus-article-copy)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
839 (when yank-string
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
840 (message-goto-body)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
841 (delete-region (point) (point-max))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
842 (insert yank-string))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
843 (gnus-article-delete-text-of-type 'annotation)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
844 (gnus-remove-text-with-property 'gnus-prev)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
845 (gnus-remove-text-with-property 'gnus-next)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
846 (gnus-remove-text-with-property 'gnus-decoration)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
847 (insert
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
848 (prog1
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
849 (buffer-substring-no-properties (point-min) (point-max))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
850 (erase-buffer)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
851 ;; Find the original headers.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
852 (set-buffer gnus-original-article-buffer)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
853 (goto-char (point-min))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
854 (while (looking-at message-unix-mail-delimiter)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
855 (forward-line 1))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
856 (let ((mail-header-separator ""))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
857 (setq beg (point)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
858 end (or (message-goto-body)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
859 ;; There may be just a header.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
860 (point-max))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
861 ;; Delete the headers from the displayed articles.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
862 (set-buffer gnus-article-copy)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
863 (let ((mail-header-separator ""))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
864 (delete-region (goto-char (point-min))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
865 (or (message-goto-body) (point-max))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
866 ;; Insert the original article headers.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
867 (insert-buffer-substring gnus-original-article-buffer beg end)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
868 ;; Decode charsets.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
869 (let ((gnus-article-decode-hook
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
870 (delq 'article-decode-charset
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
871 (copy-sequence gnus-article-decode-hook))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
872 (run-hooks 'gnus-article-decode-hook)))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
873 gnus-article-copy)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
874
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
875 (defun gnus-post-news (post &optional group header article-buffer yank subject
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
876 force-news)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
877 (when article-buffer
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
878 (gnus-copy-article-buffer))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
879 (let ((gnus-article-reply (and article-buffer (gnus-summary-article-number)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
880 (gnus-article-yanked-articles yank)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
881 (add-to-list gnus-add-to-list))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
882 (gnus-setup-message (cond (yank 'reply-yank)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
883 (article-buffer 'reply)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
884 (t 'message))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
885 (let* ((group (or group gnus-newsgroup-name))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
886 (charset (gnus-group-name-charset nil group))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
887 (pgroup group)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
888 to-address to-group mailing-list to-list
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
889 newsgroup-p)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
890 (when group
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
891 (setq to-address (gnus-parameter-to-address group)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
892 to-group (gnus-group-find-parameter group 'to-group)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
893 to-list (gnus-parameter-to-list group)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
894 newsgroup-p (gnus-group-find-parameter group 'newsgroup)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
895 mailing-list (when gnus-mailing-list-groups
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
896 (string-match gnus-mailing-list-groups group))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
897 group (gnus-group-name-decode (gnus-group-real-name group)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
898 charset)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
899 (if (or (and to-group
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
900 (gnus-news-group-p to-group))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
901 newsgroup-p
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
902 force-news
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
903 (and (gnus-news-group-p
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
904 (or pgroup gnus-newsgroup-name)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
905 (or header gnus-current-article))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
906 (not mailing-list)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
907 (not to-list)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
908 (not to-address)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
909 ;; This is news.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
910 (if post
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
911 (message-news (or to-group group))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
912 (set-buffer gnus-article-copy)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
913 (gnus-msg-treat-broken-reply-to)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
914 (message-followup (if (or newsgroup-p force-news)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
915 (if (save-restriction
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
916 (article-narrow-to-head)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
917 (message-fetch-field "newsgroups"))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
918 nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
919 "")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
920 to-group)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
921 ;; The is mail.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
922 (if post
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
923 (progn
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
924 (message-mail (or to-address to-list))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
925 ;; Arrange for mail groups that have no `to-address' to
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
926 ;; get that when the user sends off the mail.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
927 (when (and (not to-list)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
928 (not to-address)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
929 add-to-list)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
930 (push (list 'gnus-inews-add-to-address pgroup)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
931 message-send-actions)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
932 (set-buffer gnus-article-copy)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
933 (gnus-msg-treat-broken-reply-to)
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
934 (message-wide-reply to-address)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
935 (when yank
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
936 (gnus-inews-yank-articles yank))))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
937
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
938 (defun gnus-msg-treat-broken-reply-to (&optional force)
48588
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 43365
diff changeset
939 "Remove the Reply-to header if broken-reply-to."
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
940 (when (or force
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
941 (gnus-group-find-parameter
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
942 gnus-newsgroup-name 'broken-reply-to))
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
943 (save-restriction
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
944 (message-narrow-to-head)
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
945 (message-remove-header "reply-to"))))
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
946
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
947 (defun gnus-post-method (arg group &optional silent)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
948 "Return the posting method based on GROUP and ARG.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
949 If SILENT, don't prompt the user."
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
950 (let ((gnus-post-method (or (gnus-parameter-post-method group)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
951 gnus-post-method))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
952 (group-method (gnus-find-method-for-group group)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
953 (cond
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
954 ;; If the group-method is nil (which shouldn't happen) we use
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
955 ;; the default method.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
956 ((null group-method)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
957 (or (and (listp gnus-post-method) ;If not current/native/nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
958 (not (listp (car gnus-post-method))) ; and not a list of methods
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
959 gnus-post-method) ;then use it.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
960 gnus-select-method
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
961 message-post-method))
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
962 ;; We want the inverse of the default
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
963 ((and arg (not (eq arg 0)))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
964 (if (eq gnus-post-method 'current)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
965 gnus-select-method
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
966 group-method))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
967 ;; We query the user for a post method.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
968 ((or arg
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
969 (and (listp gnus-post-method)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
970 (listp (car gnus-post-method))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
971 (let* ((methods
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
972 ;; Collect all methods we know about.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
973 (append
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
974 (when (listp gnus-post-method)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
975 (if (listp (car gnus-post-method))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
976 gnus-post-method
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
977 (list gnus-post-method)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
978 gnus-secondary-select-methods
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
979 (mapcar 'cdr gnus-server-alist)
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
980 (mapcar 'car gnus-opened-servers)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
981 (list gnus-select-method)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
982 (list group-method)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
983 method-alist post-methods method)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
984 ;; Weed out all mail methods.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
985 (while methods
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
986 (setq method (gnus-server-get-method "" (pop methods)))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
987 (when (and (or (gnus-method-option-p method 'post)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
988 (gnus-method-option-p method 'post-mail))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
989 (not (member method post-methods)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
990 (push method post-methods)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
991 ;; Create a name-method alist.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
992 (setq method-alist
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
993 (mapcar
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
994 (lambda (m)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
995 (if (equal (cadr m) "")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
996 (list (symbol-name (car m)) m)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
997 (list (concat (cadr m) " (" (symbol-name (car m)) ")") m)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
998 post-methods))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
999 ;; Query the user.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1000 (cadr
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1001 (assoc
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1002 (setq gnus-last-posting-server
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1003 (if (and silent
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1004 gnus-last-posting-server)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1005 ;; Just use the last value.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1006 gnus-last-posting-server
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1007 (completing-read
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1008 "Posting method: " method-alist nil t
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1009 (cons (or gnus-last-posting-server "") 0))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1010 method-alist))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1011 ;; Override normal method.
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1012 ((and (eq gnus-post-method 'current)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1013 (not (memq (car group-method) gnus-discouraged-post-methods))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1014 (gnus-get-function group-method 'request-post t))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1015 (assert (not arg))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1016 group-method)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1017 ;; Use gnus-post-method.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1018 ((listp gnus-post-method) ;A method...
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1019 (assert (not (listp (car gnus-post-method)))) ;... not a list of methods.
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1020 gnus-post-method)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1021 ;; Use the normal select method (nil or native).
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1022 (t gnus-select-method))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1023
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1024
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1025
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1026 (defun gnus-extended-version ()
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1027 "Stringified Gnus version and Emacs version.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1028 See the variable `gnus-user-agent'."
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1029 (interactive)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1030 (let* ((float-output-format nil)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1031 (gnus-v
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1032 (concat "Gnus/"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1033 (prin1-to-string (gnus-continuum-version gnus-version) t)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1034 " (" gnus-version ")"))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1035 (emacs-v (gnus-emacs-version)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1036 (if (stringp gnus-user-agent)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1037 gnus-user-agent
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1038 (concat gnus-v
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1039 (when emacs-v
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1040 (concat " " emacs-v))))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1041
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1042
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1043 ;;;
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1044 ;;; Gnus Mail Functions
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1045 ;;;
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1046
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1047 ;;; Mail reply commands of Gnus summary mode
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1048
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1049 (defun gnus-summary-reply (&optional yank wide very-wide)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1050 "Start composing a mail reply to the current message.
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1051 If prefix argument YANK is non-nil, the original article is yanked
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1052 automatically.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1053 If WIDE, make a wide reply.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1054 If VERY-WIDE, make a very wide reply."
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1055 (interactive
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1056 (list (and current-prefix-arg
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1057 (gnus-summary-work-articles 1))))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1058 ;; Allow user to require confirmation before replying by mail to the
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1059 ;; author of a news article (or mail message).
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1060 (when (or
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1061 (not (or (gnus-news-group-p gnus-newsgroup-name)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1062 gnus-confirm-treat-mail-like-news))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1063 (not (cond ((stringp gnus-confirm-mail-reply-to-news)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1064 (string-match gnus-confirm-mail-reply-to-news
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1065 gnus-newsgroup-name))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1066 ((functionp gnus-confirm-mail-reply-to-news)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1067 (funcall gnus-confirm-mail-reply-to-news gnus-newsgroup-name))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1068 (t gnus-confirm-mail-reply-to-news)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1069 (y-or-n-p "Really reply by mail to article author? "))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1070 (let* ((article
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1071 (if (listp (car yank))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1072 (caar yank)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1073 (car yank)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1074 (gnus-article-reply (or article (gnus-summary-article-number)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1075 (gnus-article-yanked-articles yank)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1076 (headers ""))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1077 ;; Stripping headers should be specified with mail-yank-ignored-headers.
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1078 (when yank
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1079 (gnus-summary-goto-subject article))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1080 (gnus-setup-message (if yank 'reply-yank 'reply)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1081 (if (not very-wide)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1082 (gnus-summary-select-article)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1083 (dolist (article very-wide)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1084 (gnus-summary-select-article nil nil nil article)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1085 (save-excursion
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1086 (set-buffer (gnus-copy-article-buffer))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1087 (gnus-msg-treat-broken-reply-to)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1088 (save-restriction
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1089 (message-narrow-to-head)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1090 (setq headers (concat headers (buffer-string)))))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1091 (set-buffer (gnus-copy-article-buffer))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1092 (gnus-msg-treat-broken-reply-to gnus-msg-force-broken-reply-to)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1093 (save-restriction
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1094 (message-narrow-to-head)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1095 (when very-wide
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1096 (erase-buffer)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1097 (insert headers))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1098 (goto-char (point-max)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1099 (mml-quote-region (point) (point-max))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1100 (message-reply nil wide)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1101 (when yank
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1102 (gnus-inews-yank-articles yank))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1103 (gnus-summary-handle-replysign)))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1104
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1105 (defun gnus-summary-handle-replysign ()
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1106 "Check the various replysign variables and take action accordingly."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1107 (when (or gnus-message-replysign gnus-message-replyencrypt)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1108 (let (signed encrypted)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1109 (save-excursion
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1110 (set-buffer gnus-article-buffer)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1111 (setq signed (memq 'signed gnus-article-wash-types))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1112 (setq encrypted (memq 'encrypted gnus-article-wash-types)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1113 (cond ((and gnus-message-replyencrypt encrypted)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1114 (mml-secure-message mml-default-encrypt-method
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1115 (if gnus-message-replysignencrypted
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1116 'signencrypt
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1117 'encrypt)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1118 ((and gnus-message-replysign signed)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1119 (mml-secure-message mml-default-sign-method 'sign))))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1120
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1121 (defun gnus-summary-reply-with-original (n &optional wide)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1122 "Start composing a reply mail to the current message.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1123 The original article will be yanked."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1124 (interactive "P")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1125 (gnus-summary-reply (gnus-summary-work-articles n) wide))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1126
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1127 (defun gnus-summary-reply-broken-reply-to (&optional yank wide very-wide)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1128 "Like `gnus-summary-reply' except removing reply-to field.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1129 If prefix argument YANK is non-nil, the original article is yanked
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1130 automatically.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1131 If WIDE, make a wide reply.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1132 If VERY-WIDE, make a very wide reply."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1133 (interactive
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1134 (list (and current-prefix-arg
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1135 (gnus-summary-work-articles 1))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1136 (let ((gnus-msg-force-broken-reply-to t))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1137 (gnus-summary-reply yank wide very-wide)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1138
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1139 (defun gnus-summary-reply-broken-reply-to-with-original (n &optional wide)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1140 "Like `gnus-summary-reply-with-original' except removing reply-to field.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1141 The original article will be yanked."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1142 (interactive "P")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1143 (gnus-summary-reply-broken-reply-to (gnus-summary-work-articles n) wide))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1144
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1145 (defun gnus-summary-wide-reply (&optional yank)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1146 "Start composing a wide reply mail to the current message.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1147 If prefix argument YANK is non-nil, the original article is yanked
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1148 automatically."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1149 (interactive
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1150 (list (and current-prefix-arg
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1151 (gnus-summary-work-articles 1))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1152 (gnus-summary-reply yank t))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1153
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1154 (defun gnus-summary-wide-reply-with-original (n)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1155 "Start composing a wide reply mail to the current message.
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1156 The original article will be yanked.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1157 Uses the process/prefix convention."
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1158 (interactive "P")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1159 (gnus-summary-reply-with-original n t))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1160
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1161 (defun gnus-summary-very-wide-reply (&optional yank)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1162 "Start composing a very wide reply mail to the current message.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1163 If prefix argument YANK is non-nil, the original article is yanked
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1164 automatically."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1165 (interactive
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1166 (list (and current-prefix-arg
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1167 (gnus-summary-work-articles 1))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1168 (gnus-summary-reply yank t (gnus-summary-work-articles yank)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1169
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1170 (defun gnus-summary-very-wide-reply-with-original (n)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1171 "Start composing a very wide reply mail to the current message.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1172 The original article will be yanked."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1173 (interactive "P")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1174 (gnus-summary-reply
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1175 (gnus-summary-work-articles n) t (gnus-summary-work-articles n)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1176
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1177 (defun gnus-summary-mail-forward (&optional arg post)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1178 "Forward the current message(s) to another user.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1179 If process marks exist, forward all marked messages;
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1180 if ARG is nil, see `message-forward-as-mime' and `message-forward-show-mml';
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1181 if ARG is 1, decode the message and forward directly inline;
34192
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
1182 if ARG is 2, forward message as an rfc822 MIME section;
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1183 if ARG is 3, decode message and forward as an rfc822 MIME section;
34192
57a15e35e75b * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 33342
diff changeset
1184 if ARG is 4, forward message directly inline;
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1185 otherwise, use flipped `message-forward-as-mime'.
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1186 If POST, post instead of mail.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1187 For the `inline' alternatives, also see the variable
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1188 `message-forward-ignored-headers'."
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1189 (interactive "P")
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1190 (if (cdr (gnus-summary-work-articles nil))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1191 ;; Process marks are given.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1192 (gnus-uu-digest-mail-forward arg post)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1193 ;; No process marks.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1194 (let ((message-forward-as-mime message-forward-as-mime)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1195 (message-forward-show-mml message-forward-show-mml))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1196 (cond
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1197 ((null arg))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1198 ((eq arg 1)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1199 (setq message-forward-as-mime nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1200 message-forward-show-mml t))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1201 ((eq arg 2)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1202 (setq message-forward-as-mime t
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1203 message-forward-show-mml nil))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1204 ((eq arg 3)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1205 (setq message-forward-as-mime t
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1206 message-forward-show-mml t))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1207 ((eq arg 4)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1208 (setq message-forward-as-mime nil
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1209 message-forward-show-mml nil))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1210 (t
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1211 (setq message-forward-as-mime (not message-forward-as-mime))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1212 (let* ((gnus-article-reply (gnus-summary-article-number))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1213 (gnus-article-yanked-articles (list gnus-article-reply)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1214 (gnus-setup-message 'forward
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1215 (gnus-summary-select-article)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1216 (let ((mail-parse-charset
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1217 (or (and (gnus-buffer-live-p gnus-article-buffer)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1218 (with-current-buffer gnus-article-buffer
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1219 gnus-article-charset))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1220 gnus-newsgroup-charset))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1221 (mail-parse-ignored-charsets
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1222 gnus-newsgroup-ignored-charsets))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1223 (set-buffer gnus-original-article-buffer)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1224 (message-forward post)))))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1225
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1226 (defun gnus-summary-resend-message (address n)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1227 "Resend the current article to ADDRESS."
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1228 (interactive
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1229 (list (message-read-from-minibuffer
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1230 "Resend message(s) to: "
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1231 (when (and gnus-summary-resend-default-address
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1232 (gnus-buffer-live-p gnus-original-article-buffer))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1233 ;; If some other article is currently selected, the
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1234 ;; initial-contents is wrong. Whatever, it is just the
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1235 ;; initial-contents.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1236 (with-current-buffer gnus-original-article-buffer
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1237 (nnmail-fetch-field "to"))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1238 current-prefix-arg))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1239 (let ((articles (gnus-summary-work-articles n))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1240 article)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1241 (while (setq article (pop articles))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1242 (gnus-summary-select-article nil nil nil article)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1243 (save-excursion
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1244 (set-buffer gnus-original-article-buffer)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1245 (message-resend address))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1246 (gnus-summary-mark-article-as-forwarded article))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1247
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1248 ;; From: Matthieu Moy <Matthieu.Moy@imag.fr>
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1249 (defun gnus-summary-resend-message-edit ()
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1250 "Resend an article that has already been sent.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1251 A new buffer will be created to allow the user to modify body and
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1252 contents of the message, and then, everything will happen as when
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1253 composing a new message."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1254 (interactive)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1255 (let ((article (gnus-summary-article-number)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1256 (gnus-setup-message 'reply-yank
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1257 (gnus-summary-select-article t)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1258 (set-buffer gnus-original-article-buffer)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1259 (let ((cur (current-buffer))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1260 (to (message-fetch-field "to")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1261 ;; Get a normal message buffer.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1262 (message-pop-to-buffer (message-buffer-name "Resend" to))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1263 (insert-buffer-substring cur)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1264 (message-narrow-to-head-1)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1265 ;; Gnus will generate a new one when sending.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1266 (message-remove-header "Message-ID")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1267 (message-remove-header message-ignored-resent-headers t)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1268 ;; Remove unwanted headers.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1269 (goto-char (point-max))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1270 (insert mail-header-separator)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1271 (goto-char (point-min))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1272 (when (re-search-forward "^To:\\|^Newsgroups:" nil 'move)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1273 (forward-char 1))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1274 (widen)))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1275
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1276 (defun gnus-summary-post-forward (&optional arg)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1277 "Forward the current article to a newsgroup.
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1278 See `gnus-summary-mail-forward' for ARG."
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1279 (interactive "P")
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1280 (gnus-summary-mail-forward arg t))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1281
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1282 (defvar gnus-nastygram-message
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1283 "The following article was inappropriately posted to %s.\n\n"
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1284 "Format string to insert in nastygrams.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1285 The current group name will be inserted at \"%s\".")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1286
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1287 (defun gnus-summary-mail-nastygram (n)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1288 "Send a nastygram to the author of the current article."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1289 (interactive "P")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1290 (when (or gnus-expert-user
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1291 (gnus-y-or-n-p
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1292 "Really send a nastygram to the author of the current article? "))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1293 (let ((group gnus-newsgroup-name))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1294 (gnus-summary-reply-with-original n)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1295 (set-buffer gnus-message-buffer)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1296 (message-goto-body)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1297 (insert (format gnus-nastygram-message group))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1298 (message-send-and-exit))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1299
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1300 (defun gnus-summary-mail-crosspost-complaint (n)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1301 "Send a complaint about crossposting to the current article(s)."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1302 (interactive "P")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1303 (let ((articles (gnus-summary-work-articles n))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1304 article)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1305 (while (setq article (pop articles))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1306 (set-buffer gnus-summary-buffer)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1307 (gnus-summary-goto-subject article)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1308 (let ((group (gnus-group-real-name gnus-newsgroup-name))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1309 newsgroups followup-to)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1310 (gnus-summary-select-article)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1311 (set-buffer gnus-original-article-buffer)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1312 (if (and (<= (length (message-tokenize-header
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1313 (setq newsgroups
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1314 (mail-fetch-field "newsgroups"))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1315 ", "))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1316 1)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1317 (or (not (setq followup-to (mail-fetch-field "followup-to")))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1318 (not (member group (message-tokenize-header
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1319 followup-to ", ")))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1320 (if followup-to
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1321 (gnus-message 1 "Followup-to restricted")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1322 (gnus-message 1 "Not a crossposted article"))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1323 (set-buffer gnus-summary-buffer)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1324 (gnus-summary-reply-with-original 1)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1325 (set-buffer gnus-message-buffer)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1326 (message-goto-body)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1327 (insert (format gnus-crosspost-complaint newsgroups group))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1328 (message-goto-subject)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1329 (re-search-forward " *$")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1330 (replace-match " (crosspost notification)" t t)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1331 (gnus-deactivate-mark)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1332 (when (gnus-y-or-n-p "Send this complaint? ")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1333 (message-send-and-exit)))))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1334
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1335 (defun gnus-mail-parse-comma-list ()
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1336 (let (accumulated
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1337 beg)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1338 (skip-chars-forward " ")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1339 (while (not (eobp))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1340 (setq beg (point))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1341 (skip-chars-forward "^,")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1342 (while (zerop
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1343 (save-excursion
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1344 (save-restriction
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1345 (let ((i 0))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1346 (narrow-to-region beg (point))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1347 (goto-char beg)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1348 (logand (progn
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1349 (while (search-forward "\"" nil t)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1350 (incf i))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1351 (if (zerop i) 2 i))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1352 2)))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1353 (skip-chars-forward ",")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1354 (skip-chars-forward "^,"))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1355 (skip-chars-backward " ")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1356 (push (buffer-substring beg (point))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1357 accumulated)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1358 (skip-chars-forward "^,")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1359 (skip-chars-forward ", "))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1360 accumulated))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1361
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1362 (defun gnus-inews-add-to-address (group)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1363 (let ((to-address (mail-fetch-field "to")))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1364 (when (and to-address
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1365 (gnus-alive-p))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1366 ;; This mail group doesn't have a `to-list', so we add one
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1367 ;; here. Magic!
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1368 (when (gnus-y-or-n-p
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1369 (format "Do you want to add this as `to-list': %s? " to-address))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1370 (gnus-group-add-parameter group (cons 'to-list to-address))))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1371
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1372 (defun gnus-put-message ()
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1373 "Put the current message in some group and return to Gnus."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1374 (interactive)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1375 (let ((reply gnus-article-reply)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1376 (winconf gnus-prev-winconf)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1377 (group gnus-newsgroup-name))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1378 (unless (and group
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1379 (not (gnus-group-read-only-p group)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1380 (setq group (read-string "Put in group: " nil (gnus-writable-groups))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1381
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1382 (when (gnus-gethash group gnus-newsrc-hashtb)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1383 (error "No such group: %s" group))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1384 (save-excursion
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1385 (save-restriction
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1386 (widen)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1387 (message-narrow-to-headers)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1388 (let ((gnus-deletable-headers nil))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1389 (message-generate-headers
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1390 (if (message-news-p)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1391 message-required-news-headers
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1392 message-required-mail-headers)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1393 (goto-char (point-max))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1394 (if (string-match " " group)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1395 (insert "Gcc: \"" group "\"\n")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1396 (insert "Gcc: " group "\n"))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1397 (widen)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1398 (gnus-inews-do-gcc)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1399 (when (and (get-buffer gnus-group-buffer)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1400 (gnus-buffer-exists-p (car-safe reply))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1401 (cdr reply))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1402 (set-buffer (car reply))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1403 (gnus-summary-mark-article-as-replied (cdr reply)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1404 (when winconf
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1405 (set-window-configuration winconf))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1406
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1407 (defun gnus-article-mail (yank)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1408 "Send a reply to the address near point.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1409 If YANK is non-nil, include the original article."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1410 (interactive "P")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1411 (let ((address
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1412 (buffer-substring
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1413 (save-excursion (re-search-backward "[ \t\n]" nil t) (1+ (point)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1414 (save-excursion (re-search-forward "[ \t\n]" nil t) (1- (point))))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1415 (when address
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1416 (gnus-msg-mail address)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1417 (when yank
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1418 (gnus-inews-yank-articles (list (cdr gnus-article-current)))))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1419
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1420 (defvar nntp-server-type)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1421 (defun gnus-bug ()
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1422 "Send a bug report to the Gnus maintainers."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1423 (interactive)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1424 (unless (gnus-alive-p)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1425 (error "Gnus has been shut down"))
34797
b473bc6d9a55 * mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 34752
diff changeset
1426 (gnus-setup-message (if (message-mail-user-agent) 'message 'bug)
b473bc6d9a55 * mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 34752
diff changeset
1427 (unless (message-mail-user-agent)
b473bc6d9a55 * mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 34752
diff changeset
1428 (delete-other-windows)
b473bc6d9a55 * mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 34752
diff changeset
1429 (when gnus-bug-create-help-buffer
b473bc6d9a55 * mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 34752
diff changeset
1430 (switch-to-buffer "*Gnus Help Bug*")
b473bc6d9a55 * mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 34752
diff changeset
1431 (erase-buffer)
b473bc6d9a55 * mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 34752
diff changeset
1432 (insert gnus-bug-message)
b473bc6d9a55 * mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 34752
diff changeset
1433 (goto-char (point-min)))
b473bc6d9a55 * mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 34752
diff changeset
1434 (message-pop-to-buffer "*Gnus Bug*"))
b473bc6d9a55 * mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 34752
diff changeset
1435 (let ((message-this-is-mail t))
b473bc6d9a55 * mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents: 34752
diff changeset
1436 (message-setup `((To . ,gnus-maintainer) (Subject . ""))))
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1437 (when gnus-bug-create-help-buffer
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1438 (push `(gnus-bug-kill-buffer) message-send-actions))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1439 (goto-char (point-min))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1440 (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$"))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1441 (forward-line 1)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1442 (insert (gnus-version) "\n"
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1443 (emacs-version) "\n")
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1444 (when (and (boundp 'nntp-server-type)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1445 (stringp nntp-server-type))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1446 (insert nntp-server-type))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1447 (insert "\n\n\n\n\n")
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1448 (let (text)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1449 (save-excursion
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1450 (set-buffer (gnus-get-buffer-create " *gnus environment info*"))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1451 (erase-buffer)
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1452 (gnus-debug)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1453 (setq text (buffer-string)))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1454 (insert "<#part type=application/emacs-lisp disposition=inline description=\"User settings\">\n" text "\n<#/part>"))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1455 (goto-char (point-min))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1456 (search-forward "Subject: " nil t)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1457 (message "")))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1458
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1459 (defun gnus-bug-kill-buffer ()
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1460 (when (get-buffer "*Gnus Help Bug*")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1461 (kill-buffer "*Gnus Help Bug*")))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1462
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1463 (defun gnus-summary-yank-message (buffer n)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1464 "Yank the current article into a composed message."
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1465 (interactive
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1466 (list (completing-read "Buffer: " (mapcar 'list (message-buffers)) nil t)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1467 current-prefix-arg))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1468 (gnus-summary-iterate n
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1469 (let ((gnus-inhibit-treatment t))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1470 (gnus-summary-select-article))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1471 (save-excursion
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1472 (set-buffer buffer)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1473 (message-yank-buffer gnus-article-buffer))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1474
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1475 (defun gnus-debug ()
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1476 "Attempts to go through the Gnus source file and report what variables have been changed.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1477 The source file has to be in the Emacs load path."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1478 (interactive)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1479 (let ((files gnus-debug-files)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1480 (point (point))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1481 file expr olist sym)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1482 (gnus-message 4 "Please wait while we snoop your variables...")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1483 (sit-for 0)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1484 ;; Go through all the files looking for non-default values for variables.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1485 (save-excursion
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1486 (set-buffer (gnus-get-buffer-create " *gnus bug info*"))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1487 (while files
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1488 (erase-buffer)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1489 (when (and (setq file (locate-library (pop files)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1490 (file-exists-p file))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1491 (insert-file-contents file)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1492 (goto-char (point-min))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1493 (if (not (re-search-forward "^;;* *Internal variables" nil t))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1494 (gnus-message 4 "Malformed sources in file %s" file)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1495 (narrow-to-region (point-min) (point))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1496 (goto-char (point-min))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1497 (while (setq expr (ignore-errors (read (current-buffer))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1498 (ignore-errors
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1499 (and (or (eq (car expr) 'defvar)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1500 (eq (car expr) 'defcustom))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1501 (stringp (nth 3 expr))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1502 (not (memq (nth 1 expr) gnus-debug-exclude-variables))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1503 (or (not (boundp (nth 1 expr)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1504 (not (equal (eval (nth 2 expr))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1505 (symbol-value (nth 1 expr)))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1506 (push (nth 1 expr) olist)))))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1507 (kill-buffer (current-buffer)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1508 (when (setq olist (nreverse olist))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1509 (insert "------------------ Environment follows ------------------\n\n"))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1510 (while olist
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1511 (if (boundp (car olist))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1512 (ignore-errors
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1513 (pp `(setq ,(car olist)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1514 ,(if (or (consp (setq sym (symbol-value (car olist))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1515 (and (symbolp sym)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1516 (not (or (eq sym nil)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1517 (eq sym t)))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1518 (list 'quote (symbol-value (car olist)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1519 (symbol-value (car olist))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1520 (current-buffer)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1521 (insert ";; (makeunbound '" (symbol-name (car olist)) ")\n"))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1522 (setq olist (cdr olist)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1523 (insert "\n\n")
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1524 ;; Remove any control chars - they seem to cause trouble for some
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1525 ;; mailers. (Byte-compiled output from the stuff above.)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1526 (goto-char point)
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1527 (while (re-search-forward "[\000-\010\013-\037\200-\237]" nil t)
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1528 (replace-match (format "\\%03o" (string-to-char (match-string 0)))
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1529 t t))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1530
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1531 ;;; Treatment of rejected articles.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1532 ;;; Bounced mail.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1533
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1534 (defun gnus-summary-resend-bounced-mail (&optional fetch)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1535 "Re-mail the current message.
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1536 This only makes sense if the current message is a bounce message that
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1537 contains some mail you have written which has been bounced back to
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1538 you.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1539 If FETCH, try to fetch the article that this is a reply to, if indeed
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1540 this is a reply."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1541 (interactive "P")
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1542 (gnus-summary-select-article t)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1543 (set-buffer gnus-original-article-buffer)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1544 (gnus-setup-message 'compose-bounce
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1545 (let* ((references (mail-fetch-field "references"))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1546 (parent (and references (gnus-parent-id references))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1547 (message-bounce)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1548 ;; If there are references, we fetch the article we answered to.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1549 (and fetch parent
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1550 (gnus-summary-refer-article parent)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1551 (gnus-summary-show-all-headers)))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1552
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1553 ;;; Gcc handling.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1554
33271
9b3030bf32fc 2000-11-06 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31785
diff changeset
1555 (defun gnus-inews-group-method (group)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1556 (cond
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1557 ;; If the group doesn't exist, we assume
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1558 ;; it's an archive group...
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1559 ((and (null (gnus-get-info group))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1560 (eq (car (gnus-server-to-method gnus-message-archive-method))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1561 (car (gnus-server-to-method (gnus-group-method group)))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1562 gnus-message-archive-method)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1563 ;; Use the method.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1564 ((gnus-info-method (gnus-get-info group))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1565 (gnus-info-method (gnus-get-info group)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1566 ;; Find the method.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1567 (t (gnus-server-to-method (gnus-group-method group)))))
33271
9b3030bf32fc 2000-11-06 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31785
diff changeset
1568
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1569 ;; Do Gcc handling, which copied the message over to some group.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1570 (defun gnus-inews-do-gcc (&optional gcc)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1571 (interactive)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1572 (save-excursion
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1573 (save-restriction
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1574 (message-narrow-to-headers)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1575 (let ((gcc (or gcc (mail-fetch-field "gcc" nil t)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1576 (cur (current-buffer))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1577 groups group method group-art
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1578 mml-externalize-attachments)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1579 (when gcc
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1580 (message-remove-header "gcc")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1581 (widen)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1582 (setq groups (message-unquote-tokens
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1583 (message-tokenize-header gcc " ,")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1584 ;; Copy the article over to some group(s).
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1585 (while (setq group (pop groups))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1586 (unless (gnus-check-server
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1587 (setq method (gnus-inews-group-method group)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1588 (error "Can't open server %s" (if (stringp method) method
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1589 (car method))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1590 (unless (gnus-request-group group nil method)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1591 (gnus-request-create-group group method))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1592 (setq mml-externalize-attachments
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1593 (if (stringp gnus-gcc-externalize-attachments)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1594 (string-match gnus-gcc-externalize-attachments group)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1595 gnus-gcc-externalize-attachments))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1596 (save-excursion
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1597 (nnheader-set-temp-buffer " *acc*")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1598 (insert-buffer-substring cur)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1599 (message-encode-message-body)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1600 (save-restriction
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1601 (message-narrow-to-headers)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1602 (let* ((mail-parse-charset message-default-charset)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1603 (newsgroups-field (save-restriction
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1604 (message-narrow-to-headers-or-head)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1605 (message-fetch-field "Newsgroups")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1606 (followup-field (save-restriction
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1607 (message-narrow-to-headers-or-head)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1608 (message-fetch-field "Followup-To")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1609 ;; BUG: We really need to get the charset for
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1610 ;; each name in the Newsgroups and Followup-To
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1611 ;; lines to allow crossposting between group
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1612 ;; namess with incompatible character sets.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1613 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2001-10-08.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1614 (group-field-charset
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1615 (gnus-group-name-charset
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1616 method (or newsgroups-field "")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1617 (followup-field-charset
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1618 (gnus-group-name-charset
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1619 method (or followup-field "")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1620 (rfc2047-header-encoding-alist
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1621 (append
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1622 (when group-field-charset
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1623 (list (cons "Newsgroups" group-field-charset)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1624 (when followup-field-charset
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1625 (list (cons "Followup-To" followup-field-charset)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1626 rfc2047-header-encoding-alist)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1627 (mail-encode-encoded-word-buffer)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1628 (goto-char (point-min))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1629 (when (re-search-forward
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1630 (concat "^" (regexp-quote mail-header-separator) "$")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1631 nil t)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1632 (replace-match "" t t ))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1633 (unless (setq group-art
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1634 (gnus-request-accept-article group method t t))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1635 (gnus-message 1 "Couldn't store article in group %s: %s"
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1636 group (gnus-status-message method))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1637 (sit-for 2))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1638 (when (and group-art
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1639 ;; FIXME: Should gcc-mark-as-read work when
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1640 ;; Gnus is not running?
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1641 (gnus-alive-p)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1642 (or gnus-gcc-mark-as-read
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1643 (and
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1644 (boundp 'gnus-inews-mark-gcc-as-read)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1645 (symbol-value 'gnus-inews-mark-gcc-as-read))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1646 (gnus-group-mark-article-read group (cdr group-art)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1647 (kill-buffer (current-buffer)))))))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1648
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1649 (defun gnus-inews-insert-gcc ()
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1650 "Insert Gcc headers based on `gnus-outgoing-message-group'."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1651 (save-excursion
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1652 (save-restriction
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1653 (message-narrow-to-headers)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1654 (let* ((group gnus-outgoing-message-group)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1655 (gcc (cond
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1656 ((functionp group)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1657 (funcall group))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1658 ((or (stringp group) (list group))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1659 group))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1660 (when gcc
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1661 (insert "Gcc: "
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1662 (if (stringp gcc)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1663 (if (string-match " " gcc)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1664 (concat "\"" gcc "\"")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1665 gcc)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1666 (mapconcat (lambda (group)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1667 (if (string-match " " group)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1668 (concat "\"" group "\"")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1669 group))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1670 gcc " "))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1671 "\n"))))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1672
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1673 (defun gnus-inews-insert-archive-gcc (&optional group)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1674 "Insert the Gcc to say where the article is to be archived."
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1675 (let* ((var gnus-message-archive-group)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1676 (group (or group gnus-newsgroup-name ""))
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1677 (gcc-self-val
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1678 (and gnus-newsgroup-name
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1679 (not (equal gnus-newsgroup-name ""))
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1680 (gnus-group-find-parameter
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1681 gnus-newsgroup-name 'gcc-self)))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1682 result
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1683 (groups
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1684 (cond
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1685 ((null gnus-message-archive-method)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1686 ;; Ignore.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1687 nil)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1688 ((stringp var)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1689 ;; Just a single group.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1690 (list var))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1691 ((null var)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1692 ;; We don't want this.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1693 nil)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1694 ((and (listp var) (stringp (car var)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1695 ;; A list of groups.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1696 var)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1697 ((functionp var)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1698 ;; A function.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1699 (funcall var group))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1700 (t
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1701 ;; An alist of regexps/functions/forms.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1702 (while (and var
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1703 (not
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1704 (setq result
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1705 (cond
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1706 ((stringp (caar var))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1707 ;; Regexp.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1708 (when (string-match (caar var) group)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1709 (cdar var)))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1710 ((functionp (car var))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1711 ;; Function.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1712 (funcall (car var) group))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1713 (t
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1714 (eval (car var)))))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1715 (setq var (cdr var)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1716 result)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1717 name)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1718 (when (or groups gcc-self-val)
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1719 (when (stringp groups)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1720 (setq groups (list groups)))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1721 (save-excursion
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1722 (save-restriction
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1723 (message-narrow-to-headers)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1724 (goto-char (point-max))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1725 (insert "Gcc: ")
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1726 (if gcc-self-val
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1727 ;; Use the `gcc-self' param value instead.
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1728 (progn
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1729 (insert
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1730 (if (stringp gcc-self-val)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1731 (if (string-match " " gcc-self-val)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1732 (concat "\"" gcc-self-val "\"")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1733 gcc-self-val)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1734 ;; In nndoc groups, we use the parent group name
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1735 ;; instead of the current group.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1736 (let ((group (or (gnus-group-find-parameter
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1737 gnus-newsgroup-name 'parent-group)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1738 group)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1739 (if (string-match " " group)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1740 (concat "\"" group "\"")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1741 group))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1742 (if (not (eq gcc-self-val 'none))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1743 (insert "\n")
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1744 (gnus-delete-line)))
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1745 ;; Use the list of groups.
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1746 (while (setq name (pop groups))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1747 (let ((str (if (string-match ":" name)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1748 name
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1749 (gnus-group-prefixed-name
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1750 name gnus-message-archive-method))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1751 (insert (if (string-match " " str)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1752 (concat "\"" str "\"")
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1753 str)))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1754 (when groups
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1755 (insert " ")))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1756 (insert "\n")))))))
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1757
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1758 (defun gnus-mailing-list-followup-to ()
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1759 "Look at the headers in the current buffer and return a Mail-Followup-To address."
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1760 (let ((x-been-there (gnus-fetch-original-field "x-beenthere"))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1761 (list-post (gnus-fetch-original-field "list-post")))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1762 (when (and list-post
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1763 (string-match "mailto:\\([^>]+\\)" list-post))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1764 (setq list-post (match-string 1 list-post)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1765 (or list-post
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1766 x-been-there)))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1767
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1768 ;;; Posting styles.
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1769
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1770 (defun gnus-configure-posting-styles (&optional group-name)
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1771 "Configure posting styles according to `gnus-posting-styles'."
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1772 (unless gnus-inhibit-posting-styles
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1773 (let ((group (or group-name gnus-newsgroup-name ""))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1774 (styles gnus-posting-styles)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1775 style match attribute value v results
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1776 filep name address element)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1777 ;; If the group has a posting-style parameter, add it at the end with a
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1778 ;; regexp matching everything, to be sure it takes precedence over all
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1779 ;; the others.
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1780 (when gnus-newsgroup-name
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1781 (let ((tmp-style (gnus-group-find-parameter group 'posting-style t)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1782 (when tmp-style
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1783 (setq styles (append styles (list (cons ".*" tmp-style)))))))
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1784 ;; Go through all styles and look for matches.
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1785 (dolist (style styles)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1786 (setq match (pop style))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1787 (goto-char (point-min))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1788 (when (cond
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1789 ((stringp match)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1790 ;; Regexp string match on the group name.
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1791 (string-match match group))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1792 ((eq match 'header)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1793 ;; Obsolete format of header match.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1794 (and (gnus-buffer-live-p gnus-article-copy)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1795 (with-current-buffer gnus-article-copy
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1796 (let ((header (message-fetch-field (pop style))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1797 (and header
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1798 (string-match (pop style) header))))))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1799 ((or (symbolp match)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1800 (functionp match))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1801 (cond
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1802 ((functionp match)
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1803 ;; Function to be called.
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1804 (funcall match))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1805 ((boundp match)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1806 ;; Variable to be checked.
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1807 (symbol-value match))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1808 ((listp match)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1809 (cond
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1810 ((eq (car match) 'header)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1811 ;; New format of header match.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1812 (and (gnus-buffer-live-p gnus-article-copy)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1813 (with-current-buffer gnus-article-copy
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1814 (let ((header (message-fetch-field (nth 1 match))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1815 (and header
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1816 (string-match (nth 2 match) header))))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1817 (t
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1818 ;; This is a form to be evaled.
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1819 (eval match)))))
24357
15fc6acbae7a Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 19969
diff changeset
1820 ;; We have a match, so we set the variables.
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1821 (dolist (attribute style)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1822 (setq element (pop attribute)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1823 filep nil)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1824 (setq value
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1825 (cond
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1826 ((eq (car attribute) :file)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1827 (setq filep t)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1828 (cadr attribute))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1829 ((eq (car attribute) :value)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1830 (cadr attribute))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1831 (t
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1832 (car attribute))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1833 ;; We get the value.
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1834 (setq v
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1835 (cond
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1836 ((stringp value)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1837 value)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1838 ((or (symbolp value)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1839 (functionp value))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1840 (cond ((functionp value)
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1841 (funcall value))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1842 ((boundp value)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1843 (symbol-value value))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1844 ((listp value)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1845 (eval value))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1846 ;; Translate obsolescent value.
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1847 (cond
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1848 ((eq element 'signature-file)
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1849 (setq element 'signature
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1850 filep t))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1851 ((eq element 'x-face-file)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1852 (setq element 'x-face
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1853 filep t)))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1854 ;; Get the contents of file elems.
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1855 (when (and filep v)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1856 (setq v (with-temp-buffer
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1857 (insert-file-contents v)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1858 (goto-char (point-max))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1859 (while (bolp)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1860 (delete-char -1))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1861 (buffer-string))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1862 (setq results (delq (assoc element results) results))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1863 (push (cons element v) results))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1864 ;; Now we have all the styles, so we insert them.
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1865 (setq name (assq 'name results)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1866 address (assq 'address results))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1867 (setq results (delq name (delq address results)))
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1868 (gnus-make-local-hook 'message-setup-hook)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1869 (setq results (sort results (lambda (x y)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1870 (string-lessp (car x) (car y)))))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1871 (dolist (result results)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1872 (add-hook 'message-setup-hook
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1873 (cond
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1874 ((eq 'eval (car result))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1875 'ignore)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1876 ((eq 'body (car result))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1877 `(lambda ()
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1878 (save-excursion
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1879 (message-goto-body)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1880 (insert ,(cdr result)))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1881 ((eq 'signature (car result))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1882 (set (make-local-variable 'message-signature) nil)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1883 (set (make-local-variable 'message-signature-file) nil)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1884 (if (not (cdr result))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1885 'ignore
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1886 `(lambda ()
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1887 (save-excursion
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1888 (let ((message-signature ,(cdr result)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1889 (when message-signature
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1890 (message-insert-signature)))))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1891 (t
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1892 (let ((header
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1893 (if (symbolp (car result))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1894 (capitalize (symbol-name (car result)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1895 (car result))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1896 `(lambda ()
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1897 (save-excursion
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1898 (message-remove-header ,header)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1899 (let ((value ,(cdr result)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1900 (when value
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1901 (message-goto-eoh)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1902 (insert ,header ": " value)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1903 (unless (bolp)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1904 (insert "\n")))))))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1905 nil 'local))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1906 (when (or name address)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1907 (add-hook 'message-setup-hook
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1908 `(lambda ()
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1909 (set (make-local-variable 'user-mail-address)
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1910 ,(or (cdr address) user-mail-address))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1911 (let ((user-full-name ,(or (cdr name) (user-full-name)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1912 (user-mail-address
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1913 ,(or (cdr address) user-mail-address)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1914 (save-excursion
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1915 (message-remove-header "From")
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 25278
diff changeset
1916 (message-goto-eoh)
82951
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1917 (insert "From: " (message-make-from) "\n"))))
0fde48feb604 Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
1918 nil 'local)))))
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1919
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1920 ;;; Allow redefinition of functions.
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1921
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1922 (gnus-ems-redefine)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1923
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1924 (provide 'gnus-msg)
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1925
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49598
diff changeset
1926 ;;; arch-tag: 9f22b2f5-1c0a-49de-916e-4c88e984852b
17493
e6935c08cf0b Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1927 ;;; gnus-msg.el ends here