Mercurial > emacs
annotate lisp/gnus/message.el @ 82978:80f0490297cb gnus-5_10-post-merge-josefsson
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
and "gnus-5_10-post-merge-josefsson". ]
2004-08-31 Jesper Harder <harder@ifa.au.dk>
* message.el (message-idna-to-ascii-rhs-1): Don't choke on
invalid addresses.
2004-08-31 Reiner Steib <Reiner.Steib@gmx.de>
* message.el (message-idna-to-ascii-rhs-1): Fix typo.
2004-08-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
* message.el (message-idna-to-ascii-rhs-1): Don't use equalp.
2004-08-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-art.el (article-decode-idna-rhs): Don't use
message-idna-inside-rhs-p.
2004-08-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
* message.el (message-idna-inside-rhs-p): Removed.
(message-idna-to-ascii-rhs-1): Use proper address parsing.
author | Reiner Steib <Reiner.Steib@gmx.de> |
---|---|
date | Tue, 31 Aug 2004 15:39:43 +0000 |
parents | 590114f9753d |
children |
rev | line source |
---|---|
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1 ;;; message.el --- composing mail and news messages |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2 ;; Copyright (C) 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:
24357
diff
changeset
|
3 ;; Free Software Foundation, Inc. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
17493 | 6 ;; Keywords: mail, news |
7 | |
8 ;; This file is part of GNU Emacs. | |
9 | |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 ;; it under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 ;; Boston, MA 02111-1307, USA. | |
24 | |
25 ;;; Commentary: | |
26 | |
27 ;; This mode provides mail-sending facilities from within Emacs. It | |
28 ;; consists mainly of large chunks of code from the sendmail.el, | |
29 ;; gnus-msg.el and rnewspost.el files. | |
30 | |
31 ;;; Code: | |
32 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
33 (eval-when-compile |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
34 (require 'cl) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
35 (defvar gnus-message-group-art) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
36 (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
37 (require 'canlock) |
17493 | 38 (require 'mailheader) |
39 (require 'nnheader) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
40 ;; This is apparently necessary even though things are autoloaded. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
41 ;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
42 ;; require mailabbrev here. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
43 (if (featurep 'xemacs) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
44 (require 'mail-abbrevs) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
45 (require 'mailabbrev)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
46 (require 'mail-parse) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
47 (require 'mml) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
48 (require 'rfc822) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
49 (eval-and-compile |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
50 (autoload 'sha1 "sha1-el") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
51 (autoload 'gnus-find-method-for-group "gnus") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
52 (autoload 'nnvirtual-find-group-art "nnvirtual") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
53 (autoload 'gnus-group-decoded-name "gnus-group")) |
17493 | 54 |
55 (defgroup message '((user-mail-address custom-variable) | |
56 (user-full-name custom-variable)) | |
57 "Mail and news message composing." | |
58 :link '(custom-manual "(message)Top") | |
59 :group 'mail | |
60 :group 'news) | |
61 | |
62 (put 'user-mail-address 'custom-type 'string) | |
63 (put 'user-full-name 'custom-type 'string) | |
64 | |
65 (defgroup message-various nil | |
66 "Various Message Variables" | |
67 :link '(custom-manual "(message)Various Message Variables") | |
68 :group 'message) | |
69 | |
70 (defgroup message-buffers nil | |
71 "Message Buffers" | |
72 :link '(custom-manual "(message)Message Buffers") | |
73 :group 'message) | |
74 | |
75 (defgroup message-sending nil | |
76 "Message Sending" | |
77 :link '(custom-manual "(message)Sending Variables") | |
78 :group 'message) | |
79 | |
80 (defgroup message-interface nil | |
81 "Message Interface" | |
82 :link '(custom-manual "(message)Interface") | |
83 :group 'message) | |
84 | |
85 (defgroup message-forwarding nil | |
86 "Message Forwarding" | |
87 :link '(custom-manual "(message)Forwarding") | |
88 :group 'message-interface) | |
89 | |
90 (defgroup message-insertion nil | |
91 "Message Insertion" | |
92 :link '(custom-manual "(message)Insertion") | |
93 :group 'message) | |
94 | |
95 (defgroup message-headers nil | |
96 "Message Headers" | |
97 :link '(custom-manual "(message)Message Headers") | |
98 :group 'message) | |
99 | |
100 (defgroup message-news nil | |
101 "Composing News Messages" | |
102 :group 'message) | |
103 | |
104 (defgroup message-mail nil | |
105 "Composing Mail Messages" | |
106 :group 'message) | |
107 | |
108 (defgroup message-faces nil | |
109 "Faces used for message composing." | |
110 :group 'message | |
111 :group 'faces) | |
112 | |
113 (defcustom message-directory "~/Mail/" | |
114 "*Directory from which all other mail file variables are derived." | |
115 :group 'message-various | |
116 :type 'directory) | |
117 | |
118 (defcustom message-max-buffers 10 | |
119 "*How many buffers to keep before starting to kill them off." | |
120 :group 'message-buffers | |
121 :type 'integer) | |
122 | |
123 (defcustom message-send-rename-function nil | |
124 "Function called to rename the buffer after sending it." | |
125 :group 'message-buffers | |
35147 | 126 :type '(choice function (const nil))) |
17493 | 127 |
128 (defcustom message-fcc-handler-function 'message-output | |
129 "*A function called to save outgoing articles. | |
130 This function will be called with the name of the file to store the | |
131 article in. The default function is `message-output' which saves in Unix | |
132 mailbox format." | |
133 :type '(radio (function-item message-output) | |
134 (function :tag "Other")) | |
135 :group 'message-sending) | |
136 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
137 (defcustom message-fcc-externalize-attachments nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
138 "If non-nil, attachments are included as external parts in Fcc copies." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
139 :type 'boolean |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
140 :group 'message-sending) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
141 |
17493 | 142 (defcustom message-courtesy-message |
143 "The following message is a courtesy copy of an article\nthat has been posted to %s as well.\n\n" | |
144 "*This is inserted at the start of a mailed copy of a posted message. | |
145 If the string contains the format spec \"%s\", the Newsgroups | |
146 the article has been posted to will be inserted there. | |
147 If this variable is nil, no such courtesy message will be added." | |
148 :group 'message-sending | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
149 :type '(radio (string :format "%t: %v\n" :size 0) (const nil))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
150 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
151 (defcustom message-ignored-bounced-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
152 "^\\(Received\\|Return-Path\\|Delivered-To\\):" |
17493 | 153 "*Regexp that matches headers to be removed in resent bounced mail." |
154 :group 'message-interface | |
155 :type 'regexp) | |
156 | |
157 ;;;###autoload | |
158 (defcustom message-from-style 'default | |
159 "*Specifies how \"From\" headers look. | |
160 | |
35147 | 161 If nil, they contain just the return address like: |
17493 | 162 king@grassland.com |
163 If `parens', they look like: | |
164 king@grassland.com (Elvis Parsley) | |
165 If `angles', they look like: | |
166 Elvis Parsley <king@grassland.com> | |
167 | |
168 Otherwise, most addresses look like `angles', but they look like | |
169 `parens' if `angles' would need quoting and `parens' would not." | |
170 :type '(choice (const :tag "simple" nil) | |
171 (const parens) | |
172 (const angles) | |
173 (const default)) | |
174 :group 'message-headers) | |
175 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
176 (defcustom message-insert-canlock t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
177 "Whether to insert a Cancel-Lock header in news postings." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
178 :version "21.3" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
179 :group 'message-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
180 :type 'boolean) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
181 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
182 (defcustom message-syntax-checks |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
183 (if message-insert-canlock '((sender . disabled)) nil) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
184 ;; Guess this one shouldn't be easy to customize... |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
185 "*Controls what syntax checks should not be performed on outgoing posts. |
17493 | 186 To disable checking of long signatures, for instance, add |
187 `(signature . disabled)' to this list. | |
188 | |
189 Don't touch this variable unless you really know what you're doing. | |
190 | |
35147 | 191 Checks include `subject-cmsg', `multiple-headers', `sendsys', |
192 `message-id', `from', `long-lines', `control-chars', `size', | |
193 `new-text', `quoting-style', `redirected-followup', `signature', | |
194 `approved', `sender', `empty', `empty-headers', `message-id', `from', | |
195 `subject', `shorten-followup-to', `existing-newsgroups', | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
196 `buffer-file-name', `unchanged', `newsgroups', `reply-to', |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
197 `continuation-headers', `long-header-lines', `invisible-text' and |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
198 `illegible-text'." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
199 :group 'message-news |
35147 | 200 :type '(repeat sexp)) ; Fixme: improve this |
17493 | 201 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
202 (defcustom message-required-headers '((optional . References) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
203 From) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
204 "*Headers to be generated or prompted for when sending a message. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
205 Also see `message-required-news-headers' and |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
206 `message-required-mail-headers'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
207 :group 'message-news |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
208 :group 'message-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
209 :link '(custom-manual "(message)Message Headers") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
210 :type '(repeat sexp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
211 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
212 (defcustom message-draft-headers '(References From) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
213 "*Headers to be generated when saving a draft message." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
214 :group 'message-news |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
215 :group 'message-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
216 :link '(custom-manual "(message)Message Headers") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
217 :type '(repeat sexp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
218 |
17493 | 219 (defcustom message-required-news-headers |
220 '(From Newsgroups Subject Date Message-ID | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
221 (optional . Organization) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
222 (optional . User-Agent)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
223 "*Headers to be generated or prompted for when posting an article. |
17493 | 224 RFC977 and RFC1036 require From, Date, Newsgroups, Subject, |
225 Message-ID. Organization, Lines, In-Reply-To, Expires, and | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
226 User-Agent are optional. If don't you want message to insert some |
17493 | 227 header, remove it from this list." |
228 :group 'message-news | |
229 :group 'message-headers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
230 :link '(custom-manual "(message)Message Headers") |
17493 | 231 :type '(repeat sexp)) |
232 | |
233 (defcustom message-required-mail-headers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
234 '(From Subject Date (optional . In-Reply-To) Message-ID |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
235 (optional . User-Agent)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
236 "*Headers to be generated or prompted for when mailing a message. |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
237 It is recommended that From, Date, To, Subject and Message-ID be |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
238 included. Organization and User-Agent are optional." |
17493 | 239 :group 'message-mail |
240 :group 'message-headers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
241 :link '(custom-manual "(message)Message Headers") |
17493 | 242 :type '(repeat sexp)) |
243 | |
244 (defcustom message-deletable-headers '(Message-ID Date Lines) | |
245 "Headers to be deleted if they already exist and were generated by message previously." | |
246 :group 'message-headers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
247 :link '(custom-manual "(message)Message Headers") |
17493 | 248 :type 'sexp) |
249 | |
250 (defcustom message-ignored-news-headers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
251 "^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:" |
17493 | 252 "*Regexp of headers to be removed unconditionally before posting." |
253 :group 'message-news | |
254 :group 'message-headers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
255 :link '(custom-manual "(message)Message Headers") |
17493 | 256 :type 'regexp) |
257 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
258 (defcustom message-ignored-mail-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
259 "^[GF]cc:\\|^Resent-Fcc:\\|^Xref:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:" |
17493 | 260 "*Regexp of headers to be removed unconditionally before mailing." |
261 :group 'message-mail | |
262 :group 'message-headers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
263 :link '(custom-manual "(message)Mail Headers") |
17493 | 264 :type 'regexp) |
265 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
266 (defcustom message-ignored-supersedes-headers "^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|^Received:\\|^X-From-Line:\\|^X-Trace:\\|^X-Complaints-To:\\|Return-Path:\\|^Supersedes:\\|^NNTP-Posting-Date:\\|^X-Trace:\\|^X-Complaints-To:\\|^Cancel-Lock:\\|^Cancel-Key:\\|^X-Hashcash:\\|^X-Payment:" |
17493 | 267 "*Header lines matching this regexp will be deleted before posting. |
268 It's best to delete old Path and Date headers before posting to avoid | |
269 any confusion." | |
270 :group 'message-interface | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
271 :link '(custom-manual "(message)Superseding") |
17493 | 272 :type 'regexp) |
273 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
274 (defcustom message-subject-re-regexp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
275 "^[ \t]*\\([Rr][Ee]\\(\\[[0-9]*\\]\\)*:[ \t]*\\)*[ \t]*" |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
276 "*Regexp matching \"Re: \" in the subject line." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
277 :group 'message-various |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
278 :link '(custom-manual "(message)Message Headers") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
279 :type 'regexp) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
280 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
281 ;;; Start of variables adopted from `message-utils.el'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
282 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
283 (defcustom message-subject-trailing-was-query 'ask |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
284 "*What to do with trailing \"(was: <old subject>)\" in subject lines. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
285 If nil, leave the subject unchanged. If it is the symbol `ask', query |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
286 the user what do do. In this case, the subject is matched against |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
287 `message-subject-trailing-was-ask-regexp'. If |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
288 `message-subject-trailing-was-query' is t, always strip the trailing |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
289 old subject. In this case, `message-subject-trailing-was-regexp' is |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
290 used." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
291 :type '(choice (const :tag "never" nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
292 (const :tag "always strip" t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
293 (const ask)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
294 :link '(custom-manual "(message)Message Headers") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
295 :group 'message-various) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
296 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
297 (defcustom message-subject-trailing-was-ask-regexp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
298 "[ \t]*\\([[(]+[Ww][Aa][Ss][ \t]*.*[\])]+\\)" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
299 "*Regexp matching \"(was: <old subject>)\" in the subject line. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
300 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
301 The function `message-strip-subject-trailing-was' uses this regexp if |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
302 `message-subject-trailing-was-query' is set to the symbol `ask'. If |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
303 the variable is t instead of `ask', use |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
304 `message-subject-trailing-was-regexp' instead. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
305 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
306 It is okay to create some false positives here, as the user is asked." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
307 :group 'message-various |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
308 :link '(custom-manual "(message)Message Headers") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
309 :type 'regexp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
310 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
311 (defcustom message-subject-trailing-was-regexp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
312 "[ \t]*\\((*[Ww][Aa][Ss]:[ \t]*.*)\\)" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
313 "*Regexp matching \"(was: <old subject>)\" in the subject line. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
314 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
315 If `message-subject-trailing-was-query' is set to t, the subject is |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
316 matched against `message-subject-trailing-was-regexp' in |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
317 `message-strip-subject-trailing-was'. You should use a regexp creating very |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
318 few false positives here." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
319 :group 'message-various |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
320 :link '(custom-manual "(message)Message Headers") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
321 :type 'regexp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
322 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
323 ;; Fixme: Why are all these things autoloaded? |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
324 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
325 ;;; marking inserted text |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
326 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
327 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
328 (defcustom message-mark-insert-begin |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
329 "--8<---------------cut here---------------start------------->8---\n" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
330 "How to mark the beginning of some inserted text." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
331 :type 'string |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
332 :link '(custom-manual "(message)Insertion Variables") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
333 :group 'message-various) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
334 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
335 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
336 (defcustom message-mark-insert-end |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
337 "--8<---------------cut here---------------end--------------->8---\n" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
338 "How to mark the end of some inserted text." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
339 :type 'string |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
340 :link '(custom-manual "(message)Insertion Variables") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
341 :group 'message-various) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
342 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
343 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
344 (defcustom message-archive-header |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
345 "X-No-Archive: Yes\n" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
346 "Header to insert when you don't want your article to be archived. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
347 Archives \(such as groups.google.com\) respect this header." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
348 :type 'string |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
349 :link '(custom-manual "(message)Header Commands") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
350 :group 'message-various) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
351 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
352 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
353 (defcustom message-archive-note |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
354 "X-No-Archive: Yes - save http://groups.google.com/" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
355 "Note to insert why you wouldn't want this posting archived. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
356 If nil, don't insert any text in the body." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
357 :type '(radio (string :format "%t: %v\n" :size 0) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
358 (const nil)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
359 :link '(custom-manual "(message)Header Commands") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
360 :group 'message-various) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
361 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
362 ;;; Crossposts and Followups |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
363 ;; inspired by JoH-followup-to by Jochem Huhman <joh at gmx.de> |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
364 ;; new suggestions by R. Weikusat <rw at another.de> |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
365 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
366 (defvar message-cross-post-old-target nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
367 "Old target for cross-posts or follow-ups.") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
368 (make-variable-buffer-local 'message-cross-post-old-target) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
369 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
370 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
371 (defcustom message-cross-post-default t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
372 "When non-nil `message-cross-post-followup-to' will perform a crosspost. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
373 If nil, `message-cross-post-followup-to' will only do a followup. Note that |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
374 you can explicitly override this setting by calling |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
375 `message-cross-post-followup-to' with a prefix." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
376 :type 'boolean |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
377 :group 'message-various) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
378 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
379 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
380 (defcustom message-cross-post-note |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
381 "Crosspost & Followup-To: " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
382 "Note to insert before signature to notify of cross-post and follow-up." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
383 :type 'string |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
384 :group 'message-various) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
385 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
386 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
387 (defcustom message-followup-to-note |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
388 "Followup-To: " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
389 "Note to insert before signature to notify of follow-up only." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
390 :type 'string |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
391 :group 'message-various) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
392 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
393 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
394 (defcustom message-cross-post-note-function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
395 'message-cross-post-insert-note |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
396 "Function to use to insert note about Crosspost or Followup-To. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
397 The function will be called with four arguments. The function should not only |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
398 insert a note, but also ensure old notes are deleted. See the documentation |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
399 for `message-cross-post-insert-note'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
400 :type 'function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
401 :group 'message-various) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
402 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
403 ;;; End of variables adopted from `message-utils.el'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
404 |
17493 | 405 ;;;###autoload |
406 (defcustom message-signature-separator "^-- *$" | |
407 "Regexp matching the signature separator." | |
408 :type 'regexp | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
409 :link '(custom-manual "(message)Various Message Variables") |
17493 | 410 :group 'message-various) |
411 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
412 (defcustom message-elide-ellipsis "\n[...]\n\n" |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
413 "*The string which is inserted for elided text." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
414 :type 'string |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
415 :link '(custom-manual "(message)Various Commands") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
416 :group 'message-various) |
17493 | 417 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
418 (defcustom message-interactive t |
17493 | 419 "Non-nil means when sending a message wait for and display errors. |
420 nil means let mailer mail back a message to report errors." | |
421 :group 'message-sending | |
422 :group 'message-mail | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
423 :link '(custom-manual "(message)Sending Variables") |
17493 | 424 :type 'boolean) |
425 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
426 (defcustom message-generate-new-buffers 'unique |
35147 | 427 "*Non-nil means create a new message buffer whenever `message-setup' is called. |
17493 | 428 If this is a function, call that function with three parameters: The type, |
429 the to address and the group name. (Any of these may be nil.) The function | |
430 should return the new buffer name." | |
431 :group 'message-buffers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
432 :link '(custom-manual "(message)Message Buffers") |
17493 | 433 :type '(choice (const :tag "off" nil) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
434 (const :tag "unique" unique) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
435 (const :tag "unsent" unsent) |
17493 | 436 (function fun))) |
437 | |
438 (defcustom message-kill-buffer-on-exit nil | |
439 "*Non-nil means that the message buffer will be killed after sending a message." | |
440 :group 'message-buffers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
441 :link '(custom-manual "(message)Message Buffers") |
17493 | 442 :type 'boolean) |
443 | |
33301
c1c373a70748
Put some defvars in eval-when-compile.
Dave Love <fx@gnu.org>
parents:
33199
diff
changeset
|
444 (eval-when-compile |
c1c373a70748
Put some defvars in eval-when-compile.
Dave Love <fx@gnu.org>
parents:
33199
diff
changeset
|
445 (defvar gnus-local-organization)) |
17493 | 446 (defcustom message-user-organization |
447 (or (and (boundp 'gnus-local-organization) | |
448 (stringp gnus-local-organization) | |
449 gnus-local-organization) | |
450 (getenv "ORGANIZATION") | |
451 t) | |
452 "*String to be used as an Organization header. | |
453 If t, use `message-user-organization-file'." | |
454 :group 'message-headers | |
455 :type '(choice string | |
456 (const :tag "consult file" t))) | |
457 | |
458 ;;;###autoload | |
459 (defcustom message-user-organization-file "/usr/lib/news/organization" | |
460 "*Local news organization file." | |
461 :type 'file | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
462 :link '(custom-manual "(message)News Headers") |
17493 | 463 :group 'message-headers) |
464 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
465 (defcustom message-make-forward-subject-function |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
466 #'message-forward-subject-name-subject |
35147 | 467 "*List of functions called to generate subject headers for forwarded messages. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
468 The subject generated by the previous function is passed into each |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
469 successive function. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
470 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
471 The provided functions are: |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
472 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
473 * `message-forward-subject-author-subject' Source of article (author or |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
474 newsgroup), in brackets followed by the subject |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
475 * `message-forward-subject-name-subject' Source of article (name of author |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
476 or newsgroup), in brackets followed by the subject |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
477 * `message-forward-subject-fwd' Subject of article with 'Fwd:' prepended |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
478 to it." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
479 :group 'message-forwarding |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
480 :link '(custom-manual "(message)Forwarding") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
481 :type '(radio (function-item message-forward-subject-author-subject) |
35147 | 482 (function-item message-forward-subject-fwd) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
483 (function-item message-forward-subject-name-subject) |
35147 | 484 (repeat :tag "List of functions" function))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
485 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
486 (defcustom message-forward-as-mime t |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
487 "*Non-nil means forward messages as an inline/rfc822 MIME section. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
488 Otherwise, directly inline the old message in the forwarded message." |
33400
42c1ba3caf9c
(message-forward-as-mime, message-forward-ignored-headers)
Dave Love <fx@gnu.org>
parents:
33375
diff
changeset
|
489 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
490 :group 'message-forwarding |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
491 :link '(custom-manual "(message)Forwarding") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
492 :type 'boolean) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
493 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
494 (defcustom message-forward-show-mml 'best |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
495 "*Non-nil means show forwarded messages as MML (decoded from MIME). |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
496 Otherwise, forwarded messages are unchanged. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
497 Can also be the symbol `best' to indicate that MML should be |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
498 used, except when it is a bad idea to use MML. One example where |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
499 it is a bad idea is when forwarding a signed or encrypted |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
500 message, because converting MIME to MML would invalidate the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
501 digital signature." |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
502 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
503 :group 'message-forwarding |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
504 :type '(choice (const :tag "use MML" t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
505 (const :tag "don't use MML " nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
506 (const :tag "use MML when appropriate" best))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
507 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
508 (defcustom message-forward-before-signature t |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
509 "*Non-nil means put forwarded message before signature, else after." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
510 :group 'message-forwarding |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
511 :type 'boolean) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
512 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
513 (defcustom message-wash-forwarded-subjects nil |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
514 "*Non-nil means try to remove as much cruft as possible from the subject. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
515 Done before generating the new subject of a forward." |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
516 :group 'message-forwarding |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
517 :link '(custom-manual "(message)Forwarding") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
518 :type 'boolean) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
519 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
520 (defcustom message-ignored-resent-headers "^Return-receipt\\|^X-Gnus\\|^Gnus-Warning:\\|^>?From " |
17493 | 521 "*All headers that match this regexp will be deleted when resending a message." |
522 :group 'message-interface | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
523 :link '(custom-manual "(message)Resending") |
17493 | 524 :type 'regexp) |
525 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
526 (defcustom message-forward-ignored-headers "^Content-Transfer-Encoding:\\|^X-Gnus" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
527 "*All headers that match this regexp will be deleted when forwarding a message." |
33400
42c1ba3caf9c
(message-forward-as-mime, message-forward-ignored-headers)
Dave Love <fx@gnu.org>
parents:
33375
diff
changeset
|
528 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
529 :group 'message-forwarding |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
530 :type '(choice (const :tag "None" nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
531 regexp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
532 |
17493 | 533 (defcustom message-ignored-cited-headers "." |
534 "*Delete these headers from the messages you yank." | |
535 :group 'message-insertion | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
536 :link '(custom-manual "(message)Insertion Variables") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
537 :type 'regexp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
538 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
539 (defcustom message-cite-prefix-regexp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
540 (if (string-match "[[:digit:]]" "1") ;; support POSIX? |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
541 "\\([ \t]*[-_.[:word:]]+>+\\|[ \t]*[]>|}+]\\)+" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
542 ;; ?-, ?_ or ?. MUST NOT be in syntax entry w. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
543 (let ((old-table (syntax-table)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
544 non-word-constituents) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
545 (set-syntax-table text-mode-syntax-table) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
546 (setq non-word-constituents |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
547 (concat |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
548 (if (string-match "\\w" "-") "" "-") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
549 (if (string-match "\\w" "_") "" "_") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
550 (if (string-match "\\w" ".") "" "."))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
551 (set-syntax-table old-table) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
552 (if (equal non-word-constituents "") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
553 "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>|}+]\\)+" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
554 (concat "\\([ \t]*\\(\\w\\|[" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
555 non-word-constituents |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
556 "]\\)+>+\\|[ \t]*[]>|}+]\\)+")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
557 "*Regexp matching the longest possible citation prefix on a line." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
558 :group 'message-insertion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
559 :link '(custom-manual "(message)Insertion Variables") |
17493 | 560 :type 'regexp) |
561 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
562 (defcustom message-cancel-message "I am canceling my own article.\n" |
17493 | 563 "Message to be inserted in the cancel message." |
564 :group 'message-interface | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
565 :link '(custom-manual "(message)Canceling News") |
17493 | 566 :type 'string) |
567 | |
568 ;; Useful to set in site-init.el | |
569 ;;;###autoload | |
570 (defcustom message-send-mail-function 'message-send-mail-with-sendmail | |
571 "Function to call to send the current buffer as mail. | |
572 The headers should be delimited by a line whose contents match the | |
573 variable `mail-header-separator'. | |
574 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
575 Valid values include `message-send-mail-with-sendmail' (the default), |
35147 | 576 `message-send-mail-with-mh', `message-send-mail-with-qmail', |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
577 `message-smtpmail-send-it', `smtpmail-send-it' and `feedmail-send-it'. |
35147 | 578 |
579 See also `send-mail-function'." | |
17493 | 580 :type '(radio (function-item message-send-mail-with-sendmail) |
581 (function-item message-send-mail-with-mh) | |
582 (function-item message-send-mail-with-qmail) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
583 (function-item message-smtpmail-send-it) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
584 (function-item smtpmail-send-it) |
35147 | 585 (function-item feedmail-send-it) |
17493 | 586 (function :tag "Other")) |
587 :group 'message-sending | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
588 :link '(custom-manual "(message)Mail Variables") |
17493 | 589 :group 'message-mail) |
590 | |
591 (defcustom message-send-news-function 'message-send-news | |
592 "Function to call to send the current buffer as news. | |
593 The headers should be delimited by a line whose contents match the | |
594 variable `mail-header-separator'." | |
595 :group 'message-sending | |
596 :group 'message-news | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
597 :link '(custom-manual "(message)News Variables") |
17493 | 598 :type 'function) |
599 | |
600 (defcustom message-reply-to-function nil | |
35147 | 601 "If non-nil, function that should return a list of headers. |
17493 | 602 This function should pick out addresses from the To, Cc, and From headers |
603 and respond with new To and Cc headers." | |
604 :group 'message-interface | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
605 :link '(custom-manual "(message)Reply") |
35147 | 606 :type '(choice function (const nil))) |
17493 | 607 |
608 (defcustom message-wide-reply-to-function nil | |
35147 | 609 "If non-nil, function that should return a list of headers. |
17493 | 610 This function should pick out addresses from the To, Cc, and From headers |
611 and respond with new To and Cc headers." | |
612 :group 'message-interface | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
613 :link '(custom-manual "(message)Wide Reply") |
35147 | 614 :type '(choice function (const nil))) |
17493 | 615 |
616 (defcustom message-followup-to-function nil | |
35147 | 617 "If non-nil, function that should return a list of headers. |
17493 | 618 This function should pick out addresses from the To, Cc, and From headers |
619 and respond with new To and Cc headers." | |
620 :group 'message-interface | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
621 :link '(custom-manual "(message)Followup") |
35147 | 622 :type '(choice function (const nil))) |
17493 | 623 |
624 (defcustom message-use-followup-to 'ask | |
625 "*Specifies what to do with Followup-To header. | |
626 If nil, always ignore the header. If it is t, use its value, but | |
627 query before using the \"poster\" value. If it is the symbol `ask', | |
628 always query the user whether to use the value. If it is the symbol | |
629 `use', always use the value." | |
630 :group 'message-interface | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
631 :link '(custom-manual "(message)Followup") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
632 :type '(choice (const :tag "ignore" nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
633 (const :tag "use & query" t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
634 (const use) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
635 (const ask))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
636 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
637 (defcustom message-use-mail-followup-to 'use |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
638 "*Specifies what to do with Mail-Followup-To header. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
639 If nil, always ignore the header. If it is the symbol `ask', always |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
640 query the user whether to use the value. If it is the symbol `use', |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
641 always use the value." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
642 :group 'message-interface |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
643 :link '(custom-manual "(message)Mailing Lists") |
17493 | 644 :type '(choice (const :tag "ignore" nil) |
645 (const use) | |
646 (const ask))) | |
647 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
648 (defcustom message-subscribed-address-functions nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
649 "*Specifies functions for determining list subscription. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
650 If nil, do not attempt to determine list subscription with functions. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
651 If non-nil, this variable contains a list of functions which return |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
652 regular expressions to match lists. These functions can be used in |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
653 conjunction with `message-subscribed-regexps' and |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
654 `message-subscribed-addresses'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
655 :group 'message-interface |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
656 :link '(custom-manual "(message)Mailing Lists") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
657 :type '(repeat sexp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
658 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
659 (defcustom message-subscribed-address-file nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
660 "*A file containing addresses the user is subscribed to. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
661 If nil, do not look at any files to determine list subscriptions. If |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
662 non-nil, each line of this file should be a mailing list address." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
663 :group 'message-interface |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
664 :link '(custom-manual "(message)Mailing Lists") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
665 :type '(radio (file :format "%t: %v\n" :size 0) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
666 (const nil))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
667 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
668 (defcustom message-subscribed-addresses nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
669 "*Specifies a list of addresses the user is subscribed to. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
670 If nil, do not use any predefined list subscriptions. This list of |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
671 addresses can be used in conjunction with |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
672 `message-subscribed-address-functions' and `message-subscribed-regexps'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
673 :group 'message-interface |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
674 :link '(custom-manual "(message)Mailing Lists") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
675 :type '(repeat string)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
676 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
677 (defcustom message-subscribed-regexps nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
678 "*Specifies a list of addresses the user is subscribed to. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
679 If nil, do not use any predefined list subscriptions. This list of |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
680 regular expressions can be used in conjunction with |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
681 `message-subscribed-address-functions' and `message-subscribed-addresses'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
682 :group 'message-interface |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
683 :link '(custom-manual "(message)Mailing Lists") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
684 :type '(repeat regexp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
685 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
686 (defcustom message-allow-no-recipients 'ask |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
687 "Specifies what to do when there are no recipients other than Gcc/Fcc. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
688 If it is the symbol `always', the posting is allowed. If it is the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
689 symbol `never', the posting is not allowed. If it is the symbol |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
690 `ask', you are prompted." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
691 :group 'message-interface |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
692 :link '(custom-manual "(message)Message Headers") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
693 :type '(choice (const always) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
694 (const never) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
695 (const ask))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
696 |
17493 | 697 (defcustom message-sendmail-f-is-evil nil |
35147 | 698 "*Non-nil means don't add \"-f username\" to the sendmail command line. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
699 Doing so would be even more evil than leaving it out." |
17493 | 700 :group 'message-sending |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
701 :link '(custom-manual "(message)Mail Variables") |
17493 | 702 :type 'boolean) |
703 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
704 (defcustom message-sendmail-envelope-from nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
705 "*Envelope-from when sending mail with sendmail. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
706 If this is nil, use `user-mail-address'. If it is the symbol |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
707 `header', use the From: header of the message." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
708 :type '(choice (string :tag "From name") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
709 (const :tag "Use From: header from message" header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
710 (const :tag "Use `user-mail-address'" nil)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
711 :link '(custom-manual "(message)Mail Variables") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
712 :group 'message-sending) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
713 |
17493 | 714 ;; qmail-related stuff |
715 (defcustom message-qmail-inject-program "/var/qmail/bin/qmail-inject" | |
716 "Location of the qmail-inject program." | |
717 :group 'message-sending | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
718 :link '(custom-manual "(message)Mail Variables") |
17493 | 719 :type 'file) |
720 | |
721 (defcustom message-qmail-inject-args nil | |
722 "Arguments passed to qmail-inject programs. | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
723 This should be a list of strings, one string for each argument. It |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
724 may also be a function. |
17493 | 725 |
726 For e.g., if you wish to set the envelope sender address so that bounces | |
727 go to the right place or to deal with listserv's usage of that address, you | |
728 might set this variable to '(\"-f\" \"you@some.where\")." | |
729 :group 'message-sending | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
730 :link '(custom-manual "(message)Mail Variables") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
731 :type '(choice (function) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
732 (repeat string))) |
17493 | 733 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
734 (defvar message-cater-to-broken-inn t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
735 "Non-nil means Gnus should not fold the `References' header. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
736 Folding `References' makes ancient versions of INN create incorrect |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
737 NOV lines.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
738 |
33301
c1c373a70748
Put some defvars in eval-when-compile.
Dave Love <fx@gnu.org>
parents:
33199
diff
changeset
|
739 (eval-when-compile |
c1c373a70748
Put some defvars in eval-when-compile.
Dave Love <fx@gnu.org>
parents:
33199
diff
changeset
|
740 (defvar gnus-post-method) |
c1c373a70748
Put some defvars in eval-when-compile.
Dave Love <fx@gnu.org>
parents:
33199
diff
changeset
|
741 (defvar gnus-select-method)) |
17493 | 742 (defcustom message-post-method |
743 (cond ((and (boundp 'gnus-post-method) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
744 (listp gnus-post-method) |
17493 | 745 gnus-post-method) |
746 gnus-post-method) | |
747 ((boundp 'gnus-select-method) | |
748 gnus-select-method) | |
749 (t '(nnspool ""))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
750 "*Method used to post news. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
751 Note that when posting from inside Gnus, for instance, this |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
752 variable isn't used." |
17493 | 753 :group 'message-news |
754 :group 'message-sending | |
755 ;; This should be the `gnus-select-method' widget, but that might | |
756 ;; create a dependence to `gnus.el'. | |
757 :type 'sexp) | |
758 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
759 ;; FIXME: This should be a temporary workaround until someone implements a |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
760 ;; proper solution. If a crash happens while replying, the auto-save file |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
761 ;; will *not* have a `References:' header if `message-generate-headers-first' |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
762 ;; is nil. See: http://article.gmane.org/gmane.emacs.gnus.general/51138 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
763 (defcustom message-generate-headers-first '(references) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
764 "Which headers should be generated before starting to compose a message. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
765 If `t', generate all required headers. This can also be a list of headers to |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
766 generate. The variables `message-required-news-headers' and |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
767 `message-required-mail-headers' specify which headers to generate. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
768 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
769 Note that the variable `message-deletable-headers' specifies headers which |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
770 are to be deleted and then re-generated before sending, so this variable |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
771 will not have a visible effect for those headers." |
17493 | 772 :group 'message-headers |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
773 :link '(custom-manual "(message)Message Headers") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
774 :type '(choice (const :tag "None" nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
775 (const :tag "References" '(references)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
776 (const :tag "All" t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
777 (repeat (sexp :tag "Header")))) |
17493 | 778 |
779 (defcustom message-setup-hook nil | |
780 "Normal hook, run each time a new outgoing message is initialized. | |
781 The function `message-setup' runs this hook." | |
782 :group 'message-various | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
783 :link '(custom-manual "(message)Various Message Variables") |
17493 | 784 :type 'hook) |
785 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
786 (defcustom message-cancel-hook nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
787 "Hook run when cancelling articles." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
788 :group 'message-various |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
789 :link '(custom-manual "(message)Various Message Variables") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
790 :type 'hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
791 |
17493 | 792 (defcustom message-signature-setup-hook nil |
793 "Normal hook, run each time a new outgoing message is initialized. | |
794 It is run after the headers have been inserted and before | |
795 the signature is inserted." | |
796 :group 'message-various | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
797 :link '(custom-manual "(message)Various Message Variables") |
17493 | 798 :type 'hook) |
799 | |
800 (defcustom message-mode-hook nil | |
801 "Hook run in message mode buffers." | |
802 :group 'message-various | |
803 :type 'hook) | |
804 | |
805 (defcustom message-header-hook nil | |
806 "Hook run in a message mode buffer narrowed to the headers." | |
807 :group 'message-various | |
808 :type 'hook) | |
809 | |
810 (defcustom message-header-setup-hook nil | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
811 "Hook called narrowed to the headers when setting up a message buffer." |
17493 | 812 :group 'message-various |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
813 :link '(custom-manual "(message)Various Message Variables") |
17493 | 814 :type 'hook) |
815 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
816 (defcustom message-minibuffer-local-map |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
817 (let ((map (make-sparse-keymap 'message-minibuffer-local-map))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
818 (set-keymap-parent map minibuffer-local-map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
819 map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
820 "Keymap for `message-read-from-minibuffer'.") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
821 |
17493 | 822 ;;;###autoload |
823 (defcustom message-citation-line-function 'message-insert-citation-line | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
824 "*Function called to insert the \"Whomever writes:\" line. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
825 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
826 Note that Gnus provides a feature where the reader can click on |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
827 `writes:' to hide the cited text. If you change this line too much, |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
828 people who read your message will have to change their Gnus |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
829 configuration. See the variable `gnus-cite-attribution-suffix'." |
17493 | 830 :type 'function |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
831 :link '(custom-manual "(message)Insertion Variables") |
17493 | 832 :group 'message-insertion) |
833 | |
834 ;;;###autoload | |
835 (defcustom message-yank-prefix "> " | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
836 "*Prefix inserted on the lines of yanked messages. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
837 Fix `message-cite-prefix-regexp' if it is set to an abnormal value. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
838 See also `message-yank-cited-prefix'." |
17493 | 839 :type 'string |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
840 :link '(custom-manual "(message)Insertion Variables") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
841 :group 'message-insertion) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
842 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
843 (defcustom message-yank-cited-prefix ">" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
844 "*Prefix inserted on cited or empty lines of yanked messages. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
845 Fix `message-cite-prefix-regexp' if it is set to an abnormal value. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
846 See also `message-yank-prefix'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
847 :type 'string |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
848 :link '(custom-manual "(message)Insertion Variables") |
17493 | 849 :group 'message-insertion) |
850 | |
851 (defcustom message-indentation-spaces 3 | |
852 "*Number of spaces to insert at the beginning of each cited line. | |
853 Used by `message-yank-original' via `message-yank-cite'." | |
854 :group 'message-insertion | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
855 :link '(custom-manual "(message)Insertion Variables") |
17493 | 856 :type 'integer) |
857 | |
858 ;;;###autoload | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
859 (defcustom message-cite-function 'message-cite-original |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
860 "*Function for citing an original message. |
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
861 Predefined functions include `message-cite-original' and |
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
862 `message-cite-original-without-signature'. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
863 Note that `message-cite-original' uses `mail-citation-hook' if that is non-nil." |
17493 | 864 :type '(radio (function-item message-cite-original) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
865 (function-item message-cite-original-without-signature) |
17493 | 866 (function-item sc-cite-original) |
867 (function :tag "Other")) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
868 :link '(custom-manual "(message)Insertion Variables") |
17493 | 869 :group 'message-insertion) |
870 | |
871 ;;;###autoload | |
872 (defcustom message-indent-citation-function 'message-indent-citation | |
873 "*Function for modifying a citation just inserted in the mail buffer. | |
874 This can also be a list of functions. Each function can find the | |
875 citation between (point) and (mark t). And each function should leave | |
876 point and mark around the citation text as modified." | |
877 :type 'function | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
878 :link '(custom-manual "(message)Insertion Variables") |
17493 | 879 :group 'message-insertion) |
880 | |
881 ;;;###autoload | |
882 (defcustom message-signature t | |
883 "*String to be inserted at the end of the message buffer. | |
884 If t, the `message-signature-file' file will be inserted instead. | |
885 If a function, the result from the function will be used instead. | |
886 If a form, the result from the form will be used instead." | |
887 :type 'sexp | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
888 :link '(custom-manual "(message)Insertion Variables") |
17493 | 889 :group 'message-insertion) |
890 | |
891 ;;;###autoload | |
892 (defcustom message-signature-file "~/.signature" | |
36036
dcbe0206da25
(message-signature-file): Fix doc, :type.
Dave Love <fx@gnu.org>
parents:
35957
diff
changeset
|
893 "*Name of file containing the text inserted at end of message buffer. |
dcbe0206da25
(message-signature-file): Fix doc, :type.
Dave Love <fx@gnu.org>
parents:
35957
diff
changeset
|
894 Ignored if the named file doesn't exist. |
dcbe0206da25
(message-signature-file): Fix doc, :type.
Dave Love <fx@gnu.org>
parents:
35957
diff
changeset
|
895 If nil, don't insert a signature." |
dcbe0206da25
(message-signature-file): Fix doc, :type.
Dave Love <fx@gnu.org>
parents:
35957
diff
changeset
|
896 :type '(choice file (const :tags "None" nil)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
897 :link '(custom-manual "(message)Insertion Variables") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
898 :group 'message-insertion) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
899 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
900 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
901 (defcustom message-signature-insert-empty-line t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
902 "*If non-nil, insert an empty line before the signature separator." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
903 :type 'boolean |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
904 :link '(custom-manual "(message)Insertion Variables") |
17493 | 905 :group 'message-insertion) |
906 | |
907 (defcustom message-distribution-function nil | |
908 "*Function called to return a Distribution header." | |
909 :group 'message-news | |
910 :group 'message-headers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
911 :link '(custom-manual "(message)News Headers") |
35147 | 912 :type '(choice function (const nil))) |
17493 | 913 |
914 (defcustom message-expires 14 | |
915 "Number of days before your article expires." | |
916 :group 'message-news | |
917 :group 'message-headers | |
918 :link '(custom-manual "(message)News Headers") | |
919 :type 'integer) | |
920 | |
921 (defcustom message-user-path nil | |
922 "If nil, use the NNTP server name in the Path header. | |
923 If stringp, use this; if non-nil, use no host name (user name only)." | |
924 :group 'message-news | |
925 :group 'message-headers | |
926 :link '(custom-manual "(message)News Headers") | |
927 :type '(choice (const :tag "nntp" nil) | |
928 (string :tag "name") | |
929 (sexp :tag "none" :format "%t" t))) | |
930 | |
931 (defvar message-reply-buffer nil) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
932 (defvar message-reply-headers nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
933 "The headers of the current replied article. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
934 It is a vector of the following headers: |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
935 \[number subject from date id references chars lines xref extra].") |
17493 | 936 (defvar message-newsreader nil) |
937 (defvar message-mailer nil) | |
938 (defvar message-sent-message-via nil) | |
939 (defvar message-checksum nil) | |
940 (defvar message-send-actions nil | |
941 "A list of actions to be performed upon successful sending of a message.") | |
942 (defvar message-exit-actions nil | |
943 "A list of actions to be performed upon exiting after sending a message.") | |
944 (defvar message-kill-actions nil | |
945 "A list of actions to be performed before killing a message buffer.") | |
946 (defvar message-postpone-actions nil | |
947 "A list of actions to be performed after postponing a message.") | |
948 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
949 (define-widget 'message-header-lines 'text |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
950 "All header lines must be LFD terminated." |
33982
ff339ba39162
(message-header-lines): Fontify tag.
Miles Bader <miles@gnu.org>
parents:
33768
diff
changeset
|
951 :format "%{%t%}:%n%v" |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
952 :valid-regexp "^\\'" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
953 :error "All header lines must be newline terminated") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
954 |
17493 | 955 (defcustom message-default-headers "" |
956 "*A string containing header lines to be inserted in outgoing messages. | |
957 It is inserted before you edit the message, so you can edit or delete | |
958 these lines." | |
959 :group 'message-headers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
960 :link '(custom-manual "(message)Message Headers") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
961 :type 'message-header-lines) |
17493 | 962 |
963 (defcustom message-default-mail-headers "" | |
964 "*A string of header lines to be inserted in outgoing mails." | |
965 :group 'message-headers | |
966 :group 'message-mail | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
967 :link '(custom-manual "(message)Mail Headers") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
968 :type 'message-header-lines) |
17493 | 969 |
970 (defcustom message-default-news-headers "" | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
971 "*A string of header lines to be inserted in outgoing news articles." |
17493 | 972 :group 'message-headers |
973 :group 'message-news | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
974 :link '(custom-manual "(message)News Headers") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
975 :type 'message-header-lines) |
17493 | 976 |
977 ;; Note: could use /usr/ucb/mail instead of sendmail; | |
978 ;; options -t, and -v if not interactive. | |
979 (defcustom message-mailer-swallows-blank-line | |
980 (if (and (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)" | |
981 system-configuration) | |
982 (file-readable-p "/etc/sendmail.cf") | |
983 (let ((buffer (get-buffer-create " *temp*"))) | |
984 (unwind-protect | |
985 (save-excursion | |
986 (set-buffer buffer) | |
987 (insert-file-contents "/etc/sendmail.cf") | |
988 (goto-char (point-min)) | |
989 (let ((case-fold-search nil)) | |
990 (re-search-forward "^OR\\>" nil t))) | |
991 (kill-buffer buffer)))) | |
992 ;; According to RFC822, "The field-name must be composed of printable | |
993 ;; ASCII characters (i. e., characters that have decimal values between | |
994 ;; 33 and 126, except colon)", i. e., any chars except ctl chars, | |
995 ;; space, or colon. | |
996 '(looking-at "[ \t]\\|[][!\"#$%&'()*+,-./0-9;<=>?@A-Z\\\\^_`a-z{|}~]+:")) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
997 "*Set this non-nil if the system's mailer runs the header and body together. |
17493 | 998 \(This problem exists on Sunos 4 when sendmail is run in remote mode.) |
999 The value should be an expression to test whether the problem will | |
1000 actually occur." | |
1001 :group 'message-sending | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1002 :link '(custom-manual "(message)Mail Variables") |
17493 | 1003 :type 'sexp) |
1004 | |
19481
4d492290e085
(message-user-agent): Add autoload cookie.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
1005 ;;;###autoload |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1006 (define-mail-user-agent 'message-user-agent |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1007 'message-mail 'message-send-and-exit |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1008 'message-kill-buffer 'message-send-hook) |
17493 | 1009 |
1010 (defvar message-mh-deletable-headers '(Message-ID Date Lines Sender) | |
1011 "If non-nil, delete the deletable headers before feeding to mh.") | |
1012 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1013 (defvar message-send-method-alist |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1014 '((news message-news-p message-send-via-news) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1015 (mail message-mail-p message-send-via-mail)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1016 "Alist of ways to send outgoing messages. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1017 Each element has the form |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1018 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1019 \(TYPE PREDICATE FUNCTION) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1020 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1021 where TYPE is a symbol that names the method; PREDICATE is a function |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1022 called without any parameters to determine whether the message is |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1023 a message of type TYPE; and FUNCTION is a function to be called if |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1024 PREDICATE returns non-nil. FUNCTION is called with one parameter -- |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1025 the prefix.") |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1026 |
34058
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1027 (defcustom message-mail-alias-type 'abbrev |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1028 "*What alias expansion type to use in Message buffers. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1029 The default is `abbrev', which uses mailabbrev. nil switches |
34058
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1030 mail aliases off." |
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1031 :group 'message |
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1032 :link '(custom-manual "(message)Mail Aliases") |
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1033 :type '(choice (const :tag "Use Mailabbrev" abbrev) |
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1034 (const :tag "No expansion" nil))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1035 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1036 (defcustom message-auto-save-directory |
34057
98bd49d8cf7d
(message-auto-save-directory): Use
Dave Love <fx@gnu.org>
parents:
33982
diff
changeset
|
1037 (file-name-as-directory (nnheader-concat message-directory "drafts")) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1038 "*Directory where Message auto-saves buffers if Gnus isn't running. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1039 If nil, Message won't auto-save." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1040 :group 'message-buffers |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1041 :link '(custom-manual "(message)Various Message Variables") |
35147 | 1042 :type '(choice directory (const :tag "Don't auto-save" nil))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1043 |
35147 | 1044 (defcustom message-default-charset |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1045 (and (not (mm-multibyte-p)) 'iso-8859-1) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1046 "Default charset used in non-MULE Emacsen. |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1047 If nil, you might be asked to input the charset." |
33400
42c1ba3caf9c
(message-forward-as-mime, message-forward-ignored-headers)
Dave Love <fx@gnu.org>
parents:
33375
diff
changeset
|
1048 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1049 :group 'message |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1050 :link '(custom-manual "(message)Various Message Variables") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1051 :type 'symbol) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1052 |
35147 | 1053 (defcustom message-dont-reply-to-names |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1054 (and (boundp 'rmail-dont-reply-to-names) rmail-dont-reply-to-names) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1055 "*A regexp specifying addresses to prune when doing wide replies. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1056 A value of nil means exclude your own user name only." |
33400
42c1ba3caf9c
(message-forward-as-mime, message-forward-ignored-headers)
Dave Love <fx@gnu.org>
parents:
33375
diff
changeset
|
1057 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1058 :group 'message |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1059 :link '(custom-manual "(message)Wide Reply") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1060 :type '(choice (const :tag "Yourself" nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1061 regexp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1062 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1063 (defvar message-shoot-gnksa-feet nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1064 "*A list of GNKSA feet you are allowed to shoot. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1065 Gnus gives you all the opportunity you could possibly want for |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1066 shooting yourself in the foot. Also, Gnus allows you to shoot the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1067 feet of Good Net-Keeping Seal of Approval. The following are foot |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1068 candidates: |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1069 `empty-article' Allow you to post an empty article; |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1070 `quoted-text-only' Allow you to post quoted text only; |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1071 `multiple-copies' Allow you to post multiple copies; |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1072 `cancel-messages' Allow you to cancel or supersede messages from |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1073 your other email addresses.") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1074 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1075 (defsubst message-gnksa-enable-p (feature) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1076 (or (not (listp message-shoot-gnksa-feet)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1077 (memq feature message-shoot-gnksa-feet))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1078 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1079 (defcustom message-hidden-headers nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1080 "Regexp of headers to be hidden when composing new messages. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1081 This can also be a list of regexps to match headers. Or a list |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1082 starting with `not' and followed by regexps." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1083 :group 'message |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1084 :link '(custom-manual "(message)Message Headers") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1085 :type '(repeat regexp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1086 |
17493 | 1087 ;;; Internal variables. |
1088 ;;; Well, not really internal. | |
1089 | |
1090 (defvar message-mode-syntax-table | |
1091 (let ((table (copy-syntax-table text-mode-syntax-table))) | |
1092 (modify-syntax-entry ?% ". " table) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1093 (modify-syntax-entry ?> ". " table) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1094 (modify-syntax-entry ?< ". " table) |
17493 | 1095 table) |
1096 "Syntax table used while in Message mode.") | |
1097 | |
1098 (defface message-header-to-face | |
1099 '((((class color) | |
1100 (background dark)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1101 (:foreground "green2" :bold t)) |
17493 | 1102 (((class color) |
1103 (background light)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1104 (:foreground "MidnightBlue" :bold t)) |
17493 | 1105 (t |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1106 (:bold t :italic t))) |
17493 | 1107 "Face used for displaying From headers." |
1108 :group 'message-faces) | |
1109 | |
1110 (defface message-header-cc-face | |
1111 '((((class color) | |
1112 (background dark)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1113 (:foreground "green4" :bold t)) |
17493 | 1114 (((class color) |
1115 (background light)) | |
1116 (:foreground "MidnightBlue")) | |
1117 (t | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1118 (:bold t))) |
17493 | 1119 "Face used for displaying Cc headers." |
1120 :group 'message-faces) | |
1121 | |
1122 (defface message-header-subject-face | |
1123 '((((class color) | |
1124 (background dark)) | |
1125 (:foreground "green3")) | |
1126 (((class color) | |
1127 (background light)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1128 (:foreground "navy blue" :bold t)) |
17493 | 1129 (t |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1130 (:bold t))) |
17493 | 1131 "Face used for displaying subject headers." |
1132 :group 'message-faces) | |
1133 | |
1134 (defface message-header-newsgroups-face | |
1135 '((((class color) | |
1136 (background dark)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1137 (:foreground "yellow" :bold t :italic t)) |
17493 | 1138 (((class color) |
1139 (background light)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1140 (:foreground "blue4" :bold t :italic t)) |
17493 | 1141 (t |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1142 (:bold t :italic t))) |
17493 | 1143 "Face used for displaying newsgroups headers." |
1144 :group 'message-faces) | |
1145 | |
1146 (defface message-header-other-face | |
1147 '((((class color) | |
1148 (background dark)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1149 (:foreground "#b00000")) |
17493 | 1150 (((class color) |
1151 (background light)) | |
1152 (:foreground "steel blue")) | |
1153 (t | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1154 (:bold t :italic t))) |
17493 | 1155 "Face used for displaying newsgroups headers." |
1156 :group 'message-faces) | |
1157 | |
1158 (defface message-header-name-face | |
1159 '((((class color) | |
1160 (background dark)) | |
1161 (:foreground "DarkGreen")) | |
1162 (((class color) | |
1163 (background light)) | |
1164 (:foreground "cornflower blue")) | |
1165 (t | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1166 (:bold t))) |
17493 | 1167 "Face used for displaying header names." |
1168 :group 'message-faces) | |
1169 | |
1170 (defface message-header-xheader-face | |
1171 '((((class color) | |
1172 (background dark)) | |
1173 (:foreground "blue")) | |
1174 (((class color) | |
1175 (background light)) | |
1176 (:foreground "blue")) | |
1177 (t | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1178 (:bold t))) |
17493 | 1179 "Face used for displaying X-Header headers." |
1180 :group 'message-faces) | |
1181 | |
1182 (defface message-separator-face | |
1183 '((((class color) | |
1184 (background dark)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1185 (:foreground "blue3")) |
17493 | 1186 (((class color) |
1187 (background light)) | |
1188 (:foreground "brown")) | |
1189 (t | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1190 (:bold t))) |
17493 | 1191 "Face used for displaying the separator." |
1192 :group 'message-faces) | |
1193 | |
1194 (defface message-cited-text-face | |
1195 '((((class color) | |
1196 (background dark)) | |
1197 (:foreground "red")) | |
1198 (((class color) | |
1199 (background light)) | |
1200 (:foreground "red")) | |
1201 (t | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1202 (:bold t))) |
17493 | 1203 "Face used for displaying cited text names." |
1204 :group 'message-faces) | |
1205 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1206 (defface message-mml-face |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1207 '((((class color) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1208 (background dark)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1209 (:foreground "ForestGreen")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1210 (((class color) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1211 (background light)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1212 (:foreground "ForestGreen")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1213 (t |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1214 (:bold t))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1215 "Face used for displaying MML." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1216 :group 'message-faces) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1217 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1218 (defun message-font-lock-make-header-matcher (regexp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1219 (let ((form |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1220 `(lambda (limit) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1221 (let ((start (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1222 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1223 (widen) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1224 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1225 (if (re-search-forward |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1226 (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:
54287
diff
changeset
|
1227 nil t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1228 (setq limit (min limit (match-beginning 0)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1229 (goto-char start)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1230 (and (< start limit) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1231 (re-search-forward ,regexp limit t)))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1232 (if (featurep 'bytecomp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1233 (byte-compile form) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1234 form))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1235 |
17493 | 1236 (defvar message-font-lock-keywords |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1237 (let ((content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)\n?")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1238 `((,(message-font-lock-make-header-matcher |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1239 (concat "^\\([Tt]o:\\)" content)) |
17493 | 1240 (1 'message-header-name-face) |
1241 (2 'message-header-to-face nil t)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1242 (,(message-font-lock-make-header-matcher |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1243 (concat "^\\(^[GBF]?[Cc][Cc]:\\|^[Rr]eply-[Tt]o:\\)" content)) |
17493 | 1244 (1 'message-header-name-face) |
1245 (2 'message-header-cc-face nil t)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1246 (,(message-font-lock-make-header-matcher |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1247 (concat "^\\([Ss]ubject:\\)" content)) |
17493 | 1248 (1 'message-header-name-face) |
1249 (2 'message-header-subject-face nil t)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1250 (,(message-font-lock-make-header-matcher |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1251 (concat "^\\([Nn]ewsgroups:\\|Followup-[Tt]o:\\)" content)) |
17493 | 1252 (1 'message-header-name-face) |
1253 (2 'message-header-newsgroups-face nil t)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1254 (,(message-font-lock-make-header-matcher |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1255 (concat "^\\([A-Z][^: \n\t]+:\\)" content)) |
17493 | 1256 (1 'message-header-name-face) |
1257 (2 'message-header-other-face nil t)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1258 (,(message-font-lock-make-header-matcher |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1259 (concat "^\\(X-[A-Za-z0-9-]+:\\|In-Reply-To:\\)" content)) |
17493 | 1260 (1 'message-header-name-face) |
1261 (2 'message-header-name-face)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1262 ,@(if (and mail-header-separator |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1263 (not (equal mail-header-separator ""))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1264 `((,(concat "^\\(" (regexp-quote mail-header-separator) "\\)$") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1265 1 'message-separator-face)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1266 nil) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1267 ((lambda (limit) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1268 (re-search-forward (concat "^\\(" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1269 message-cite-prefix-regexp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1270 "\\).*") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1271 limit t)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1272 (0 'message-cited-text-face)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1273 ("<#/?\\(multipart\\|part\\|external\\|mml\\|secure\\)[^>]*>" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1274 (0 'message-mml-face)))) |
17493 | 1275 "Additional expressions to highlight in Message mode.") |
1276 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1277 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1278 ;; XEmacs does it like this. For Emacs, we have to set the |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1279 ;; `font-lock-defaults' buffer-local variable. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1280 (put 'message-mode 'font-lock-defaults '(message-font-lock-keywords t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1281 |
17493 | 1282 (defvar message-face-alist |
1283 '((bold . bold-region) | |
1284 (underline . underline-region) | |
1285 (default . (lambda (b e) | |
1286 (unbold-region b e) | |
1287 (ununderline-region b e)))) | |
1288 "Alist of mail and news faces for facemenu. | |
48588 | 1289 The cdr of each entry is a function for applying the face to a region.") |
17493 | 1290 |
1291 (defcustom message-send-hook nil | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1292 "Hook run before sending messages. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1293 This hook is run quite early when sending." |
17493 | 1294 :group 'message-various |
1295 :options '(ispell-message) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1296 :link '(custom-manual "(message)Various Message Variables") |
17493 | 1297 :type 'hook) |
1298 | |
1299 (defcustom message-send-mail-hook nil | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1300 "Hook run before sending mail messages. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1301 This hook is run very late -- just before the message is sent as |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1302 mail." |
17493 | 1303 :group 'message-various |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1304 :link '(custom-manual "(message)Various Message Variables") |
17493 | 1305 :type 'hook) |
1306 | |
1307 (defcustom message-send-news-hook nil | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1308 "Hook run before sending news messages. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1309 This hook is run very late -- just before the message is sent as |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1310 news." |
17493 | 1311 :group 'message-various |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1312 :link '(custom-manual "(message)Various Message Variables") |
17493 | 1313 :type 'hook) |
1314 | |
1315 (defcustom message-sent-hook nil | |
1316 "Hook run after sending messages." | |
1317 :group 'message-various | |
1318 :type 'hook) | |
1319 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1320 (defvar message-send-coding-system 'binary |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1321 "Coding system to encode outgoing mail.") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1322 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1323 (defvar message-draft-coding-system |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1324 mm-auto-save-coding-system |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1325 "*Coding system to compose mail. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1326 If you'd like to make it possible to share draft files between XEmacs |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1327 and Emacs, you may use `iso-2022-7bit' for this value at your own risk. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1328 Note that the coding-system `iso-2022-7bit' isn't suitable to all data.") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1329 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1330 (defcustom message-send-mail-partially-limit 1000000 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1331 "The limitation of messages sent as message/partial. |
35147 | 1332 The lower bound of message size in characters, beyond which the message |
1333 should be sent in several parts. If it is nil, the size is unlimited." | |
33400
42c1ba3caf9c
(message-forward-as-mime, message-forward-ignored-headers)
Dave Love <fx@gnu.org>
parents:
33375
diff
changeset
|
1334 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1335 :group 'message-buffers |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1336 :link '(custom-manual "(message)Mail Variables") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1337 :type '(choice (const :tag "unlimited" nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1338 (integer 1000000))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1339 |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1340 (defcustom message-alternative-emails nil |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1341 "A regexp to match the alternative email addresses. |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1342 The first matched address (not primary one) is used in the From field." |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1343 :group 'message-headers |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1344 :link '(custom-manual "(message)Message Headers") |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1345 :type '(choice (const :tag "Always use primary" nil) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1346 regexp)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1347 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1348 (defcustom message-hierarchical-addresses nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1349 "A list of hierarchical mail address definitions. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1350 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1351 Inside each entry, the first address is the \"top\" address, and |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1352 subsequent addresses are subaddresses; this is used to indicate that |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1353 mail sent to the first address will automatically be delivered to the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1354 subaddresses. So if the first address appears in the recipient list |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1355 for a message, the subaddresses will be removed (if present) before |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1356 the mail is sent. All addresses in this structure should be |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1357 downcased." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1358 :group 'message-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1359 :type '(repeat (repeat string))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1360 |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1361 (defcustom message-mail-user-agent nil |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1362 "Like `mail-user-agent'. |
35147 | 1363 Except if it is nil, use Gnus native MUA; if it is t, use |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1364 `mail-user-agent'." |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1365 :type '(radio (const :tag "Gnus native" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1366 :format "%t\n" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1367 nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1368 (const :tag "`mail-user-agent'" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1369 :format "%t\n" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1370 t) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1371 (function-item :tag "Default Emacs mail" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1372 :format "%t\n" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1373 sendmail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1374 (function-item :tag "Emacs interface to MH" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1375 :format "%t\n" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1376 mh-e-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1377 (function :tag "Other")) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1378 :version "21.1" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1379 :group 'message) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1380 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1381 (defcustom message-wide-reply-confirm-recipients nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1382 "Whether to confirm a wide reply to multiple email recipients. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1383 If this variable is nil, don't ask whether to reply to all recipients. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1384 If this variable is non-nil, pose the question \"Reply to all |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1385 recipients?\" before a wide reply to multiple recipients. If the user |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1386 answers yes, reply to all recipients as usual. If the user answers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1387 no, only reply back to the author." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1388 :version "21.3" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1389 :group 'message-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1390 :link '(custom-manual "(message)Wide Reply") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1391 :type 'boolean) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1392 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1393 (defcustom message-user-fqdn nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1394 "*Domain part of Messsage-Ids." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1395 :group 'message-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1396 :link '(custom-manual "(message)News Headers") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1397 :type '(radio (const :format "%v " nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1398 (string :format "FQDN: %v\n" :size 0))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1399 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1400 (defcustom message-use-idna (and (condition-case nil (require 'idna) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1401 (file-error)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1402 (mm-coding-system-p 'utf-8) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1403 (executable-find idna-program) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1404 'ask) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1405 "Whether to encode non-ASCII in domain names into ASCII according to IDNA." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1406 :group 'message-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1407 :link '(custom-manual "(message)IDNA") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1408 :type '(choice (const :tag "Ask" ask) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1409 (const :tag "Never" nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1410 (const :tag "Always" t))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1411 |
17493 | 1412 ;;; Internal variables. |
1413 | |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1414 (defvar message-sending-message "Sending...") |
17493 | 1415 (defvar message-buffer-list nil) |
1416 (defvar message-this-is-news nil) | |
1417 (defvar message-this-is-mail nil) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1418 (defvar message-draft-article nil) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1419 (defvar message-mime-part nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1420 (defvar message-posting-charset nil) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1421 (defvar message-inserted-headers nil) |
17493 | 1422 |
1423 ;; Byte-compiler warning | |
33301
c1c373a70748
Put some defvars in eval-when-compile.
Dave Love <fx@gnu.org>
parents:
33199
diff
changeset
|
1424 (eval-when-compile |
c1c373a70748
Put some defvars in eval-when-compile.
Dave Love <fx@gnu.org>
parents:
33199
diff
changeset
|
1425 (defvar gnus-active-hashtb) |
c1c373a70748
Put some defvars in eval-when-compile.
Dave Love <fx@gnu.org>
parents:
33199
diff
changeset
|
1426 (defvar gnus-read-active-file)) |
17493 | 1427 |
1428 ;;; Regexp matching the delimiter of messages in UNIX mail format | |
19762
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1429 ;;; (UNIX From lines), minus the initial ^. It should be a copy |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1430 ;;; of rmail.el's rmail-unix-mail-delimiter. |
17493 | 1431 (defvar message-unix-mail-delimiter |
1432 (let ((time-zone-regexp | |
1433 (concat "\\([A-Z]?[A-Z]?[A-Z][A-Z]\\( DST\\)?" | |
1434 "\\|[-+]?[0-9][0-9][0-9][0-9]" | |
1435 "\\|" | |
1436 "\\) *"))) | |
1437 (concat | |
1438 "From " | |
1439 | |
19762
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1440 ;; Many things can happen to an RFC 822 mailbox before it is put into |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1441 ;; a `From' line. The leading phrase can be stripped, e.g. |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1442 ;; `Joe <@w.x:joe@y.z>' -> `<@w.x:joe@y.z>'. The <> can be stripped, e.g. |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1443 ;; `<@x.y:joe@y.z>' -> `@x.y:joe@y.z'. Everything starting with a CRLF |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1444 ;; can be removed, e.g. |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1445 ;; From: joe@y.z (Joe K |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1446 ;; User) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1447 ;; can yield `From joe@y.z (Joe K Fri Mar 22 08:11:15 1996', and |
19762
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1448 ;; From: Joe User |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1449 ;; <joe@y.z> |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1450 ;; can yield `From Joe User Fri Mar 22 08:11:15 1996'. |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1451 ;; The mailbox can be removed or be replaced by white space, e.g. |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1452 ;; From: "Joe User"{space}{tab} |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1453 ;; <joe@y.z> |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1454 ;; can yield `From {space}{tab} Fri Mar 22 08:11:15 1996', |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1455 ;; where {space} and {tab} represent the Ascii space and tab characters. |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1456 ;; We want to match the results of any of these manglings. |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1457 ;; The following regexp rejects names whose first characters are |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1458 ;; obviously bogus, but after that anything goes. |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1459 "\\([^\0-\b\n-\r\^?].*\\)?" |
17493 | 1460 |
1461 ;; The time the message was sent. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1462 "\\([^\0-\r \^?]+\\) +" ; day of the week |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1463 "\\([^\0-\r \^?]+\\) +" ; month |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1464 "\\([0-3]?[0-9]\\) +" ; day of month |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1465 "\\([0-2][0-9]:[0-5][0-9]\\(:[0-6][0-9]\\)?\\) *" ; time of day |
17493 | 1466 |
1467 ;; Perhaps a time zone, specified by an abbreviation, or by a | |
1468 ;; numeric offset. | |
1469 time-zone-regexp | |
1470 | |
1471 ;; The year. | |
19762
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1472 " \\([0-9][0-9]+\\) *" |
17493 | 1473 |
1474 ;; On some systems the time zone can appear after the year, too. | |
1475 time-zone-regexp | |
1476 | |
1477 ;; Old uucp cruft. | |
1478 "\\(remote from .*\\)?" | |
1479 | |
19762
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1480 "\n")) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1481 "Regexp matching the delimiter of messages in UNIX mail format.") |
17493 | 1482 |
1483 (defvar message-unsent-separator | |
1484 (concat "^ *---+ +Unsent message follows +---+ *$\\|" | |
1485 "^ *---+ +Returned message +---+ *$\\|" | |
1486 "^Start of returned message$\\|" | |
1487 "^ *---+ +Original message +---+ *$\\|" | |
1488 "^ *--+ +begin message +--+ *$\\|" | |
1489 "^ *---+ +Original message follows +---+ *$\\|" | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1490 "^ *---+ +Undelivered message follows +---+ *$\\|" |
17493 | 1491 "^|? *---+ +Message text follows: +---+ *|?$") |
1492 "A regexp that matches the separator before the text of a failed message.") | |
1493 | |
1494 (defvar message-header-format-alist | |
1495 `((Newsgroups) | |
1496 (To . message-fill-address) | |
1497 (Cc . message-fill-address) | |
1498 (Subject) | |
1499 (In-Reply-To) | |
1500 (Fcc) | |
1501 (Bcc) | |
1502 (Date) | |
1503 (Organization) | |
1504 (Distribution) | |
1505 (Lines) | |
1506 (Expires) | |
1507 (Message-ID) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1508 (References . message-shorten-references) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1509 (User-Agent)) |
17493 | 1510 "Alist used for formatting headers.") |
1511 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1512 (defvar message-options nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1513 "Some saved answers when sending message.") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1514 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1515 (defvar message-send-mail-real-function nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1516 "Internal send mail function.") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1517 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1518 (defvar message-bogus-system-names "^localhost\\." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1519 "The regexp of bogus system names.") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1520 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1521 (defcustom message-valid-fqdn-regexp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1522 (concat "[a-z0-9][-.a-z0-9]+\\." ;; [hostname.subdomain.]domain. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1523 ;; valid TLDs: |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1524 "\\([a-z][a-z]" ;; two letter country TDLs |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1525 "\\|biz\\|com\\|edu\\|gov\\|int\\|mil\\|net\\|org" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1526 "\\|aero\\|coop\\|info\\|name\\|museum" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1527 "\\|arpa\\|pro\\|uucp\\|bitnet\\|bofh" ;; old style? |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1528 "\\)") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1529 "Regular expression that matches a valid FQDN." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1530 ;; see also: gnus-button-valid-fqdn-regexp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1531 :group 'message-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1532 :type 'regexp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1533 |
17493 | 1534 (eval-and-compile |
82978
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
1535 (autoload 'idna-to-ascii "idna") |
17493 | 1536 (autoload 'message-setup-toolbar "messagexmas") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1537 (autoload 'mh-new-draft-name "mh-comp") |
17493 | 1538 (autoload 'mh-send-letter "mh-comp") |
1539 (autoload 'gnus-point-at-eol "gnus-util") | |
1540 (autoload 'gnus-point-at-bol "gnus-util") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1541 (autoload 'gnus-output-to-rmail "gnus-util") |
17493 | 1542 (autoload 'gnus-output-to-mail "gnus-util") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1543 (autoload 'nndraft-request-associate-buffer "nndraft") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1544 (autoload 'nndraft-request-expire-articles "nndraft") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1545 (autoload 'gnus-open-server "gnus-int") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1546 (autoload 'gnus-request-post "gnus-int") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1547 (autoload 'gnus-alive-p "gnus-util") |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1548 (autoload 'gnus-server-string "gnus") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1549 (autoload 'gnus-group-name-charset "gnus-group") |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1550 (autoload 'gnus-group-name-decode "gnus-group") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1551 (autoload 'gnus-groups-from-server "gnus") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1552 (autoload 'rmail-output "rmailout") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1553 (autoload 'gnus-delay-article "gnus-delay") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1554 (autoload 'gnus-make-local-hook "gnus-util") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1555 (autoload 'gnus-extract-address-components "gnus-util")) |
17493 | 1556 |
1557 | |
1558 | |
1559 ;;; | |
1560 ;;; Utility functions. | |
1561 ;;; | |
1562 | |
1563 (defmacro message-y-or-n-p (question show &rest text) | |
35147 | 1564 "Ask QUESTION, displaying remaining args in a temporary buffer if SHOW." |
17493 | 1565 `(message-talkative-question 'y-or-n-p ,question ,show ,@text)) |
1566 | |
1567 (defmacro message-delete-line (&optional n) | |
35147 | 1568 "Delete the current line (and the next N lines)." |
17493 | 1569 `(delete-region (progn (beginning-of-line) (point)) |
1570 (progn (forward-line ,(or n 1)) (point)))) | |
1571 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1572 (defun message-mark-active-p () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1573 "Non-nil means the mark and region are currently active in this buffer." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1574 mark-active) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1575 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1576 (defun message-unquote-tokens (elems) |
35147 | 1577 "Remove double quotes (\") from strings in list ELEMS." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1578 (mapcar (lambda (item) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1579 (while (string-match "^\\(.*\\)\"\\(.*\\)$" item) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1580 (setq item (concat (match-string 1 item) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1581 (match-string 2 item)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1582 item) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1583 elems)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1584 |
17493 | 1585 (defun message-tokenize-header (header &optional separator) |
1586 "Split HEADER into a list of header elements. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1587 SEPARATOR is a string of characters to be used as separators. \",\" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1588 is used by default." |
17493 | 1589 (if (not header) |
1590 nil | |
1591 (let ((regexp (format "[%s]+" (or separator ","))) | |
1592 (beg 1) | |
1593 (first t) | |
1594 quoted elems paren) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1595 (with-temp-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1596 (mm-enable-multibyte) |
17493 | 1597 (insert header) |
1598 (goto-char (point-min)) | |
1599 (while (not (eobp)) | |
1600 (if first | |
1601 (setq first nil) | |
1602 (forward-char 1)) | |
1603 (cond ((and (> (point) beg) | |
1604 (or (eobp) | |
1605 (and (looking-at regexp) | |
1606 (not quoted) | |
1607 (not paren)))) | |
1608 (push (buffer-substring beg (point)) elems) | |
1609 (setq beg (match-end 0))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1610 ((eq (char-after) ?\") |
17493 | 1611 (setq quoted (not quoted))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1612 ((and (eq (char-after) ?\() |
17493 | 1613 (not quoted)) |
1614 (setq paren t)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1615 ((and (eq (char-after) ?\)) |
17493 | 1616 (not quoted)) |
1617 (setq paren nil)))) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1618 (nreverse elems))))) |
17493 | 1619 |
1620 (defun message-mail-file-mbox-p (file) | |
1621 "Say whether FILE looks like a Unix mbox file." | |
1622 (when (and (file-exists-p file) | |
1623 (file-readable-p file) | |
1624 (file-regular-p file)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1625 (with-temp-buffer |
17493 | 1626 (nnheader-insert-file-contents file) |
1627 (goto-char (point-min)) | |
1628 (looking-at message-unix-mail-delimiter)))) | |
1629 | |
1630 (defun message-fetch-field (header &optional not-all) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1631 "The same as `mail-fetch-field', only remove all newlines. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1632 The buffer is expected to be narrowed to just the header of the message; |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1633 see `message-narrow-to-headers-or-head'." |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1634 (let* ((inhibit-point-motion-hooks t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1635 (case-fold-search t) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1636 (value (mail-fetch-field header nil (not not-all)))) |
17493 | 1637 (when value |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1638 (while (string-match "\n[\t ]+" value) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1639 (setq value (replace-match " " t t value))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1640 (set-text-properties 0 (length value) nil value) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1641 value))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1642 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1643 (defun message-field-value (header &optional not-all) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1644 "The same as `message-fetch-field', only narrow to the headers first." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1645 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1646 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1647 (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:
54287
diff
changeset
|
1648 (message-fetch-field header not-all)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1649 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1650 (defun message-narrow-to-field () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1651 "Narrow the buffer to the header on the current line." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1652 (beginning-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1653 (narrow-to-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1654 (point) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1655 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1656 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1657 (if (re-search-forward "^[^ \n\t]" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1658 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1659 (beginning-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1660 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1661 (point-max)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1662 (goto-char (point-min))) |
17493 | 1663 |
1664 (defun message-add-header (&rest headers) | |
1665 "Add the HEADERS to the message header, skipping those already present." | |
1666 (while headers | |
1667 (let (hclean) | |
1668 (unless (string-match "^\\([^:]+\\):[ \t]*[^ \t]" (car headers)) | |
1669 (error "Invalid header `%s'" (car headers))) | |
1670 (setq hclean (match-string 1 (car headers))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1671 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1672 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1673 (unless (re-search-forward (concat "^" (regexp-quote hclean) ":") nil t) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1674 (goto-char (point-max)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1675 (if (string-match "\n$" (car headers)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1676 (insert (car headers)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1677 (insert (car headers) ?\n))))) |
17493 | 1678 (setq headers (cdr headers)))) |
1679 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1680 (defmacro message-with-reply-buffer (&rest forms) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1681 "Evaluate FORMS in the reply buffer, if it exists." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1682 `(when (and message-reply-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1683 (buffer-name message-reply-buffer)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1684 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1685 (set-buffer message-reply-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1686 ,@forms))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1687 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1688 (put 'message-with-reply-buffer 'lisp-indent-function 0) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1689 (put 'message-with-reply-buffer 'edebug-form-spec '(body)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1690 |
17493 | 1691 (defun message-fetch-reply-field (header) |
35147 | 1692 "Fetch field HEADER from the message we're replying to." |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1693 (message-with-reply-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1694 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1695 (mail-narrow-to-head) |
17493 | 1696 (message-fetch-field header)))) |
1697 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1698 (defun message-strip-list-identifiers (subject) |
35147 | 1699 "Remove list identifiers in `gnus-list-identifiers' from string SUBJECT." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1700 (require 'gnus-sum) ; for gnus-list-identifiers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1701 (let ((regexp (if (stringp gnus-list-identifiers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1702 gnus-list-identifiers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1703 (mapconcat 'identity gnus-list-identifiers " *\\|")))) |
35147 | 1704 (if (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1705 " *\\)\\)+\\(Re: +\\)?\\)") subject) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1706 (concat (substring subject 0 (match-beginning 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1707 (or (match-string 3 subject) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1708 (match-string 5 subject)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1709 (substring subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1710 (match-end 1))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1711 subject))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1712 |
17493 | 1713 (defun message-strip-subject-re (subject) |
35147 | 1714 "Remove \"Re:\" from subject lines in string SUBJECT." |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1715 (if (string-match message-subject-re-regexp subject) |
17493 | 1716 (substring subject (match-end 0)) |
1717 subject)) | |
1718 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1719 ;;; Start of functions adopted from `message-utils.el'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1720 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1721 (defun message-strip-subject-trailing-was (subject) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1722 "Remove trailing \"(Was: <old subject>)\" from SUBJECT lines. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1723 Leading \"Re: \" is not stripped by this function. Use the function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1724 `message-strip-subject-re' for this." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1725 (let* ((query message-subject-trailing-was-query) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1726 (new) (found)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1727 (setq found |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1728 (string-match |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1729 (if (eq query 'ask) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1730 message-subject-trailing-was-ask-regexp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1731 message-subject-trailing-was-regexp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1732 subject)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1733 (if found |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1734 (setq new (substring subject 0 (match-beginning 0)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1735 (if (or (not found) (eq query nil)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1736 subject |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1737 (if (eq query 'ask) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1738 (if (message-y-or-n-p |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1739 "Strip `(was: <old subject>)' in subject? " t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1740 (concat |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1741 "Strip `(was: <old subject>)' in subject " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1742 "and use the new one instead?\n\n" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1743 "Current subject is: \"" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1744 subject "\"\n\n" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1745 "New subject would be: \"" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1746 new "\"\n\n" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1747 "See the variable `message-subject-trailing-was-query' " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1748 "to get rid of this query." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1749 )) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1750 new subject) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1751 new)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1752 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1753 ;;; Suggested by Jonas Steverud @ www.dtek.chalmers.se/~d4jonas/ |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1754 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1755 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1756 (defun message-change-subject (new-subject) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1757 "Ask for NEW-SUBJECT header, append (was: <Old Subject>)." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1758 ;; <URL:http://www.landfield.com/usefor/drafts/draft-ietf-usefor-useage--1.02.unpaged> |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1759 (interactive |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1760 (list |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1761 (read-from-minibuffer "New subject: "))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1762 (cond ((and (not (or (null new-subject) ; new subject not empty |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1763 (zerop (string-width new-subject)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1764 (string-match "^[ \t]*$" new-subject)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1765 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1766 (let ((old-subject |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1767 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1768 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1769 (message-fetch-field "Subject")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1770 (cond ((not old-subject) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1771 (error "No current subject")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1772 ((not (string-match |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1773 (concat "^[ \t]*" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1774 (regexp-quote new-subject) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1775 " \t]*$") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1776 old-subject)) ; yes, it really is a new subject |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1777 ;; delete eventual Re: prefix |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1778 (setq old-subject |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1779 (message-strip-subject-re old-subject)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1780 (message-goto-subject) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1781 (message-delete-line) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1782 (insert (concat "Subject: " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1783 new-subject |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1784 " (was: " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1785 old-subject ")\n"))))))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1786 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1787 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1788 (defun message-mark-inserted-region (beg end) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1789 "Mark some region in the current article with enclosing tags. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1790 See `message-mark-insert-begin' and `message-mark-insert-end'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1791 (interactive "r") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1792 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1793 ;; add to the end of the region first, otherwise end would be invalid |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1794 (goto-char end) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1795 (insert message-mark-insert-end) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1796 (goto-char beg) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1797 (insert message-mark-insert-begin))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1798 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1799 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1800 (defun message-mark-insert-file (file) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1801 "Insert FILE at point, marking it with enclosing tags. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1802 See `message-mark-insert-begin' and `message-mark-insert-end'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1803 (interactive "fFile to insert: ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1804 ;; reverse insertion to get correct result. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1805 (let ((p (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1806 (insert message-mark-insert-end) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1807 (goto-char p) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1808 (insert-file-contents file) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1809 (goto-char p) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1810 (insert message-mark-insert-begin))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1811 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1812 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1813 (defun message-add-archive-header () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1814 "Insert \"X-No-Archive: Yes\" in the header and a note in the body. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1815 The note can be customized using `message-archive-note'. When called with a |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1816 prefix argument, ask for a text to insert. If you don't want the note in the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1817 body, set `message-archive-note' to nil." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1818 (interactive) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1819 (if current-prefix-arg |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1820 (setq message-archive-note |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1821 (read-from-minibuffer "Reason for No-Archive: " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1822 (cons message-archive-note 0)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1823 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1824 (if (message-goto-signature) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1825 (re-search-backward message-signature-separator)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1826 (when message-archive-note |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1827 (insert message-archive-note) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1828 (newline)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1829 (message-add-header message-archive-header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1830 (message-sort-headers))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1831 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1832 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1833 (defun message-cross-post-followup-to-header (target-group) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1834 "Mangles FollowUp-To and Newsgroups header to point to TARGET-GROUP. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1835 With prefix-argument just set Follow-Up, don't cross-post." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1836 (interactive |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1837 (list ; Completion based on Gnus |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1838 (completing-read "Followup To: " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1839 (if (boundp 'gnus-newsrc-alist) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1840 gnus-newsrc-alist) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1841 nil nil '("poster" . 0) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1842 (if (boundp 'gnus-group-history) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1843 'gnus-group-history)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1844 (message-remove-header "Follow[Uu]p-[Tt]o" t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1845 (message-goto-newsgroups) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1846 (beginning-of-line) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1847 ;; if we already did a crosspost before, kill old target |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1848 (if (and message-cross-post-old-target |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1849 (re-search-forward |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1850 (regexp-quote (concat "," message-cross-post-old-target)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1851 nil t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1852 (replace-match "")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1853 ;; unless (followup is to poster or user explicitly asked not |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1854 ;; to cross-post, or target-group is already in Newsgroups) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1855 ;; add target-group to Newsgroups line. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1856 (cond ((and (or |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1857 ;; def: cross-post, req:no |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1858 (and message-cross-post-default (not current-prefix-arg)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1859 ;; def: no-cross-post, req:yes |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1860 (and (not message-cross-post-default) current-prefix-arg)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1861 (not (string-match "poster" target-group)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1862 (not (string-match (regexp-quote target-group) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1863 (message-fetch-field "Newsgroups")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1864 (end-of-line) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1865 (insert (concat "," target-group)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1866 (end-of-line) ; ensure Followup: comes after Newsgroups: |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1867 ;; unless new followup would be identical to Newsgroups line |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1868 ;; make a new Followup-To line |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1869 (if (not (string-match (concat "^[ \t]*" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1870 target-group |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1871 "[ \t]*$") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1872 (message-fetch-field "Newsgroups"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1873 (insert (concat "\nFollowup-To: " target-group))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1874 (setq message-cross-post-old-target target-group)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1875 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1876 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1877 (defun message-cross-post-insert-note (target-group cross-post in-old |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1878 old-groups) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1879 "Insert a in message body note about a set Followup or Crosspost. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1880 If there have been previous notes, delete them. TARGET-GROUP specifies the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1881 group to Followup-To. When CROSS-POST is t, insert note about |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1882 crossposting. IN-OLD specifies whether TARGET-GROUP is a member of |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1883 OLD-GROUPS. OLD-GROUPS lists the old-groups the posting would have |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1884 been made to before the user asked for a Crosspost." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1885 ;; start scanning body for previous uses |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1886 (message-goto-signature) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1887 (let ((head (re-search-backward |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1888 (concat "^" mail-header-separator) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1889 nil t))) ; just search in body |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1890 (message-goto-signature) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1891 (while (re-search-backward |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1892 (concat "^" (regexp-quote message-cross-post-note) ".*") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1893 head t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1894 (message-delete-line)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1895 (message-goto-signature) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1896 (while (re-search-backward |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1897 (concat "^" (regexp-quote message-followup-to-note) ".*") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1898 head t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1899 (message-delete-line)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1900 ;; insert new note |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1901 (if (message-goto-signature) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1902 (re-search-backward message-signature-separator)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1903 (if (or in-old |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1904 (not cross-post) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1905 (string-match "^[ \t]*poster[ \t]*$" target-group)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1906 (insert (concat message-followup-to-note target-group "\n")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1907 (insert (concat message-cross-post-note target-group "\n"))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1908 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1909 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1910 (defun message-cross-post-followup-to (target-group) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1911 "Crossposts message and set Followup-To to TARGET-GROUP. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1912 With prefix-argument just set Follow-Up, don't cross-post." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1913 (interactive |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1914 (list ; Completion based on Gnus |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1915 (completing-read "Followup To: " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1916 (if (boundp 'gnus-newsrc-alist) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1917 gnus-newsrc-alist) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1918 nil nil '("poster" . 0) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1919 (if (boundp 'gnus-group-history) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1920 'gnus-group-history)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1921 (cond ((not (or (null target-group) ; new subject not empty |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1922 (zerop (string-width target-group)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1923 (string-match "^[ \t]*$" target-group))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1924 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1925 (let* ((old-groups (message-fetch-field "Newsgroups")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1926 (in-old (string-match |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1927 (regexp-quote target-group) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1928 (or old-groups "")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1929 ;; check whether target exactly matches old Newsgroups |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1930 (cond ((not old-groups) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1931 (error "No current newsgroup")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1932 ((or (not in-old) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1933 (not (string-match |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1934 (concat "^[ \t]*" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1935 (regexp-quote target-group) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1936 "[ \t]*$") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1937 old-groups))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1938 ;; yes, Newsgroups line must change |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1939 (message-cross-post-followup-to-header target-group) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1940 ;; insert note whether we do cross-post or followup-to |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1941 (funcall message-cross-post-note-function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1942 target-group |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1943 (if (or (and message-cross-post-default |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1944 (not current-prefix-arg)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1945 (and (not message-cross-post-default) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1946 current-prefix-arg)) t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1947 in-old old-groups)))))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1948 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1949 ;;; Reduce To: to Cc: or Bcc: header |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1950 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1951 ;;;###autoload |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1952 (defun message-reduce-to-to-cc () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1953 "Replace contents of To: header with contents of Cc: or Bcc: header." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1954 (interactive) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1955 (let ((cc-content |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1956 (save-restriction (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1957 (message-fetch-field "cc"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1958 (bcc nil)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1959 (if (and (not cc-content) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1960 (setq cc-content |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1961 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1962 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1963 (message-fetch-field "bcc")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1964 (setq bcc t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1965 (cond (cc-content |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1966 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1967 (message-goto-to) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1968 (message-delete-line) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1969 (insert (concat "To: " cc-content "\n")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1970 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1971 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1972 (message-remove-header (if bcc |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1973 "bcc" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1974 "cc")))))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1975 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1976 ;;; End of functions adopted from `message-utils.el'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
1977 |
17493 | 1978 (defun message-remove-header (header &optional is-regexp first reverse) |
1979 "Remove HEADER in the narrowed buffer. | |
35147 | 1980 If IS-REGEXP, HEADER is a regular expression. |
17493 | 1981 If FIRST, only remove the first instance of the header. |
1982 Return the number of headers removed." | |
1983 (goto-char (point-min)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1984 (let ((regexp (if is-regexp header (concat "^" (regexp-quote header) ":"))) |
17493 | 1985 (number 0) |
1986 (case-fold-search t) | |
1987 last) | |
1988 (while (and (not (eobp)) | |
1989 (not last)) | |
1990 (if (if reverse | |
1991 (not (looking-at regexp)) | |
1992 (looking-at regexp)) | |
1993 (progn | |
1994 (incf number) | |
1995 (when first | |
1996 (setq last t)) | |
1997 (delete-region | |
1998 (point) | |
1999 ;; There might be a continuation header, so we have to search | |
2000 ;; until we find a new non-continuation line. | |
2001 (progn | |
2002 (forward-line 1) | |
2003 (if (re-search-forward "^[^ \t]" nil t) | |
2004 (goto-char (match-beginning 0)) | |
2005 (point-max))))) | |
2006 (forward-line 1) | |
2007 (if (re-search-forward "^[^ \t]" nil t) | |
2008 (goto-char (match-beginning 0)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2009 (goto-char (point-max))))) |
17493 | 2010 number)) |
2011 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2012 (defun message-remove-first-header (header) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2013 "Remove the first instance of HEADER if there is more than one." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2014 (let ((count 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2015 (regexp (concat "^" (regexp-quote header) ":"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2016 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2017 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2018 (while (re-search-forward regexp nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2019 (incf count))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2020 (while (> count 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2021 (message-remove-header header nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2022 (decf count)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2023 |
17493 | 2024 (defun message-narrow-to-headers () |
2025 "Narrow the buffer to the head of the message." | |
2026 (widen) | |
2027 (narrow-to-region | |
2028 (goto-char (point-min)) | |
2029 (if (re-search-forward | |
2030 (concat "^" (regexp-quote mail-header-separator) "\n") nil t) | |
2031 (match-beginning 0) | |
2032 (point-max))) | |
2033 (goto-char (point-min))) | |
2034 | |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2035 (defun message-narrow-to-head-1 () |
35147 | 2036 "Like `message-narrow-to-head'. Don't widen." |
17493 | 2037 (narrow-to-region |
2038 (goto-char (point-min)) | |
2039 (if (search-forward "\n\n" nil 1) | |
2040 (1- (point)) | |
2041 (point-max))) | |
2042 (goto-char (point-min))) | |
2043 | |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2044 (defun message-narrow-to-head () |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2045 "Narrow the buffer to the head of the message. |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2046 Point is left at the beginning of the narrowed-to region." |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2047 (widen) |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2048 (message-narrow-to-head-1)) |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2049 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2050 (defun message-narrow-to-headers-or-head () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2051 "Narrow the buffer to the head of the message." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2052 (widen) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2053 (narrow-to-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2054 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2055 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2056 ((re-search-forward |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2057 (concat "^" (regexp-quote mail-header-separator) "\n") nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2058 (match-beginning 0)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2059 ((search-forward "\n\n" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2060 (1- (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2061 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2062 (point-max)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2063 (goto-char (point-min))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2064 |
17493 | 2065 (defun message-news-p () |
2066 "Say whether the current buffer contains a news message." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2067 (and (not message-this-is-mail) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2068 (or message-this-is-news |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2069 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2070 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2071 (message-narrow-to-headers) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2072 (and (message-fetch-field "newsgroups") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2073 (not (message-fetch-field "posted-to")))))))) |
17493 | 2074 |
2075 (defun message-mail-p () | |
2076 "Say whether the current buffer contains a mail message." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2077 (and (not message-this-is-news) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2078 (or message-this-is-mail |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2079 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2080 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2081 (message-narrow-to-headers) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2082 (or (message-fetch-field "to") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2083 (message-fetch-field "cc") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2084 (message-fetch-field "bcc"))))))) |
17493 | 2085 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2086 (defun message-subscribed-p () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2087 "Say whether we need to insert a MFT header." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2088 (or message-subscribed-regexps |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2089 message-subscribed-addresses |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2090 message-subscribed-address-file |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2091 message-subscribed-address-functions)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2092 |
17493 | 2093 (defun message-next-header () |
2094 "Go to the beginning of the next header." | |
2095 (beginning-of-line) | |
2096 (or (eobp) (forward-char 1)) | |
2097 (not (if (re-search-forward "^[^ \t]" nil t) | |
2098 (beginning-of-line) | |
2099 (goto-char (point-max))))) | |
2100 | |
2101 (defun message-sort-headers-1 () | |
2102 "Sort the buffer as headers using `message-rank' text props." | |
2103 (goto-char (point-min)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2104 (require 'sort) |
17493 | 2105 (sort-subr |
2106 nil 'message-next-header | |
2107 (lambda () | |
2108 (message-next-header) | |
2109 (unless (bobp) | |
2110 (forward-char -1))) | |
2111 (lambda () | |
2112 (or (get-text-property (point) 'message-rank) | |
2113 10000)))) | |
2114 | |
2115 (defun message-sort-headers () | |
2116 "Sort the headers of the current message according to `message-header-format-alist'." | |
2117 (interactive) | |
2118 (save-excursion | |
2119 (save-restriction | |
2120 (let ((max (1+ (length message-header-format-alist))) | |
2121 rank) | |
2122 (message-narrow-to-headers) | |
2123 (while (re-search-forward "^[^ \n]+:" nil t) | |
2124 (put-text-property | |
2125 (match-beginning 0) (1+ (match-beginning 0)) | |
2126 'message-rank | |
2127 (if (setq rank (length (memq (assq (intern (buffer-substring | |
2128 (match-beginning 0) | |
2129 (1- (match-end 0)))) | |
2130 message-header-format-alist) | |
2131 message-header-format-alist))) | |
2132 (- max rank) | |
2133 (1+ max))))) | |
2134 (message-sort-headers-1)))) | |
2135 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2136 |
17493 | 2137 |
2138 | |
2139 ;;; | |
2140 ;;; Message mode | |
2141 ;;; | |
2142 | |
2143 ;;; Set up keymap. | |
2144 | |
2145 (defvar message-mode-map nil) | |
2146 | |
2147 (unless message-mode-map | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2148 (setq message-mode-map (make-keymap)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2149 (set-keymap-parent message-mode-map text-mode-map) |
17493 | 2150 (define-key message-mode-map "\C-c?" 'describe-mode) |
2151 | |
2152 (define-key message-mode-map "\C-c\C-f\C-t" 'message-goto-to) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2153 (define-key message-mode-map "\C-c\C-f\C-o" 'message-goto-from) |
17493 | 2154 (define-key message-mode-map "\C-c\C-f\C-b" 'message-goto-bcc) |
2155 (define-key message-mode-map "\C-c\C-f\C-w" 'message-goto-fcc) | |
2156 (define-key message-mode-map "\C-c\C-f\C-c" 'message-goto-cc) | |
2157 (define-key message-mode-map "\C-c\C-f\C-s" 'message-goto-subject) | |
2158 (define-key message-mode-map "\C-c\C-f\C-r" 'message-goto-reply-to) | |
2159 (define-key message-mode-map "\C-c\C-f\C-n" 'message-goto-newsgroups) | |
2160 (define-key message-mode-map "\C-c\C-f\C-d" 'message-goto-distribution) | |
2161 (define-key message-mode-map "\C-c\C-f\C-f" 'message-goto-followup-to) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2162 (define-key message-mode-map "\C-c\C-f\C-m" 'message-goto-mail-followup-to) |
17493 | 2163 (define-key message-mode-map "\C-c\C-f\C-k" 'message-goto-keywords) |
2164 (define-key message-mode-map "\C-c\C-f\C-u" 'message-goto-summary) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2165 (define-key message-mode-map "\C-c\C-f\C-i" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2166 'message-insert-or-toggle-importance) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2167 (define-key message-mode-map "\C-c\C-f\C-a" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2168 'message-generate-unsubscribed-mail-followup-to) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2169 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2170 ;; modify headers (and insert notes in body) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2171 (define-key message-mode-map "\C-c\C-fs" 'message-change-subject) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2172 ;; |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2173 (define-key message-mode-map "\C-c\C-fx" 'message-cross-post-followup-to) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2174 ;; prefix+message-cross-post-followup-to = same w/o cross-post |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2175 (define-key message-mode-map "\C-c\C-ft" 'message-reduce-to-to-cc) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2176 (define-key message-mode-map "\C-c\C-fa" 'message-add-archive-header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2177 ;; mark inserted text |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2178 (define-key message-mode-map "\C-c\M-m" 'message-mark-inserted-region) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2179 (define-key message-mode-map "\C-c\M-f" 'message-mark-insert-file) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2180 |
17493 | 2181 (define-key message-mode-map "\C-c\C-b" 'message-goto-body) |
2182 (define-key message-mode-map "\C-c\C-i" 'message-goto-signature) | |
2183 | |
2184 (define-key message-mode-map "\C-c\C-t" 'message-insert-to) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2185 (define-key message-mode-map "\C-c\C-fw" 'message-insert-wide-reply) |
17493 | 2186 (define-key message-mode-map "\C-c\C-n" 'message-insert-newsgroups) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2187 (define-key message-mode-map "\C-c\C-l" 'message-to-list-only) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2188 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2189 (define-key message-mode-map "\C-c\C-u" 'message-insert-or-toggle-importance) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2190 (define-key message-mode-map "\C-c\M-n" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2191 'message-insert-disposition-notification-to) |
17493 | 2192 |
2193 (define-key message-mode-map "\C-c\C-y" 'message-yank-original) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2194 (define-key message-mode-map "\C-c\M-\C-y" 'message-yank-buffer) |
17493 | 2195 (define-key message-mode-map "\C-c\C-q" 'message-fill-yanked-message) |
2196 (define-key message-mode-map "\C-c\C-w" 'message-insert-signature) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2197 (define-key message-mode-map "\C-c\M-h" 'message-insert-headers) |
17493 | 2198 (define-key message-mode-map "\C-c\C-r" 'message-caesar-buffer-body) |
2199 (define-key message-mode-map "\C-c\C-o" 'message-sort-headers) | |
2200 (define-key message-mode-map "\C-c\M-r" 'message-rename-buffer) | |
2201 | |
2202 (define-key message-mode-map "\C-c\C-c" 'message-send-and-exit) | |
2203 (define-key message-mode-map "\C-c\C-s" 'message-send) | |
2204 (define-key message-mode-map "\C-c\C-k" 'message-kill-buffer) | |
2205 (define-key message-mode-map "\C-c\C-d" 'message-dont-send) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2206 (define-key message-mode-map "\C-c\n" 'gnus-delay-article) |
17493 | 2207 |
2208 (define-key message-mode-map "\C-c\C-e" 'message-elide-region) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2209 (define-key message-mode-map "\C-c\C-v" 'message-delete-not-region) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2210 (define-key message-mode-map "\C-c\C-z" 'message-kill-to-signature) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2211 (define-key message-mode-map "\M-\r" 'message-newline-and-reformat) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2212 ;;(define-key message-mode-map "\M-q" 'message-fill-paragraph) |
49034
b6e082e00b00
(message-split-line): New function.
Kim F. Storm <storm@cua.dk>
parents:
48588
diff
changeset
|
2213 (define-key message-mode-map [remap split-line] 'message-split-line) |
17493 | 2214 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2215 (define-key message-mode-map "\C-c\C-a" 'mml-attach-file) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2216 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2217 (define-key message-mode-map "\C-a" 'message-beginning-of-line) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2218 (define-key message-mode-map "\t" 'message-tab) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2219 (define-key message-mode-map "\M-;" 'comment-region)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2220 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2221 (easy-menu-define |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2222 message-mode-menu message-mode-map "Message Menu." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2223 `("Message" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2224 ["Yank Original" message-yank-original message-reply-buffer] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2225 ["Fill Yanked Message" message-fill-yanked-message t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2226 ["Insert Signature" message-insert-signature t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2227 ["Caesar (rot13) Message" message-caesar-buffer-body t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2228 ["Caesar (rot13) Region" message-caesar-region (message-mark-active-p)] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2229 ["Elide Region" message-elide-region |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2230 :active (message-mark-active-p) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2231 ,@(if (featurep 'xemacs) nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2232 '(:help "Replace text in region with an ellipsis"))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2233 ["Delete Outside Region" message-delete-not-region |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2234 :active (message-mark-active-p) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2235 ,@(if (featurep 'xemacs) nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2236 '(:help "Delete all quoted text outside region"))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2237 ["Kill To Signature" message-kill-to-signature t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2238 ["Newline and Reformat" message-newline-and-reformat t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2239 ["Rename buffer" message-rename-buffer t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2240 ["Spellcheck" ispell-message |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2241 ,@(if (featurep 'xemacs) '(t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2242 '(:help "Spellcheck this message"))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2243 "----" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2244 ["Insert Region Marked" message-mark-inserted-region |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2245 :active (message-mark-active-p) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2246 ,@(if (featurep 'xemacs) nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2247 '(:help "Mark region with enclosing tags"))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2248 ["Insert File Marked..." message-mark-insert-file |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2249 ,@(if (featurep 'xemacs) '(t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2250 '(:help "Insert file at point marked with enclosing tags"))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2251 "----" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2252 ["Send Message" message-send-and-exit |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2253 ,@(if (featurep 'xemacs) '(t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2254 '(:help "Send this message"))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2255 ["Postpone Message" message-dont-send |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2256 ,@(if (featurep 'xemacs) '(t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2257 '(:help "File this draft message and exit"))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2258 ["Send at Specific Time..." gnus-delay-article |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2259 ,@(if (featurep 'xemacs) '(t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2260 '(:help "Ask, then arrange to send message at that time"))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2261 ["Kill Message" message-kill-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2262 ,@(if (featurep 'xemacs) '(t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2263 '(:help "Delete this message without sending"))])) |
17493 | 2264 |
2265 (easy-menu-define | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2266 message-mode-field-menu message-mode-map "" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2267 `("Field" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2268 ["To" message-goto-to t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2269 ["From" message-goto-from t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2270 ["Subject" message-goto-subject t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2271 ["Change subject..." message-change-subject t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2272 ["Cc" message-goto-cc t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2273 ["Bcc" message-goto-bcc t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2274 ["Fcc" message-goto-fcc t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2275 ["Reply-To" message-goto-reply-to t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2276 ["Flag As Important" message-insert-importance-high |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2277 ,@(if (featurep 'xemacs) '(t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2278 '(:help "Mark this message as important"))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2279 ["Flag As Unimportant" message-insert-importance-low |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2280 ,@(if (featurep 'xemacs) '(t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2281 '(:help "Mark this message as unimportant"))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2282 ["Request Receipt" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2283 message-insert-disposition-notification-to |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2284 ,@(if (featurep 'xemacs) '(t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2285 '(:help "Request a receipt notification"))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2286 "----" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2287 ;; (typical) news stuff |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2288 ["Summary" message-goto-summary t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2289 ["Keywords" message-goto-keywords t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2290 ["Newsgroups" message-goto-newsgroups t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2291 ["Fetch Newsgroups" message-insert-newsgroups t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2292 ["Followup-To" message-goto-followup-to t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2293 ;; ["Followup-To (with note in body)" message-cross-post-followup-to t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2294 ["Crosspost / Followup-To..." message-cross-post-followup-to t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2295 ["Distribution" message-goto-distribution t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2296 ["X-No-Archive:" message-add-archive-header t ] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2297 "----" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2298 ;; (typical) mailing-lists stuff |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2299 ["Fetch To" message-insert-to |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2300 ,@(if (featurep 'xemacs) '(t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2301 '(:help "Insert a To header that points to the author."))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2302 ["Fetch To and Cc" message-insert-wide-reply |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2303 ,@(if (featurep 'xemacs) '(t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2304 '(:help |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2305 "Insert To and Cc headers as if you were doing a wide reply."))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2306 "----" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2307 ["Send to list only" message-to-list-only t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2308 ["Mail-Followup-To" message-goto-mail-followup-to t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2309 ["Unsubscribed list post" message-generate-unsubscribed-mail-followup-to |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2310 ,@(if (featurep 'xemacs) '(t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2311 '(:help "Insert a reasonable `Mail-Followup-To:' header."))] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2312 ["Reduce To: to Cc:" message-reduce-to-to-cc t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2313 "----" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2314 ["Sort Headers" message-sort-headers t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2315 ["Encode non-ASCII domain names" message-idna-to-ascii-rhs t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2316 ["Goto Body" message-goto-body t] |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2317 ["Goto Signature" message-goto-signature t])) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2318 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2319 (defvar message-tool-bar-map nil) |
17493 | 2320 |
33301
c1c373a70748
Put some defvars in eval-when-compile.
Dave Love <fx@gnu.org>
parents:
33199
diff
changeset
|
2321 (eval-when-compile |
c1c373a70748
Put some defvars in eval-when-compile.
Dave Love <fx@gnu.org>
parents:
33199
diff
changeset
|
2322 (defvar facemenu-add-face-function) |
c1c373a70748
Put some defvars in eval-when-compile.
Dave Love <fx@gnu.org>
parents:
33199
diff
changeset
|
2323 (defvar facemenu-remove-face-function)) |
17493 | 2324 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2325 ;;; Forbidden properties |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2326 ;; |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2327 ;; We use `after-change-functions' to keep special text properties |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2328 ;; that interfer with the normal function of message mode out of the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2329 ;; buffer. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2330 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2331 (defcustom message-strip-special-text-properties t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2332 "Strip special properties from the message buffer. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2333 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2334 Emacs has a number of special text properties which can break message |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2335 composing in various ways. If this option is set, message will strip |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2336 these properties from the message composition buffer. However, some |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2337 packages requires these properties to be present in order to work. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2338 If you use one of these packages, turn this option off, and hope the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2339 message composition doesn't break too bad." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2340 :group 'message-various |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2341 :link '(custom-manual "(message)Various Message Variables") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2342 :type 'boolean) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2343 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2344 (defconst message-forbidden-properties |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2345 ;; No reason this should be clutter up customize. We make it a |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2346 ;; property list (rather than a list of property symbols), to be |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2347 ;; directly useful for `remove-text-properties'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2348 '(field nil read-only nil invisible nil intangible nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2349 mouse-face nil modification-hooks nil insert-in-front-hooks nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2350 insert-behind-hooks nil point-entered nil point-left nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2351 ;; Other special properties: |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2352 ;; category, face, display: probably doesn't do any harm. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2353 ;; fontified: is used by font-lock. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2354 ;; syntax-table, local-map: I dunno. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2355 ;; We need to add XEmacs names to the list. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2356 "Property list of with properties.forbidden in message buffers. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2357 The values of the properties are ignored, only the property names are used.") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2358 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2359 (defun message-tamago-not-in-use-p (pos) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2360 "Return t when tamago version 4 is not in use at the cursor position. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2361 Tamago version 4 is a popular input method for writing Japanese text. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2362 It uses the properties `intangible', `invisible', `modification-hooks' |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2363 and `read-only' when translating ascii or kana text to kanji text. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2364 These properties are essential to work, so we should never strip them." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2365 (not (and (boundp 'egg-modefull-mode) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2366 (symbol-value 'egg-modefull-mode) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2367 (or (memq (get-text-property pos 'intangible) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2368 '(its-part-1 its-part-2)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2369 (get-text-property pos 'egg-end) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2370 (get-text-property pos 'egg-lang) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2371 (get-text-property pos 'egg-start))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2372 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2373 (defun message-strip-forbidden-properties (begin end &optional old-length) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2374 "Strip forbidden properties between BEGIN and END, ignoring the third arg. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2375 This function is intended to be called from `after-change-functions'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2376 See also `message-forbidden-properties'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2377 (when (and message-strip-special-text-properties |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2378 (message-tamago-not-in-use-p begin)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2379 (while (not (= begin end)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2380 (when (not (get-text-property begin 'message-hidden)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2381 (remove-text-properties begin (1+ begin) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2382 message-forbidden-properties)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2383 (incf begin)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2384 |
17493 | 2385 ;;;###autoload |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2386 (define-derived-mode message-mode text-mode "Message" |
17493 | 2387 "Major mode for editing mail and news to be sent. |
35147 | 2388 Like Text Mode but with these additional commands:\\<message-mode-map> |
2389 C-c C-s `message-send' (send the message) C-c C-c `message-send-and-exit' | |
2390 C-c C-d Postpone sending the message C-c C-k Kill the message | |
17493 | 2391 C-c C-f move to a header field (and create it if there isn't): |
2392 C-c C-f C-t move to To C-c C-f C-s move to Subject | |
2393 C-c C-f C-c move to Cc C-c C-f C-b move to Bcc | |
2394 C-c C-f C-w move to Fcc C-c C-f C-r move to Reply-To | |
2395 C-c C-f C-u move to Summary C-c C-f C-n move to Newsgroups | |
2396 C-c C-f C-k move to Keywords C-c C-f C-d move to Distribution | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2397 C-c C-f C-o move to From (\"Originator\") |
17493 | 2398 C-c C-f C-f move to Followup-To |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2399 C-c C-f C-m move to Mail-Followup-To |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2400 C-c C-f C-i cycle through Importance values |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2401 C-c C-f s change subject and append \"(was: <Old Subject>)\" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2402 C-c C-f x crossposting with FollowUp-To header and note in body |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2403 C-c C-f t replace To: header with contents of Cc: or Bcc: |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2404 C-c C-f a Insert X-No-Archive: header and a note in the body |
35147 | 2405 C-c C-t `message-insert-to' (add a To header to a news followup) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2406 C-c C-l `message-to-list-only' (removes all but list address in to/cc) |
35147 | 2407 C-c C-n `message-insert-newsgroups' (add a Newsgroup header to a news reply) |
2408 C-c C-b `message-goto-body' (move to beginning of message text). | |
2409 C-c C-i `message-goto-signature' (move to the beginning of the signature). | |
2410 C-c C-w `message-insert-signature' (insert `message-signature-file' file). | |
2411 C-c C-y `message-yank-original' (insert current message, if any). | |
2412 C-c C-q `message-fill-yanked-message' (fill what was yanked). | |
2413 C-c C-e `message-elide-region' (elide the text between point and mark). | |
2414 C-c C-v `message-delete-not-region' (remove the text outside the region). | |
2415 C-c C-z `message-kill-to-signature' (kill the text up to the signature). | |
2416 C-c C-r `message-caesar-buffer-body' (rot13 the message body). | |
2417 C-c C-a `mml-attach-file' (attach a file as MIME). | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2418 C-c C-u `message-insert-or-toggle-importance' (insert or cycle importance). |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2419 C-c M-n `message-insert-disposition-notification-to' (request receipt). |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2420 C-c M-m `message-mark-inserted-region' (mark region with enclosing tags). |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2421 C-c M-f `message-mark-insert-file' (insert file marked with enclosing tags). |
35147 | 2422 M-RET `message-newline-and-reformat' (break the line and reformat)." |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2423 (setq local-abbrev-table text-mode-abbrev-table) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2424 (set (make-local-variable 'message-reply-buffer) nil) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2425 (set (make-local-variable 'message-inserted-headers) nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2426 (set (make-local-variable 'message-send-actions) nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2427 (set (make-local-variable 'message-exit-actions) nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2428 (set (make-local-variable 'message-kill-actions) nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2429 (set (make-local-variable 'message-postpone-actions) nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2430 (set (make-local-variable 'message-draft-article) nil) |
17493 | 2431 (setq buffer-offer-save t) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2432 (set (make-local-variable 'facemenu-add-face-function) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2433 (lambda (face end) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2434 (let ((face-fun (cdr (assq face message-face-alist)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2435 (if face-fun |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2436 (funcall face-fun (point) end) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2437 (error "Face %s not configured for %s mode" face mode-name))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2438 "")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2439 (set (make-local-variable 'facemenu-remove-face-function) t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2440 (set (make-local-variable 'message-reply-headers) nil) |
17493 | 2441 (make-local-variable 'message-newsreader) |
2442 (make-local-variable 'message-mailer) | |
2443 (make-local-variable 'message-post-method) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2444 (set (make-local-variable 'message-sent-message-via) nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2445 (set (make-local-variable 'message-checksum) nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2446 (set (make-local-variable 'message-mime-part) 0) |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2447 (message-setup-fill-variables) |
34766 | 2448 ;; Allow using comment commands to add/remove quoting. |
82966
28d9e552d178
Merge some changes from Emacs/trunk:
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82951
diff
changeset
|
2449 ;; (set (make-local-variable 'comment-start) message-yank-prefix) |
28d9e552d178
Merge some changes from Emacs/trunk:
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82951
diff
changeset
|
2450 (when message-yank-prefix |
28d9e552d178
Merge some changes from Emacs/trunk:
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82951
diff
changeset
|
2451 (set (make-local-variable 'comment-start) message-yank-prefix) |
28d9e552d178
Merge some changes from Emacs/trunk:
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82951
diff
changeset
|
2452 (set (make-local-variable 'comment-start-skip) |
28d9e552d178
Merge some changes from Emacs/trunk:
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82951
diff
changeset
|
2453 (concat "^" (regexp-quote message-yank-prefix) "[ \t]*"))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2454 (if (featurep 'xemacs) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2455 (message-setup-toolbar) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2456 (set (make-local-variable 'font-lock-defaults) |
32964
352449d35643
(message-mode-menu): Add some :help strings.
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
2457 '(message-font-lock-keywords t)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2458 (if (boundp 'tool-bar-map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2459 (set (make-local-variable 'tool-bar-map) (message-tool-bar-map)))) |
17493 | 2460 (easy-menu-add message-mode-menu message-mode-map) |
2461 (easy-menu-add message-mode-field-menu message-mode-map) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2462 (gnus-make-local-hook 'after-change-functions) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2463 ;; Mmmm... Forbidden properties... |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2464 (add-hook 'after-change-functions 'message-strip-forbidden-properties |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2465 nil 'local) |
17493 | 2466 ;; Allow mail alias things. |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
2467 (when (eq message-mail-alias-type 'abbrev) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
2468 (if (fboundp 'mail-abbrevs-setup) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
2469 (mail-abbrevs-setup) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2470 (if (fboundp 'mail-aliases-setup) ; warning avoidance |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2471 (mail-aliases-setup)))) |
44075
7782e54757bb
* mail-source.el (make-source-make-complex-temp-name): Use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
43075
diff
changeset
|
2472 (unless buffer-file-name |
7782e54757bb
* mail-source.el (make-source-make-complex-temp-name): Use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
43075
diff
changeset
|
2473 (message-set-auto-save-file-name)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2474 (unless (buffer-base-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2475 ;; Don't enable multibyte on an indirect buffer. Maybe enabling |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2476 ;; multibyte is not necessary at all. -- zsh |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2477 (mm-enable-multibyte)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2478 (set (make-local-variable 'indent-tabs-mode) nil) ;No tabs for indentation. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2479 (mml-mode)) |
17493 | 2480 |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2481 (defun message-setup-fill-variables () |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2482 "Setup message fill variables." |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2483 (set (make-local-variable 'fill-paragraph-function) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2484 'message-fill-paragraph) |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2485 (make-local-variable 'paragraph-separate) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2486 (make-local-variable 'paragraph-start) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2487 (make-local-variable 'adaptive-fill-regexp) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2488 (unless (boundp 'adaptive-fill-first-line-regexp) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2489 (setq adaptive-fill-first-line-regexp nil)) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2490 (make-local-variable 'adaptive-fill-first-line-regexp) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2491 (let ((quote-prefix-regexp |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2492 ;; User should change message-cite-prefix-regexp if |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2493 ;; message-yank-prefix is set to an abnormal value. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2494 (concat "\\(" message-cite-prefix-regexp "\\)[ \t]*"))) |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2495 (setq paragraph-start |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2496 (concat |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2497 (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:
54287
diff
changeset
|
2498 "[ \t]*$\\|" ; blank lines |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2499 "-- $\\|" ; signature delimiter |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2500 "---+$\\|" ; delimiters for forwarded messages |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2501 page-delimiter "$\\|" ; spoiler warnings |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2502 ".*wrote:$\\|" ; attribution lines |
82975
590114f9753d
2004-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82966
diff
changeset
|
2503 quote-prefix-regexp "$\\|" ; empty lines in quoted text |
590114f9753d
2004-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82966
diff
changeset
|
2504 ; mml tags |
590114f9753d
2004-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82966
diff
changeset
|
2505 "<#!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\)")) |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2506 (setq paragraph-separate paragraph-start) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2507 (setq adaptive-fill-regexp |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2508 (concat quote-prefix-regexp "\\|" adaptive-fill-regexp)) |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2509 (setq adaptive-fill-first-line-regexp |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2510 (concat quote-prefix-regexp "\\|" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2511 adaptive-fill-first-line-regexp))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2512 (make-local-variable 'auto-fill-inhibit-regexp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2513 ;;(setq auto-fill-inhibit-regexp "^[A-Z][^: \n\t]+:") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2514 (setq auto-fill-inhibit-regexp nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2515 (make-local-variable 'normal-auto-fill-function) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2516 (setq normal-auto-fill-function 'message-do-auto-fill) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2517 ;; KLUDGE: auto fill might already be turned on in `text-mode-hook'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2518 ;; In that case, ensure that it uses the right function. The real |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2519 ;; solution would be not to use `define-derived-mode', and run |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2520 ;; `text-mode-hook' ourself at the end of the mode. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2521 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> Date: 2001-10-19. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2522 (when auto-fill-function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2523 (setq auto-fill-function normal-auto-fill-function))) |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2524 |
17493 | 2525 |
2526 | |
2527 ;;; | |
2528 ;;; Message mode commands | |
2529 ;;; | |
2530 | |
2531 ;;; Movement commands | |
2532 | |
2533 (defun message-goto-to () | |
2534 "Move point to the To header." | |
2535 (interactive) | |
2536 (message-position-on-field "To")) | |
2537 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2538 (defun message-goto-from () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2539 "Move point to the From header." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2540 (interactive) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2541 (message-position-on-field "From")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2542 |
17493 | 2543 (defun message-goto-subject () |
2544 "Move point to the Subject header." | |
2545 (interactive) | |
2546 (message-position-on-field "Subject")) | |
2547 | |
2548 (defun message-goto-cc () | |
2549 "Move point to the Cc header." | |
2550 (interactive) | |
2551 (message-position-on-field "Cc" "To")) | |
2552 | |
2553 (defun message-goto-bcc () | |
2554 "Move point to the Bcc header." | |
2555 (interactive) | |
2556 (message-position-on-field "Bcc" "Cc" "To")) | |
2557 | |
2558 (defun message-goto-fcc () | |
2559 "Move point to the Fcc header." | |
2560 (interactive) | |
2561 (message-position-on-field "Fcc" "To" "Newsgroups")) | |
2562 | |
2563 (defun message-goto-reply-to () | |
2564 "Move point to the Reply-To header." | |
2565 (interactive) | |
2566 (message-position-on-field "Reply-To" "Subject")) | |
2567 | |
2568 (defun message-goto-newsgroups () | |
2569 "Move point to the Newsgroups header." | |
2570 (interactive) | |
2571 (message-position-on-field "Newsgroups")) | |
2572 | |
2573 (defun message-goto-distribution () | |
2574 "Move point to the Distribution header." | |
2575 (interactive) | |
2576 (message-position-on-field "Distribution")) | |
2577 | |
2578 (defun message-goto-followup-to () | |
2579 "Move point to the Followup-To header." | |
2580 (interactive) | |
2581 (message-position-on-field "Followup-To" "Newsgroups")) | |
2582 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2583 (defun message-goto-mail-followup-to () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2584 "Move point to the Mail-Followup-To header." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2585 (interactive) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2586 (message-position-on-field "Mail-Followup-To" "From")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2587 |
17493 | 2588 (defun message-goto-keywords () |
2589 "Move point to the Keywords header." | |
2590 (interactive) | |
2591 (message-position-on-field "Keywords" "Subject")) | |
2592 | |
2593 (defun message-goto-summary () | |
2594 "Move point to the Summary header." | |
2595 (interactive) | |
2596 (message-position-on-field "Summary" "Subject")) | |
2597 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2598 (defun message-goto-body (&optional interactivep) |
17493 | 2599 "Move point to the beginning of the message body." |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2600 (interactive (list t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2601 (when (and interactivep |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2602 (looking-at "[ \t]*\n")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2603 (expand-abbrev)) |
17493 | 2604 (goto-char (point-min)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2605 (or (search-forward (concat "\n" mail-header-separator "\n") nil t) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2606 (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t))) |
17493 | 2607 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2608 (defun message-goto-eoh () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2609 "Move point to the end of the headers." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2610 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2611 (message-goto-body) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2612 (forward-line -1)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2613 |
17493 | 2614 (defun message-goto-signature () |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2615 "Move point to the beginning of the message signature. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2616 If there is no signature in the article, go to the end and |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2617 return nil." |
17493 | 2618 (interactive) |
2619 (goto-char (point-min)) | |
2620 (if (re-search-forward message-signature-separator nil t) | |
2621 (forward-line 1) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2622 (goto-char (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2623 nil)) |
17493 | 2624 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2625 (defun message-generate-unsubscribed-mail-followup-to (&optional include-cc) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2626 "Insert a reasonable MFT header in a post to an unsubscribed list. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2627 When making original posts to a mailing list you are not subscribed to, |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2628 you have to type in a MFT header by hand. The contents, usually, are |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2629 the addresses of the list and your own address. This function inserts |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2630 such a header automatically. It fetches the contents of the To: header |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2631 in the current mail buffer, and appends the current `user-mail-address'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2632 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2633 If the optional argument INCLUDE-CC is non-nil, the addresses in the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2634 Cc: header are also put into the MFT." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2635 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2636 (interactive "P") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2637 (let* (cc tos) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2638 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2639 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2640 (message-remove-header "Mail-Followup-To") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2641 (setq cc (and include-cc (message-fetch-field "Cc"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2642 (setq tos (if cc |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2643 (concat (message-fetch-field "To") "," cc) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2644 (message-fetch-field "To")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2645 (message-goto-mail-followup-to) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2646 (insert (concat tos ", " user-mail-address)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2647 |
17493 | 2648 |
2649 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
2650 (defun message-insert-to (&optional force) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
2651 "Insert a To header that points to the author of the article being replied to. |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2652 If the original author requested not to be sent mail, don't insert unless the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2653 prefix FORCE is given." |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
2654 (interactive "P") |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2655 (let* ((mct (message-fetch-reply-field "mail-copies-to")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2656 (dont (and mct (or (equal (downcase mct) "never") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2657 (equal (downcase mct) "nobody")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2658 (to (or (message-fetch-reply-field "mail-reply-to") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2659 (message-fetch-reply-field "reply-to") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2660 (message-fetch-reply-field "from")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2661 (when (and dont to) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2662 (message |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2663 (if force |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2664 "Ignoring the user request not to have copies sent via mail" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2665 "Complying with the user request not to have copies sent via mail"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2666 (when (and force (not to)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2667 (error "No mail address in the article")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2668 (when (and to (or force (not dont))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2669 (message-carefully-insert-headers (list (cons 'To to)))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2670 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2671 (defun message-insert-wide-reply () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2672 "Insert To and Cc headers as if you were doing a wide reply." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2673 (interactive) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2674 (let ((headers (message-with-reply-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2675 (message-get-reply-headers t)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2676 (message-carefully-insert-headers headers))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2677 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2678 (defcustom message-header-synonyms |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2679 '((To Cc Bcc)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2680 "List of lists of header synonyms. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2681 E.g., if this list contains a member list with elements `Cc' and `To', |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2682 then `message-carefully-insert-headers' will not insert a `To' header |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2683 when the message is already `Cc'ed to the recipient." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2684 :group 'message-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2685 :link '(custom-manual "(message)Message Headers") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2686 :type '(repeat sexp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2687 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2688 (defun message-carefully-insert-headers (headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2689 "Insert the HEADERS, an alist, into the message buffer. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2690 Does not insert the headers when they are already present there |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2691 or in the synonym headers, defined by `message-header-synonyms'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2692 ;; FIXME: Should compare only the address and not the full name. Comparison |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2693 ;; should be done case-folded (and with `string=' rather than |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2694 ;; `string-match'). |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2695 (dolist (header headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2696 (let* ((header-name (symbol-name (car header))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2697 (new-header (cdr header)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2698 (synonyms (loop for synonym in message-header-synonyms |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2699 when (memq (car header) synonym) return synonym)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2700 (old-header |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2701 (loop for synonym in synonyms |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2702 for old-header = (mail-fetch-field (symbol-name synonym)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2703 when (and old-header (string-match new-header old-header)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2704 return synonym))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2705 (if old-header |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2706 (message "already have `%s' in `%s'" new-header old-header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2707 (when (and (message-position-on-field header-name) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2708 (setq old-header (mail-fetch-field header-name)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2709 (not (string-match "\\` *\\'" old-header))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2710 (insert ", ")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2711 (insert new-header))))) |
17493 | 2712 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2713 (defun message-widen-reply () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2714 "Widen the reply to include maximum recipients." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2715 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2716 (let ((follow-to |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2717 (and message-reply-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2718 (buffer-name message-reply-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2719 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2720 (set-buffer message-reply-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2721 (message-get-reply-headers t))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2722 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2723 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2724 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2725 (dolist (elem follow-to) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2726 (message-remove-header (symbol-name (car elem))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2727 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2728 (insert (symbol-name (car elem)) ": " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2729 (cdr elem) "\n")))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2730 |
17493 | 2731 (defun message-insert-newsgroups () |
2732 "Insert the Newsgroups header from the article being replied to." | |
2733 (interactive) | |
2734 (when (and (message-position-on-field "Newsgroups") | |
2735 (mail-fetch-field "newsgroups") | |
2736 (not (string-match "\\` *\\'" (mail-fetch-field "newsgroups")))) | |
2737 (insert ",")) | |
2738 (insert (or (message-fetch-reply-field "newsgroups") ""))) | |
2739 | |
2740 | |
2741 | |
2742 ;;; Various commands | |
2743 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2744 (defun message-delete-not-region (beg end) |
35147 | 2745 "Delete everything in the body of the current message outside of the region." |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2746 (interactive "r") |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2747 (let (citeprefix) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2748 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2749 (goto-char beg) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2750 ;; snarf citation prefix, if appropriate |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2751 (unless (eq (point) (progn (beginning-of-line) (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2752 (when (looking-at message-cite-prefix-regexp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2753 (setq citeprefix (match-string 0)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2754 (goto-char end) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2755 (delete-region (point) (if (not (message-goto-signature)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2756 (point) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2757 (forward-line -2) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2758 (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2759 (insert "\n") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2760 (goto-char beg) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2761 (delete-region beg (progn (message-goto-body) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2762 (forward-line 2) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2763 (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2764 (when citeprefix |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2765 (insert citeprefix)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2766 (when (message-goto-signature) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2767 (forward-line -2))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2768 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2769 (defun message-kill-to-signature () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2770 "Deletes all text up to the signature." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2771 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2772 (let ((point (point))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2773 (message-goto-signature) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2774 (unless (eobp) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2775 (end-of-line -1)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2776 (kill-region point (point)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2777 (unless (bolp) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2778 (insert "\n")))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2779 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2780 (defun message-newline-and-reformat (&optional arg not-break) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2781 "Insert four newlines, and then reformat if inside quoted text. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2782 Prefix arg means justify as well." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2783 (interactive (list (if current-prefix-arg 'full))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2784 (let (quoted point beg end leading-space bolp) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2785 (setq point (point)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2786 (beginning-of-line) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2787 (setq beg (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2788 (setq bolp (= beg point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2789 ;; Find first line of the paragraph. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2790 (if not-break |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2791 (while (and (not (eobp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2792 (not (looking-at message-cite-prefix-regexp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2793 (looking-at paragraph-start)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2794 (forward-line 1))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2795 ;; Find the prefix |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2796 (when (looking-at message-cite-prefix-regexp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2797 (setq quoted (match-string 0)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2798 (goto-char (match-end 0)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2799 (looking-at "[ \t]*") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2800 (setq leading-space (match-string 0))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2801 (if (and quoted |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2802 (not not-break) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2803 (not bolp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2804 (< (- point beg) (length quoted))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2805 ;; break inside the cite prefix. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2806 (setq quoted nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2807 end nil)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2808 (if quoted |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2809 (progn |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2810 (forward-line 1) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2811 (while (and (not (eobp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2812 (not (looking-at paragraph-separate)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2813 (looking-at message-cite-prefix-regexp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2814 (equal quoted (match-string 0))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2815 (goto-char (match-end 0)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2816 (looking-at "[ \t]*") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2817 (if (> (length leading-space) (length (match-string 0))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2818 (setq leading-space (match-string 0))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2819 (forward-line 1)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2820 (setq end (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2821 (goto-char beg) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2822 (while (and (if (bobp) nil (forward-line -1) t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2823 (not (looking-at paragraph-start)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2824 (looking-at message-cite-prefix-regexp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2825 (equal quoted (match-string 0))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2826 (setq beg (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2827 (goto-char (match-end 0)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2828 (looking-at "[ \t]*") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2829 (if (> (length leading-space) (length (match-string 0))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2830 (setq leading-space (match-string 0))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2831 (while (and (not (eobp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2832 (not (looking-at paragraph-separate)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2833 (not (looking-at message-cite-prefix-regexp))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2834 (forward-line 1)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2835 (setq end (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2836 (goto-char beg) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2837 (while (and (if (bobp) nil (forward-line -1) t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2838 (not (looking-at paragraph-start)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2839 (not (looking-at message-cite-prefix-regexp))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2840 (setq beg (point)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2841 (goto-char point) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2842 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2843 (narrow-to-region beg end) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2844 (if not-break |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2845 (setq point nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2846 (if bolp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2847 (newline) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2848 (newline) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2849 (newline)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2850 (setq point (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2851 ;; (newline 2) doesn't mark both newline's as hard, so call |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2852 ;; newline twice. -jas |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2853 (newline) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2854 (newline) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2855 (delete-region (point) (re-search-forward "[ \t]*")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2856 (when (and quoted (not bolp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2857 (insert quoted leading-space))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2858 (undo-boundary) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2859 (if quoted |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2860 (let* ((adaptive-fill-regexp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2861 (regexp-quote (concat quoted leading-space))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2862 (adaptive-fill-first-line-regexp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2863 adaptive-fill-regexp )) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2864 (fill-paragraph arg)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2865 (fill-paragraph arg)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2866 (if point (goto-char point))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2867 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2868 (defun message-fill-paragraph (&optional arg) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2869 "Like `fill-paragraph'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2870 (interactive (list (if current-prefix-arg 'full))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2871 (if (if (boundp 'filladapt-mode) filladapt-mode) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2872 nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2873 (message-newline-and-reformat arg t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2874 t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2875 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2876 ;; Is it better to use `mail-header-end'? |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2877 (defun message-point-in-header-p () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2878 "Return t if point is in the header." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2879 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2880 (let ((p (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2881 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2882 (not (re-search-forward |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2883 (concat "^" (regexp-quote mail-header-separator) "\n") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2884 p t))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2885 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2886 (defun message-do-auto-fill () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2887 "Like `do-auto-fill', but don't fill in message header." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2888 (unless (message-point-in-header-p) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2889 (do-auto-fill))) |
49034
b6e082e00b00
(message-split-line): New function.
Kim F. Storm <storm@cua.dk>
parents:
48588
diff
changeset
|
2890 |
17493 | 2891 (defun message-insert-signature (&optional force) |
35147 | 2892 "Insert a signature. See documentation for variable `message-signature'." |
17493 | 2893 (interactive (list 0)) |
2894 (let* ((signature | |
2895 (cond | |
2896 ((and (null message-signature) | |
2897 (eq force 0)) | |
2898 (save-excursion | |
2899 (goto-char (point-max)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2900 (not (re-search-backward message-signature-separator nil t)))) |
17493 | 2901 ((and (null message-signature) |
2902 force) | |
2903 t) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2904 ((functionp message-signature) |
17493 | 2905 (funcall message-signature)) |
2906 ((listp message-signature) | |
2907 (eval message-signature)) | |
2908 (t message-signature))) | |
2909 (signature | |
2910 (cond ((stringp signature) | |
2911 signature) | |
2912 ((and (eq t signature) | |
2913 message-signature-file | |
2914 (file-exists-p message-signature-file)) | |
2915 signature)))) | |
2916 (when signature | |
2917 (goto-char (point-max)) | |
2918 ;; Insert the signature. | |
2919 (unless (bolp) | |
2920 (insert "\n")) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2921 (when message-signature-insert-empty-line |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2922 (insert "\n")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2923 (insert "-- \n") |
17493 | 2924 (if (eq signature t) |
2925 (insert-file-contents message-signature-file) | |
2926 (insert signature)) | |
2927 (goto-char (point-max)) | |
2928 (or (bolp) (insert "\n"))))) | |
2929 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2930 (defun message-insert-importance-high () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2931 "Insert header to mark message as important." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2932 (interactive) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2933 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2934 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2935 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2936 (message-remove-header "Importance")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2937 (message-goto-eoh) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2938 (insert "Importance: high\n"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2939 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2940 (defun message-insert-importance-low () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2941 "Insert header to mark message as unimportant." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2942 (interactive) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2943 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2944 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2945 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2946 (message-remove-header "Importance")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2947 (message-goto-eoh) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2948 (insert "Importance: low\n"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2949 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2950 (defun message-insert-or-toggle-importance () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2951 "Insert a \"Importance: high\" header, or cycle through the header values. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2952 The three allowed values according to RFC 1327 are `high', `normal' |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2953 and `low'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2954 (interactive) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2955 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2956 (let ((valid '("high" "normal" "low")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2957 (new "high") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2958 cur) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2959 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2960 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2961 (when (setq cur (message-fetch-field "Importance")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2962 (message-remove-header "Importance") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2963 (setq new (cond ((string= cur "high") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2964 "low") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2965 ((string= cur "low") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2966 "normal") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2967 (t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2968 "high"))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2969 (message-goto-eoh) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2970 (insert (format "Importance: %s\n" new))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2971 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2972 (defun message-insert-disposition-notification-to () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2973 "Request a disposition notification (return receipt) to this message. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2974 Note that this should not be used in newsgroups." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2975 (interactive) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2976 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2977 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2978 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2979 (message-remove-header "Disposition-Notification-To")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2980 (message-goto-eoh) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2981 (insert (format "Disposition-Notification-To: %s\n" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2982 (or (message-field-value "Reply-to") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2983 (message-field-value "From") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2984 (message-make-from)))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
2985 |
17493 | 2986 (defun message-elide-region (b e) |
35147 | 2987 "Elide the text in the region. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2988 An ellipsis (from `message-elide-ellipsis') will be inserted where the |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2989 text was killed." |
17493 | 2990 (interactive "r") |
2991 (kill-region b e) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2992 (insert message-elide-ellipsis)) |
17493 | 2993 |
2994 (defvar message-caesar-translation-table nil) | |
2995 | |
2996 (defun message-caesar-region (b e &optional n) | |
35147 | 2997 "Caesar rotate region B to E by N, default 13, for decrypting netnews." |
17493 | 2998 (interactive |
2999 (list | |
3000 (min (point) (or (mark t) (point))) | |
3001 (max (point) (or (mark t) (point))) | |
3002 (when current-prefix-arg | |
3003 (prefix-numeric-value current-prefix-arg)))) | |
3004 | |
3005 (setq n (if (numberp n) (mod n 26) 13)) ;canonize N | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3006 (unless (or (zerop n) ; no action needed for a rot of 0 |
17493 | 3007 (= b e)) ; no region to rotate |
3008 ;; We build the table, if necessary. | |
3009 (when (or (not message-caesar-translation-table) | |
3010 (/= (aref message-caesar-translation-table ?a) (+ ?a n))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3011 (setq message-caesar-translation-table |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3012 (message-make-caesar-translation-table n))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3013 (translate-region b e message-caesar-translation-table))) |
17493 | 3014 |
3015 (defun message-make-caesar-translation-table (n) | |
3016 "Create a rot table with offset N." | |
3017 (let ((i -1) | |
3018 (table (make-string 256 0))) | |
3019 (while (< (incf i) 256) | |
3020 (aset table i i)) | |
3021 (concat | |
3022 (substring table 0 ?A) | |
3023 (substring table (+ ?A n) (+ ?A n (- 26 n))) | |
3024 (substring table ?A (+ ?A n)) | |
3025 (substring table (+ ?A 26) ?a) | |
3026 (substring table (+ ?a n) (+ ?a n (- 26 n))) | |
3027 (substring table ?a (+ ?a n)) | |
3028 (substring table (+ ?a 26) 255)))) | |
3029 | |
3030 (defun message-caesar-buffer-body (&optional rotnum) | |
35147 | 3031 "Caesar rotate all letters in the current buffer by 13 places. |
3032 Used to encode/decode possibly offensive messages (commonly in rec.humor). | |
17493 | 3033 With prefix arg, specifies the number of places to rotate each letter forward. |
3034 Mail and USENET news headers are not rotated." | |
3035 (interactive (if current-prefix-arg | |
3036 (list (prefix-numeric-value current-prefix-arg)) | |
3037 (list nil))) | |
3038 (save-excursion | |
3039 (save-restriction | |
3040 (when (message-goto-body) | |
3041 (narrow-to-region (point) (point-max))) | |
3042 (message-caesar-region (point-min) (point-max) rotnum)))) | |
3043 | |
3044 (defun message-pipe-buffer-body (program) | |
3045 "Pipe the message body in the current buffer through PROGRAM." | |
3046 (save-excursion | |
3047 (save-restriction | |
3048 (when (message-goto-body) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3049 (narrow-to-region (point) (point-max))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3050 (shell-command-on-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3051 (point-min) (point-max) program nil t)))) |
17493 | 3052 |
3053 (defun message-rename-buffer (&optional enter-string) | |
3054 "Rename the *message* buffer to \"*message* RECIPIENT\". | |
3055 If the function is run with a prefix, it will ask for a new buffer | |
3056 name, rather than giving an automatic name." | |
3057 (interactive "Pbuffer name: ") | |
3058 (save-excursion | |
3059 (save-restriction | |
3060 (goto-char (point-min)) | |
3061 (narrow-to-region (point) | |
3062 (search-forward mail-header-separator nil 'end)) | |
3063 (let* ((mail-to (or | |
3064 (if (message-news-p) (message-fetch-field "Newsgroups") | |
3065 (message-fetch-field "To")) | |
3066 "")) | |
3067 (mail-trimmed-to | |
3068 (if (string-match "," mail-to) | |
3069 (concat (substring mail-to 0 (match-beginning 0)) ", ...") | |
3070 mail-to)) | |
3071 (name-default (concat "*message* " mail-trimmed-to)) | |
3072 (name (if enter-string | |
3073 (read-string "New buffer name: " name-default) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3074 name-default))) |
17493 | 3075 (rename-buffer name t))))) |
3076 | |
3077 (defun message-fill-yanked-message (&optional justifyp) | |
3078 "Fill the paragraphs of a message yanked into this one. | |
3079 Numeric argument means justify as well." | |
3080 (interactive "P") | |
3081 (save-excursion | |
3082 (goto-char (point-min)) | |
3083 (search-forward (concat "\n" mail-header-separator "\n") nil t) | |
3084 (let ((fill-prefix message-yank-prefix)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3085 (fill-individual-paragraphs (point) (point-max) justifyp)))) |
17493 | 3086 |
3087 (defun message-indent-citation () | |
3088 "Modify text just inserted from a message to be cited. | |
3089 The inserted text should be the region. | |
3090 When this function returns, the region is again around the modified text. | |
3091 | |
3092 Normally, indent each nonblank line `message-indentation-spaces' spaces. | |
3093 However, if `message-yank-prefix' is non-nil, insert that prefix on each line." | |
3094 (let ((start (point))) | |
3095 ;; Remove unwanted headers. | |
3096 (when message-ignored-cited-headers | |
3097 (let (all-removed) | |
3098 (save-restriction | |
3099 (narrow-to-region | |
3100 (goto-char start) | |
3101 (if (search-forward "\n\n" nil t) | |
3102 (1- (point)) | |
3103 (point))) | |
3104 (message-remove-header message-ignored-cited-headers t) | |
3105 (when (= (point-min) (point-max)) | |
3106 (setq all-removed t)) | |
3107 (goto-char (point-max))) | |
3108 (if all-removed | |
3109 (goto-char start) | |
3110 (forward-line 1)))) | |
3111 ;; Delete blank lines at the start of the buffer. | |
3112 (while (and (point-min) | |
3113 (eolp) | |
3114 (not (eobp))) | |
3115 (message-delete-line)) | |
3116 ;; Delete blank lines at the end of the buffer. | |
3117 (goto-char (point-max)) | |
3118 (unless (eolp) | |
3119 (insert "\n")) | |
3120 (while (and (zerop (forward-line -1)) | |
3121 (looking-at "$")) | |
3122 (message-delete-line)) | |
3123 ;; Do the indentation. | |
3124 (if (null message-yank-prefix) | |
3125 (indent-rigidly start (mark t) message-indentation-spaces) | |
3126 (save-excursion | |
3127 (goto-char start) | |
3128 (while (< (point) (mark t)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3129 (if (or (looking-at ">") (looking-at "^$")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3130 (insert message-yank-cited-prefix) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3131 (insert message-yank-prefix)) |
17493 | 3132 (forward-line 1)))) |
3133 (goto-char start))) | |
3134 | |
3135 (defun message-yank-original (&optional arg) | |
3136 "Insert the message being replied to, if any. | |
3137 Puts point before the text and mark after. | |
3138 Normally indents each nonblank line ARG spaces (default 3). However, | |
3139 if `message-yank-prefix' is non-nil, insert that prefix on each line. | |
3140 | |
3141 This function uses `message-cite-function' to do the actual citing. | |
3142 | |
3143 Just \\[universal-argument] as argument means don't indent, insert no | |
3144 prefix, and don't delete any headers." | |
3145 (interactive "P") | |
3146 (let ((modified (buffer-modified-p))) | |
3147 (when (and message-reply-buffer | |
3148 message-cite-function) | |
3149 (delete-windows-on message-reply-buffer t) | |
3150 (insert-buffer message-reply-buffer) | |
35453
26726eff41ca
2001-01-21 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35147
diff
changeset
|
3151 (unless arg |
26726eff41ca
2001-01-21 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35147
diff
changeset
|
3152 (funcall message-cite-function)) |
17493 | 3153 (message-exchange-point-and-mark) |
3154 (unless (bolp) | |
3155 (insert ?\n)) | |
3156 (unless modified | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3157 (setq message-checksum (message-checksum)))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3158 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3159 (defun message-yank-buffer (buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3160 "Insert BUFFER into the current buffer and quote it." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3161 (interactive "bYank buffer: ") |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3162 (let ((message-reply-buffer (get-buffer buffer))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3163 (save-window-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3164 (message-yank-original)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3165 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3166 (defun message-buffers () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3167 "Return a list of active message buffers." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3168 (let (buffers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3169 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3170 (dolist (buffer (buffer-list t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3171 (set-buffer buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3172 (when (and (eq major-mode 'message-mode) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3173 (null message-sent-message-via)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3174 (push (buffer-name buffer) buffers)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3175 (nreverse buffers))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3176 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3177 (defun message-cite-original-without-signature () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3178 "Cite function in the standard Message manner." |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3179 (let* ((start (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3180 (end (mark t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3181 (functions |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3182 (when message-indent-citation-function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3183 (if (listp message-indent-citation-function) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3184 message-indent-citation-function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3185 (list message-indent-citation-function)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3186 ;; This function may be called by `gnus-summary-yank-message' and |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3187 ;; may insert a different article from the original. So, we will |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3188 ;; modify the value of `message-reply-headers' with that article. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3189 (message-reply-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3190 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3191 (narrow-to-region start end) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3192 (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:
54287
diff
changeset
|
3193 (vector 0 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3194 (or (message-fetch-field "subject") "none") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3195 (message-fetch-field "from") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3196 (message-fetch-field "date") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3197 (message-fetch-field "message-id" t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3198 (message-fetch-field "references") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3199 0 0 "")))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3200 (mml-quote-region start end) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3201 ;; Allow undoing. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3202 (undo-boundary) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3203 (goto-char end) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3204 (when (re-search-backward message-signature-separator start t) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3205 ;; Also peel off any blank lines before the signature. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3206 (forward-line -1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3207 (while (looking-at "^[ \t]*$") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3208 (forward-line -1)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3209 (forward-line 1) |
35453
26726eff41ca
2001-01-21 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35147
diff
changeset
|
3210 (delete-region (point) end) |
26726eff41ca
2001-01-21 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35147
diff
changeset
|
3211 (unless (search-backward "\n\n" start t) |
26726eff41ca
2001-01-21 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35147
diff
changeset
|
3212 ;; Insert a blank line if it is peeled off. |
26726eff41ca
2001-01-21 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35147
diff
changeset
|
3213 (insert "\n"))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3214 (goto-char start) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3215 (while functions |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3216 (funcall (pop functions))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3217 (when message-citation-line-function |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3218 (unless (bolp) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3219 (insert "\n")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3220 (funcall message-citation-line-function)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3221 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3222 (eval-when-compile (defvar mail-citation-hook)) ;Compiler directive |
17493 | 3223 (defun message-cite-original () |
3224 "Cite function in the standard Message manner." | |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
3225 (if (and (boundp 'mail-citation-hook) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3226 mail-citation-hook) |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
3227 (run-hooks 'mail-citation-hook) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3228 (let* ((start (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3229 (end (mark t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3230 (functions |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3231 (when message-indent-citation-function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3232 (if (listp message-indent-citation-function) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3233 message-indent-citation-function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3234 (list message-indent-citation-function)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3235 ;; This function may be called by `gnus-summary-yank-message' and |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3236 ;; may insert a different article from the original. So, we will |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3237 ;; modify the value of `message-reply-headers' with that article. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3238 (message-reply-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3239 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3240 (narrow-to-region start end) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3241 (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:
54287
diff
changeset
|
3242 (vector 0 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3243 (or (message-fetch-field "subject") "none") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3244 (message-fetch-field "from") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3245 (message-fetch-field "date") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3246 (message-fetch-field "message-id" t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3247 (message-fetch-field "references") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3248 0 0 "")))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3249 (mml-quote-region start end) |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
3250 (goto-char start) |
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
3251 (while functions |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3252 (funcall (pop functions))) |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
3253 (when message-citation-line-function |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3254 (unless (bolp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3255 (insert "\n")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3256 (funcall message-citation-line-function))))) |
17493 | 3257 |
3258 (defun message-insert-citation-line () | |
35147 | 3259 "Insert a simple citation line." |
17493 | 3260 (when message-reply-headers |
3261 (insert (mail-header-from message-reply-headers) " writes:\n\n"))) | |
3262 | |
3263 (defun message-position-on-field (header &rest afters) | |
3264 (let ((case-fold-search t)) | |
3265 (save-restriction | |
3266 (narrow-to-region | |
3267 (goto-char (point-min)) | |
3268 (progn | |
3269 (re-search-forward | |
3270 (concat "^" (regexp-quote mail-header-separator) "$")) | |
3271 (match-beginning 0))) | |
3272 (goto-char (point-min)) | |
3273 (if (re-search-forward (concat "^" (regexp-quote header) ":") nil t) | |
3274 (progn | |
3275 (re-search-forward "^[^ \t]" nil 'move) | |
3276 (beginning-of-line) | |
3277 (skip-chars-backward "\n") | |
3278 t) | |
3279 (while (and afters | |
3280 (not (re-search-forward | |
3281 (concat "^" (regexp-quote (car afters)) ":") | |
3282 nil t))) | |
3283 (pop afters)) | |
3284 (when afters | |
3285 (re-search-forward "^[^ \t]" nil 'move) | |
3286 (beginning-of-line)) | |
3287 (insert header ": \n") | |
3288 (forward-char -1) | |
3289 nil)))) | |
3290 | |
3291 (defun message-remove-signature () | |
3292 "Remove the signature from the text between point and mark. | |
3293 The text will also be indented the normal way." | |
3294 (save-excursion | |
3295 (let ((start (point)) | |
3296 mark) | |
3297 (if (not (re-search-forward message-signature-separator (mark t) t)) | |
3298 ;; No signature here, so we just indent the cited text. | |
3299 (message-indent-citation) | |
3300 ;; Find the last non-empty line. | |
3301 (forward-line -1) | |
3302 (while (looking-at "[ \t]*$") | |
3303 (forward-line -1)) | |
3304 (forward-line 1) | |
3305 (setq mark (set-marker (make-marker) (point))) | |
3306 (goto-char start) | |
3307 (message-indent-citation) | |
3308 ;; Enable undoing the deletion. | |
3309 (undo-boundary) | |
3310 (delete-region mark (mark t)) | |
3311 (set-marker mark nil))))) | |
3312 | |
3313 | |
3314 | |
3315 ;;; | |
3316 ;;; Sending messages | |
3317 ;;; | |
3318 | |
3319 (defun message-send-and-exit (&optional arg) | |
3320 "Send message like `message-send', then, if no errors, exit from mail buffer." | |
3321 (interactive "P") | |
3322 (let ((buf (current-buffer)) | |
3323 (actions message-exit-actions)) | |
3324 (when (and (message-send arg) | |
3325 (buffer-name buf)) | |
3326 (if message-kill-buffer-on-exit | |
3327 (kill-buffer buf) | |
3328 (bury-buffer buf) | |
3329 (when (eq buf (current-buffer)) | |
3330 (message-bury buf))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3331 (message-do-actions actions) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3332 t))) |
17493 | 3333 |
3334 (defun message-dont-send () | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3335 "Don't send the message you have been editing. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3336 Instead, just auto-save the buffer and then bury it." |
17493 | 3337 (interactive) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3338 (set-buffer-modified-p t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3339 (save-buffer) |
17493 | 3340 (let ((actions message-postpone-actions)) |
3341 (message-bury (current-buffer)) | |
3342 (message-do-actions actions))) | |
3343 | |
3344 (defun message-kill-buffer () | |
3345 "Kill the current buffer." | |
3346 (interactive) | |
3347 (when (or (not (buffer-modified-p)) | |
3348 (yes-or-no-p "Message modified; kill anyway? ")) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3349 (let ((actions message-kill-actions) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3350 (draft-article message-draft-article) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3351 (auto-save-file-name buffer-auto-save-file-name) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3352 (file-name buffer-file-name) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3353 (modified (buffer-modified-p))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3354 (setq buffer-file-name nil) |
17493 | 3355 (kill-buffer (current-buffer)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3356 (when (and (or (and auto-save-file-name |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3357 (file-exists-p auto-save-file-name)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3358 (and file-name |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3359 (file-exists-p file-name))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3360 (yes-or-no-p (format "Remove the backup file%s? " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3361 (if modified " too" "")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3362 (ignore-errors |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3363 (delete-file auto-save-file-name)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3364 (let ((message-draft-article draft-article)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3365 (message-disassociate-draft))) |
17493 | 3366 (message-do-actions actions)))) |
3367 | |
3368 (defun message-bury (buffer) | |
35147 | 3369 "Bury this mail BUFFER." |
17493 | 3370 (let ((newbuf (other-buffer buffer))) |
3371 (bury-buffer buffer) | |
3372 (if (and (fboundp 'frame-parameters) | |
3373 (cdr (assq 'dedicated (frame-parameters))) | |
3374 (not (null (delq (selected-frame) (visible-frame-list))))) | |
3375 (delete-frame (selected-frame)) | |
3376 (switch-to-buffer newbuf)))) | |
3377 | |
3378 (defun message-send (&optional arg) | |
3379 "Send the message in the current buffer. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3380 If `message-interactive' is non-nil, wait for success indication or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3381 error messages, and inform user. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3382 Otherwise any failure is reported in a message back to the user from |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3383 the mailer. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3384 The usage of ARG is defined by the instance that called Message. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3385 It should typically alter the sending method in some way or other." |
17493 | 3386 (interactive "P") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3387 ;; Make it possible to undo the coming changes. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3388 (undo-boundary) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3389 (let ((inhibit-read-only t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3390 (put-text-property (point-min) (point-max) 'read-only nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3391 (message-fix-before-sending) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3392 (run-hooks 'message-send-hook) |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3393 (message message-sending-message) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3394 (let ((alist message-send-method-alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3395 (success t) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3396 elem sent dont-barf-on-no-method |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3397 (message-options message-options)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3398 (message-options-set-recipient) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3399 (while (and success |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3400 (setq elem (pop alist))) |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3401 (when (funcall (cadr elem)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3402 (when (and (or (not (memq (car elem) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3403 message-sent-message-via)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3404 (message-fetch-field "supersedes") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3405 (if (or (message-gnksa-enable-p 'multiple-copies) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3406 (not (eq (car elem) 'news))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3407 (y-or-n-p |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3408 (format |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3409 "Already sent message via %s; resend? " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3410 (car elem))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3411 (error "Denied posting -- multiple copies"))) |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3412 (setq success (funcall (caddr elem) arg))) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3413 (setq sent t)))) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3414 (unless (or sent |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3415 (not success) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3416 (let ((fcc (message-fetch-field "Fcc")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3417 (gcc (message-fetch-field "Gcc"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3418 (when (or fcc gcc) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3419 (or (eq message-allow-no-recipients 'always) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3420 (and (not (eq message-allow-no-recipients 'never)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3421 (setq dont-barf-on-no-method |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3422 (gnus-y-or-n-p |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3423 (format "No receiver, perform %s anyway? " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3424 (cond ((and fcc gcc) "Fcc and Gcc") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3425 (fcc "Fcc") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3426 (t "Gcc")))))))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3427 (error "No methods specified to send by")) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3428 (when (or dont-barf-on-no-method |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3429 (and success sent)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3430 (message-do-fcc) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3431 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3432 (run-hooks 'message-sent-hook)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3433 (message "Sending...done") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3434 ;; Mark the buffer as unmodified and delete auto-save. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3435 (set-buffer-modified-p nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3436 (delete-auto-save-file-if-necessary t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3437 (message-disassociate-draft) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3438 ;; Delete other mail buffers and stuff. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3439 (message-do-send-housekeeping) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3440 (message-do-actions message-send-actions) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3441 ;; Return success. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3442 t))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3443 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3444 (defun message-send-via-mail (arg) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3445 "Send the current message via mail." |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3446 (message-send-mail arg)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3447 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3448 (defun message-send-via-news (arg) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3449 "Send the current message via news." |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3450 (funcall message-send-news-function arg)) |
17493 | 3451 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3452 (defmacro message-check (type &rest forms) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3453 "Eval FORMS if TYPE is to be checked." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3454 `(or (message-check-element ,type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3455 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3456 ,@forms))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3457 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3458 (put 'message-check 'lisp-indent-function 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3459 (put 'message-check 'edebug-form-spec '(form body)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3460 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3461 (defun message-text-with-property (prop) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3462 "Return a list of all points where the text has PROP." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3463 (let ((points nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3464 (point (point-min))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3465 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3466 (while (< point (point-max)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3467 (when (get-text-property point prop) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3468 (push point points)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3469 (incf point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3470 (nreverse points))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3471 |
17493 | 3472 (defun message-fix-before-sending () |
3473 "Do various things to make the message nice before sending it." | |
3474 ;; Make sure there's a newline at the end of the message. | |
3475 (goto-char (point-max)) | |
3476 (unless (bolp) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3477 (insert "\n")) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3478 ;; Make the hidden headers visible. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3479 (let ((points (message-text-with-property 'message-hidden))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3480 (when points |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3481 (goto-char (car points)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3482 (dolist (point points) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3483 (add-text-properties point (1+ point) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3484 '(invisible nil intangible nil))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3485 ;; Make invisible text visible. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3486 ;; It doesn't seem as if this is useful, since the invisible property |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3487 ;; is clobbered by an after-change hook anyhow. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3488 (message-check 'invisible-text |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3489 (let ((points (message-text-with-property 'invisible))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3490 (when points |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3491 (goto-char (car points)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3492 (dolist (point points) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3493 (put-text-property point (1+ point) 'invisible nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3494 (message-overlay-put (message-make-overlay point (1+ point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3495 'face 'highlight)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3496 (unless (yes-or-no-p |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3497 "Invisible text found and made visible; continue sending? ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3498 (error "Invisible text found and made visible"))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3499 (message-check 'illegible-text |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3500 (let (found choice) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3501 (message-goto-body) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3502 (skip-chars-forward mm-7bit-chars) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3503 (while (not (eobp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3504 (when (let ((char (char-after))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3505 (or (< (mm-char-int char) 128) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3506 (and (mm-multibyte-p) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3507 (memq (char-charset char) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3508 '(eight-bit-control eight-bit-graphic |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3509 control-1)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3510 (not (get-text-property |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3511 (point) 'untranslated-utf-8))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3512 (message-overlay-put (message-make-overlay (point) (1+ (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3513 'face 'highlight) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3514 (setq found t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3515 (forward-char) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3516 (skip-chars-forward mm-7bit-chars)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3517 (when found |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3518 (setq choice |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3519 (gnus-multiple-choice |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3520 "Non-printable characters found. Continue sending?" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3521 '((?d "Remove non-printable characters and send") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3522 (?r "Replace non-printable characters with dots and send") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3523 (?i "Ignore non-printable characters and send") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3524 (?e "Continue editing")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3525 (if (eq choice ?e) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3526 (error "Non-printable characters")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3527 (message-goto-body) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3528 (skip-chars-forward mm-7bit-chars) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3529 (while (not (eobp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3530 (when (let ((char (char-after))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3531 (or (< (mm-char-int char) 128) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3532 (and (mm-multibyte-p) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3533 ;; Fixme: Wrong for Emacs 22 and for things |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3534 ;; like undecable utf-8. Should at least |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3535 ;; use find-coding-systems-region. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3536 (memq (char-charset char) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3537 '(eight-bit-control eight-bit-graphic |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3538 control-1)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3539 (not (get-text-property |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3540 (point) 'untranslated-utf-8))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3541 (if (eq choice ?i) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3542 (message-kill-all-overlays) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3543 (delete-char 1) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3544 (when (eq choice ?r) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3545 (insert ".")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3546 (forward-char) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3547 (skip-chars-forward mm-7bit-chars)))))) |
17493 | 3548 |
3549 (defun message-add-action (action &rest types) | |
3550 "Add ACTION to be performed when doing an exit of type TYPES." | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3551 (while types |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3552 (add-to-list (intern (format "message-%s-actions" (pop types))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3553 action))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3554 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3555 (defun message-delete-action (action &rest types) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3556 "Delete ACTION from lists of actions performed when doing an exit of type TYPES." |
17493 | 3557 (let (var) |
3558 (while types | |
3559 (set (setq var (intern (format "message-%s-actions" (pop types)))) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3560 (delq action (symbol-value var)))))) |
17493 | 3561 |
3562 (defun message-do-actions (actions) | |
3563 "Perform all actions in ACTIONS." | |
3564 ;; Now perform actions on successful sending. | |
3565 (while actions | |
3566 (ignore-errors | |
3567 (cond | |
3568 ;; A simple function. | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3569 ((functionp (car actions)) |
17493 | 3570 (funcall (car actions))) |
3571 ;; Something to be evaled. | |
3572 (t | |
3573 (eval (car actions))))) | |
3574 (pop actions))) | |
3575 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3576 (defun message-send-mail-partially () |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3577 "Send mail as message/partial." |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3578 ;; replace the header delimiter with a blank line |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3579 (goto-char (point-min)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3580 (re-search-forward |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3581 (concat "^" (regexp-quote mail-header-separator) "\n")) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3582 (replace-match "\n") |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3583 (run-hooks 'message-send-mail-hook) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3584 (let ((p (goto-char (point-min))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3585 (tembuf (message-generate-new-buffer-clone-locals " message temp")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3586 (curbuf (current-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3587 (id (message-make-message-id)) (n 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3588 plist total header required-mail-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3589 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3590 (if (< (point-max) (+ p message-send-mail-partially-limit)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3591 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3592 (goto-char (+ p message-send-mail-partially-limit)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3593 (beginning-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3594 (if (<= (point) p) (forward-line 1))) ;; In case of bad message. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3595 (push p plist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3596 (setq p (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3597 (setq total (length plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3598 (push (point-max) plist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3599 (setq plist (nreverse plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3600 (unwind-protect |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3601 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3602 (setq p (pop plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3603 (while plist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3604 (set-buffer curbuf) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3605 (copy-to-buffer tembuf p (car plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3606 (set-buffer tembuf) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3607 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3608 (if header |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3609 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3610 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3611 (narrow-to-region (point) (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3612 (insert header)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3613 (message-goto-eoh) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3614 (setq header (buffer-substring (point-min) (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3615 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3616 (narrow-to-region (point) (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3617 (insert header) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3618 (message-remove-header "Mime-Version") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3619 (message-remove-header "Content-Type") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3620 (message-remove-header "Content-Transfer-Encoding") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3621 (message-remove-header "Message-ID") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3622 (message-remove-header "Lines") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3623 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3624 (insert "Mime-Version: 1.0\n") |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3625 (setq header (buffer-string))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3626 (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:
54287
diff
changeset
|
3627 (insert (format "Content-Type: message/partial; id=\"%s\"; number=%d; total=%d\n\n" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3628 id n total)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3629 (forward-char -1) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3630 (let ((mail-header-separator "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3631 (when (memq 'Message-ID message-required-mail-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3632 (insert "Message-ID: " (message-make-message-id) "\n")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3633 (when (memq 'Lines message-required-mail-headers) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3634 (insert "Lines: " (message-make-lines) "\n")) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3635 (message-goto-subject) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3636 (end-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3637 (insert (format " (%d/%d)" n total)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3638 (widen) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3639 (mm-with-unibyte-current-buffer |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3640 (funcall (or message-send-mail-real-function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3641 message-send-mail-function)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3642 (setq n (+ n 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3643 (setq p (pop plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3644 (erase-buffer))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3645 (kill-buffer tembuf)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3646 |
17493 | 3647 (defun message-send-mail (&optional arg) |
3648 (require 'mail-utils) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3649 (let* ((tembuf (message-generate-new-buffer-clone-locals " message temp")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3650 (case-fold-search nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3651 (news (message-news-p)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3652 (mailbuf (current-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3653 (message-this-is-mail t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3654 (message-posting-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3655 (if (fboundp 'gnus-setup-posting-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3656 (gnus-setup-posting-charset nil) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3657 message-posting-charset)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3658 (headers message-required-mail-headers)) |
17493 | 3659 (save-restriction |
3660 (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:
54287
diff
changeset
|
3661 ;; Generate the Mail-Followup-To header if the header is not there... |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3662 (if (and (message-subscribed-p) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3663 (not (mail-fetch-field "mail-followup-to"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3664 (setq headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3665 (cons |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3666 (cons "Mail-Followup-To" (message-make-mail-followup-to)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3667 message-required-mail-headers)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3668 ;; otherwise, delete the MFT header if the field is empty |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3669 (when (equal "" (mail-fetch-field "mail-followup-to")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3670 (message-remove-header "^Mail-Followup-To:"))) |
17493 | 3671 ;; Insert some headers. |
3672 (let ((message-deletable-headers | |
3673 (if news nil message-deletable-headers))) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3674 (message-generate-headers headers)) |
17493 | 3675 ;; Let the user do all of the above. |
3676 (run-hooks 'message-header-hook)) | |
3677 (unwind-protect | |
3678 (save-excursion | |
3679 (set-buffer tembuf) | |
3680 (erase-buffer) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3681 ;; Avoid copying text props (except hard newlines). |
33748
2827e4066e08
* message.el (message-send-mail): Use buffer-substring-no-properties.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33436
diff
changeset
|
3682 (insert (with-current-buffer mailbuf |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3683 (mml-buffer-substring-no-properties-except-hard-newlines |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3684 (point-min) (point-max)))) |
17493 | 3685 ;; Remove some headers. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3686 (message-encode-message-body) |
17493 | 3687 (save-restriction |
3688 (message-narrow-to-headers) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3689 ;; We (re)generate the Lines header. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3690 (when (memq 'Lines message-required-mail-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3691 (message-generate-headers '(Lines))) |
17493 | 3692 ;; Remove some headers. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3693 (message-remove-header message-ignored-mail-headers t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3694 (let ((mail-parse-charset message-default-charset)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3695 (mail-encode-encoded-word-buffer))) |
17493 | 3696 (goto-char (point-max)) |
3697 ;; require one newline at the end. | |
3698 (or (= (preceding-char) ?\n) | |
3699 (insert ?\n)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3700 (message-cleanup-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3701 ;; FIXME: we're inserting the courtesy copy after encoding. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3702 ;; This is wrong if the courtesy copy string contains |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3703 ;; non-ASCII characters. -- jh |
35147 | 3704 (when |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3705 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3706 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3707 (and news |
17493 | 3708 (or (message-fetch-field "cc") |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3709 (message-fetch-field "bcc") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3710 (message-fetch-field "to")) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3711 (let ((content-type (message-fetch-field |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3712 "content-type"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3713 (and |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3714 (or |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3715 (not content-type) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3716 (string= "text/plain" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3717 (car |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3718 (mail-header-parse-content-type |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3719 content-type)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3720 (not |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3721 (string= "base64" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3722 (message-fetch-field |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3723 "content-transfer-encoding"))))))) |
17493 | 3724 (message-insert-courtesy-copy)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3725 (if (or (not message-send-mail-partially-limit) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3726 (< (point-max) message-send-mail-partially-limit) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3727 (not (message-y-or-n-p |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3728 "The message size is too large, split? " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3729 t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3730 "\ |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3731 The message size, " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3732 (/ (point-max) 1000) "KB, is too large. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3733 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3734 Some mail gateways (MTA's) bounce large messages. To avoid the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3735 problem, answer `y', and the message will be split into several |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3736 smaller pieces, the size of each is about " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3737 (/ message-send-mail-partially-limit 1000) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3738 "KB except the last |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3739 one. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3740 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3741 However, some mail readers (MUA's) can't read split messages, i.e., |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3742 mails in message/partially format. Answer `n', and the message will be |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3743 sent in one piece. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3744 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3745 The size limit is controlled by `message-send-mail-partially-limit'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3746 If you always want Gnus to send messages in one piece, set |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3747 `message-send-mail-partially-limit' to nil. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3748 "))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3749 (mm-with-unibyte-current-buffer |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3750 (message "Sending via mail...") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3751 (funcall (or message-send-mail-real-function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3752 message-send-mail-function))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3753 (message-send-mail-partially))) |
17493 | 3754 (kill-buffer tembuf)) |
3755 (set-buffer mailbuf) | |
3756 (push 'mail message-sent-message-via))) | |
3757 | |
3758 (defun message-send-mail-with-sendmail () | |
3759 "Send off the prepared buffer with sendmail." | |
3760 (let ((errbuf (if message-interactive | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3761 (message-generate-new-buffer-clone-locals |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3762 " sendmail errors") |
17493 | 3763 0)) |
3764 resend-to-addresses delimline) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3765 (unwind-protect |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3766 (progn |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3767 (let ((case-fold-search t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3768 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3769 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3770 (setq resend-to-addresses (message-fetch-field "resent-to"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3771 ;; Change header-delimiter to be what sendmail expects. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3772 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3773 (re-search-forward |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3774 (concat "^" (regexp-quote mail-header-separator) "\n")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3775 (replace-match "\n") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3776 (backward-char 1) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3777 (setq delimline (point-marker)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3778 (run-hooks 'message-send-mail-hook) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3779 ;; Insert an extra newline if we need it to work around |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3780 ;; Sun's bug that swallows newlines. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3781 (goto-char (1+ delimline)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3782 (when (eval message-mailer-swallows-blank-line) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3783 (newline)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3784 (when message-interactive |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3785 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3786 (set-buffer errbuf) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3787 (erase-buffer)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3788 (let* ((default-directory "/") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3789 (coding-system-for-write message-send-coding-system) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3790 (cpr (apply |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3791 'call-process-region |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3792 (append |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3793 (list (point-min) (point-max) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3794 (if (boundp 'sendmail-program) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3795 sendmail-program |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3796 "/usr/lib/sendmail") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3797 nil errbuf nil "-oi") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3798 ;; Always specify who from, |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3799 ;; since some systems have broken sendmails. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3800 ;; But some systems are more broken with -f, so |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3801 ;; we'll let users override this. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3802 (if (null message-sendmail-f-is-evil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3803 (list "-f" (message-sendmail-envelope-from))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3804 ;; These mean "report errors by mail" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3805 ;; and "deliver in background". |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3806 (if (null message-interactive) '("-oem" "-odb")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3807 ;; Get the addresses from the message |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3808 ;; unless this is a resend. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3809 ;; We must not do that for a resend |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3810 ;; because we would find the original addresses. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3811 ;; For a resend, include the specific addresses. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3812 (if resend-to-addresses |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3813 (list resend-to-addresses) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3814 '("-t")))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3815 (unless (or (null cpr) (and (numberp cpr) (zerop cpr))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3816 (error "Sending...failed with exit value %d" cpr))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3817 (when message-interactive |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3818 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3819 (set-buffer errbuf) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3820 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3821 (while (re-search-forward "\n\n* *" nil t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3822 (replace-match "; ")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3823 (if (not (zerop (buffer-size))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3824 (error "Sending...failed to %s" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3825 (buffer-string)))))) |
17493 | 3826 (when (bufferp errbuf) |
3827 (kill-buffer errbuf))))) | |
3828 | |
3829 (defun message-send-mail-with-qmail () | |
3830 "Pass the prepared message buffer to qmail-inject. | |
3831 Refer to the documentation for the variable `message-send-mail-function' | |
3832 to find out how to use this." | |
3833 ;; replace the header delimiter with a blank line | |
3834 (goto-char (point-min)) | |
3835 (re-search-forward | |
3836 (concat "^" (regexp-quote mail-header-separator) "\n")) | |
3837 (replace-match "\n") | |
3838 (run-hooks 'message-send-mail-hook) | |
3839 ;; send the message | |
3840 (case | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3841 (let ((coding-system-for-write message-send-coding-system)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3842 (apply |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3843 'call-process-region 1 (point-max) message-qmail-inject-program |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3844 nil nil nil |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3845 ;; qmail-inject's default behaviour is to look for addresses on the |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3846 ;; command line; if there're none, it scans the headers. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3847 ;; yes, it does The Right Thing w.r.t. Resent-To and it's kin. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3848 ;; |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3849 ;; in general, ALL of qmail-inject's defaults are perfect for simply |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3850 ;; reading a formatted (i. e., at least a To: or Resent-To header) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3851 ;; message from stdin. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3852 ;; |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3853 ;; qmail also has the advantage of not having been raped by |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3854 ;; various vendors, so we don't have to allow for that, either -- |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3855 ;; compare this with message-send-mail-with-sendmail and weep |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3856 ;; for sendmail's lost innocence. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3857 ;; |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3858 ;; all this is way cool coz it lets us keep the arguments entirely |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3859 ;; free for -inject-arguments -- a big win for the user and for us |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3860 ;; since we don't have to play that double-guessing game and the user |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3861 ;; gets full control (no gestapo'ish -f's, for instance). --sj |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3862 (if (functionp message-qmail-inject-args) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3863 (funcall message-qmail-inject-args) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3864 message-qmail-inject-args))) |
17493 | 3865 ;; qmail-inject doesn't say anything on it's stdout/stderr, |
3866 ;; we have to look at the retval instead | |
3867 (0 nil) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3868 (100 (error "qmail-inject reported permanent failure")) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3869 (111 (error "qmail-inject reported transient failure")) |
17493 | 3870 ;; should never happen |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3871 (t (error "qmail-inject reported unknown failure")))) |
17493 | 3872 |
3873 (defun message-send-mail-with-mh () | |
3874 "Send the prepared message buffer with mh." | |
3875 (let ((mh-previous-window-config nil) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3876 (name (mh-new-draft-name))) |
17493 | 3877 (setq buffer-file-name name) |
3878 ;; MH wants to generate these headers itself. | |
3879 (when message-mh-deletable-headers | |
3880 (let ((headers message-mh-deletable-headers)) | |
3881 (while headers | |
3882 (goto-char (point-min)) | |
3883 (and (re-search-forward | |
3884 (concat "^" (symbol-name (car headers)) ": *") nil t) | |
3885 (message-delete-line)) | |
3886 (pop headers)))) | |
3887 (run-hooks 'message-send-mail-hook) | |
3888 ;; Pass it on to mh. | |
3889 (mh-send-letter))) | |
3890 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3891 (defun message-smtpmail-send-it () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3892 "Send the prepared message buffer with `smtpmail-send-it'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3893 This only differs from `smtpmail-send-it' that this command evaluates |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3894 `message-send-mail-hook' just before sending a message. It is useful |
82975
590114f9753d
2004-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82966
diff
changeset
|
3895 if your ISP requires the POP-before-SMTP authentication. See the Gnus |
590114f9753d
2004-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82966
diff
changeset
|
3896 manual for details." |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3897 (run-hooks 'message-send-mail-hook) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3898 (smtpmail-send-it)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3899 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3900 (defun message-canlock-generate () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3901 "Return a string that is non-trivial to guess. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3902 Do not use this for anything important, it is cryptographically weak." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3903 (let (sha1-maximum-internal-length) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3904 (sha1 (concat (message-unique-id) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3905 (format "%x%x%x" (random) (random t) (random)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3906 (prin1-to-string (recent-keys)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3907 (prin1-to-string (garbage-collect)))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3908 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3909 (defun message-canlock-password () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3910 "The password used by message for cancel locks. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3911 This is the value of `canlock-password', if that option is non-nil. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3912 Otherwise, generate and save a value for `canlock-password' first." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3913 (unless canlock-password |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3914 (customize-save-variable 'canlock-password (message-canlock-generate)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3915 (setq canlock-password-for-verify canlock-password)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3916 canlock-password) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3917 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3918 (defun message-insert-canlock () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3919 (when message-insert-canlock |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3920 (message-canlock-password) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3921 (canlock-insert-header))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3922 |
17493 | 3923 (defun message-send-news (&optional arg) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3924 (let* ((tembuf (message-generate-new-buffer-clone-locals " *message temp*")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3925 (case-fold-search nil) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3926 (method (if (functionp message-post-method) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3927 (funcall message-post-method arg) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3928 message-post-method)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3929 (newsgroups-field (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3930 (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:
54287
diff
changeset
|
3931 (message-fetch-field "Newsgroups"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3932 (followup-field (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3933 (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:
54287
diff
changeset
|
3934 (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:
54287
diff
changeset
|
3935 ;; BUG: We really need to get the charset for each name in the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3936 ;; Newsgroups and Followup-To lines to allow crossposting |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3937 ;; between group 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:
54287
diff
changeset
|
3938 ;; -- 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:
54287
diff
changeset
|
3939 (group-field-charset |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3940 (gnus-group-name-charset method newsgroups-field)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3941 (followup-field-charset |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3942 (gnus-group-name-charset method (or followup-field ""))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3943 (rfc2047-header-encoding-alist |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3944 (append (when group-field-charset |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3945 (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:
54287
diff
changeset
|
3946 (when followup-field-charset |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3947 (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:
54287
diff
changeset
|
3948 rfc2047-header-encoding-alist)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3949 (messbuf (current-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3950 (message-syntax-checks |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3951 (if (and arg |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3952 (listp message-syntax-checks)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3953 (cons '(existing-newsgroups . disabled) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3954 message-syntax-checks) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3955 message-syntax-checks)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3956 (message-this-is-news t) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3957 (message-posting-charset |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3958 (gnus-setup-posting-charset newsgroups-field)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3959 result) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3960 (if (not (message-check-news-body-syntax)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3961 nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3962 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3963 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3964 ;; Insert some headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3965 (message-generate-headers message-required-news-headers) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3966 (message-insert-canlock) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3967 ;; Let the user do all of the above. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3968 (run-hooks 'message-header-hook)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3969 ;; Note: This check will be disabled by the ".*" default value for |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3970 ;; gnus-group-name-charset-group-alist. -- Pa 2001-10-07. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3971 (when (and group-field-charset |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3972 (listp message-syntax-checks)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3973 (setq message-syntax-checks |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3974 (cons '(valid-newsgroups . disabled) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3975 message-syntax-checks))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3976 (message-cleanup-headers) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3977 (if (not (let ((message-post-method method)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3978 (message-check-news-syntax))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3979 nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3980 (unwind-protect |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3981 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3982 (set-buffer tembuf) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3983 (buffer-disable-undo) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3984 (erase-buffer) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3985 ;; Avoid copying text props (except hard newlines). |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3986 (insert |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3987 (with-current-buffer messbuf |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3988 (mml-buffer-substring-no-properties-except-hard-newlines |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
3989 (point-min) (point-max)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3990 (message-encode-message-body) |
17493 | 3991 ;; Remove some headers. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3992 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3993 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3994 ;; We (re)generate the Lines header. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3995 (when (memq 'Lines message-required-mail-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3996 (message-generate-headers '(Lines))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3997 ;; Remove some headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3998 (message-remove-header message-ignored-news-headers t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3999 (let ((mail-parse-charset message-default-charset)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4000 (mail-encode-encoded-word-buffer))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4001 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4002 ;; require one newline at the end. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4003 (or (= (preceding-char) ?\n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4004 (insert ?\n)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4005 (let ((case-fold-search t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4006 ;; Remove the delimiter. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4007 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4008 (re-search-forward |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4009 (concat "^" (regexp-quote mail-header-separator) "\n")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4010 (replace-match "\n") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4011 (backward-char 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4012 (run-hooks 'message-send-news-hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4013 (gnus-open-server method) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4014 (message "Sending news via %s..." (gnus-server-string method)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4015 (setq result (let ((mail-header-separator "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4016 (gnus-request-post method)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4017 (kill-buffer tembuf)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4018 (set-buffer messbuf) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4019 (if result |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4020 (push 'news message-sent-message-via) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4021 (message "Couldn't send message via news: %s" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4022 (nnheader-get-report (car method))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4023 nil))))) |
17493 | 4024 |
4025 ;;; | |
4026 ;;; Header generation & syntax checking. | |
4027 ;;; | |
4028 | |
4029 (defun message-check-element (type) | |
35147 | 4030 "Return non-nil if this TYPE is not to be checked." |
17493 | 4031 (if (eq message-syntax-checks 'dont-check-for-anything-just-trust-me) |
4032 t | |
4033 (let ((able (assq type message-syntax-checks))) | |
4034 (and (consp able) | |
4035 (eq (cdr able) 'disabled))))) | |
4036 | |
4037 (defun message-check-news-syntax () | |
4038 "Check the syntax of the message." | |
4039 (save-excursion | |
4040 (save-restriction | |
4041 (widen) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4042 ;; We narrow to the headers and check them first. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4043 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4044 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4045 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4046 (message-check-news-header-syntax)))))) |
17493 | 4047 |
4048 (defun message-check-news-header-syntax () | |
4049 (and | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4050 ;; Check Newsgroups header. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4051 (message-check 'newsgroups |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4052 (let ((group (message-fetch-field "newsgroups"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4053 (or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4054 (and group |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4055 (not (string-match "\\`[ \t]*\\'" group))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4056 (ignore |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4057 (message |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4058 "The newsgroups field is empty or missing. Posting is denied."))))) |
17493 | 4059 ;; Check the Subject header. |
4060 (message-check 'subject | |
4061 (let* ((case-fold-search t) | |
4062 (subject (message-fetch-field "subject"))) | |
4063 (or | |
4064 (and subject | |
4065 (not (string-match "\\`[ \t]*\\'" subject))) | |
4066 (ignore | |
4067 (message | |
4068 "The subject field is empty or missing. Posting is denied."))))) | |
4069 ;; Check for commands in Subject. | |
4070 (message-check 'subject-cmsg | |
4071 (if (string-match "^cmsg " (message-fetch-field "subject")) | |
4072 (y-or-n-p | |
4073 "The control code \"cmsg\" is in the subject. Really post? ") | |
4074 t)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4075 ;; Check long header lines. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4076 (message-check 'long-header-lines |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4077 (let ((start (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4078 (header nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4079 (length 0) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4080 found) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4081 (while (and (not found) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4082 (re-search-forward "^\\([^ \t:]+\\): " nil t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4083 (if (> (- (point) (match-beginning 0)) 998) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4084 (setq found t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4085 length (- (point) (match-beginning 0))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4086 (setq header (match-string-no-properties 1))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4087 (setq start (match-beginning 0)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4088 (forward-line 1)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4089 (if found |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4090 (y-or-n-p (format "Your %s header is too long (%d). Really post? " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4091 header length)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4092 t))) |
17493 | 4093 ;; Check for multiple identical headers. |
4094 (message-check 'multiple-headers | |
4095 (let (found) | |
4096 (while (and (not found) | |
4097 (re-search-forward "^[^ \t:]+: " nil t)) | |
4098 (save-excursion | |
4099 (or (re-search-forward | |
4100 (concat "^" | |
4101 (regexp-quote | |
4102 (setq found | |
4103 (buffer-substring | |
4104 (match-beginning 0) (- (match-end 0) 2)))) | |
4105 ":") | |
4106 nil t) | |
4107 (setq found nil)))) | |
4108 (if found | |
4109 (y-or-n-p (format "Multiple %s headers. Really post? " found)) | |
4110 t))) | |
4111 ;; Check for Version and Sendsys. | |
4112 (message-check 'sendsys | |
4113 (if (re-search-forward "^Sendsys:\\|^Version:" nil t) | |
4114 (y-or-n-p | |
4115 (format "The article contains a %s command. Really post? " | |
4116 (buffer-substring (match-beginning 0) | |
4117 (1- (match-end 0))))) | |
4118 t)) | |
4119 ;; See whether we can shorten Followup-To. | |
4120 (message-check 'shorten-followup-to | |
4121 (let ((newsgroups (message-fetch-field "newsgroups")) | |
4122 (followup-to (message-fetch-field "followup-to")) | |
4123 to) | |
4124 (when (and newsgroups | |
4125 (string-match "," newsgroups) | |
4126 (not followup-to) | |
4127 (not | |
4128 (zerop | |
4129 (length | |
4130 (setq to (completing-read | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4131 "Followups to (default: no Followup-To header) " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4132 (mapcar #'list |
17493 | 4133 (cons "poster" |
4134 (message-tokenize-header | |
4135 newsgroups))))))))) | |
4136 (goto-char (point-min)) | |
4137 (insert "Followup-To: " to "\n")) | |
4138 t)) | |
4139 ;; Check "Shoot me". | |
4140 (message-check 'shoot | |
4141 (if (re-search-forward | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4142 "Message-ID.*.i-did-not-set--mail-host-address--so-tickle-me" nil t) |
17493 | 4143 (y-or-n-p "You appear to have a misconfigured system. Really post? ") |
4144 t)) | |
4145 ;; Check for Approved. | |
4146 (message-check 'approved | |
4147 (if (re-search-forward "^Approved:" nil t) | |
4148 (y-or-n-p "The article contains an Approved header. Really post? ") | |
4149 t)) | |
4150 ;; Check the Message-ID header. | |
4151 (message-check 'message-id | |
4152 (let* ((case-fold-search t) | |
4153 (message-id (message-fetch-field "message-id" t))) | |
4154 (or (not message-id) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4155 ;; Is there an @ in the ID? |
17493 | 4156 (and (string-match "@" message-id) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4157 ;; Is there a dot in the ID? |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4158 (string-match "@[^.]*\\." message-id) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4159 ;; Does the ID end with a dot? |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4160 (not (string-match "\\.>" message-id))) |
17493 | 4161 (y-or-n-p |
4162 (format "The Message-ID looks strange: \"%s\". Really post? " | |
4163 message-id))))) | |
4164 ;; Check the Newsgroups & Followup-To headers. | |
4165 (message-check 'existing-newsgroups | |
4166 (let* ((case-fold-search t) | |
4167 (newsgroups (message-fetch-field "newsgroups")) | |
4168 (followup-to (message-fetch-field "followup-to")) | |
4169 (groups (message-tokenize-header | |
4170 (if followup-to | |
4171 (concat newsgroups "," followup-to) | |
4172 newsgroups))) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4173 (post-method (if (functionp message-post-method) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4174 (funcall message-post-method) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4175 message-post-method)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4176 ;; KLUDGE to handle nnvirtual groups. Doing this right |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4177 ;; would probably involve a new nnoo function. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4178 ;; -- Per Abrahamsen <abraham@dina.kvl.dk>, 2001-10-17. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4179 (method (if (and (consp post-method) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4180 (eq (car post-method) 'nnvirtual) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4181 gnus-message-group-art) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4182 (let ((group (car (nnvirtual-find-group-art |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4183 (car gnus-message-group-art) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4184 (cdr gnus-message-group-art))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4185 (gnus-find-method-for-group group)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4186 post-method)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4187 (known-groups |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4188 (mapcar (lambda (n) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4189 (gnus-group-name-decode |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4190 (gnus-group-real-name n) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4191 (gnus-group-name-charset method n))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4192 (gnus-groups-from-server method))) |
17493 | 4193 errors) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4194 (while groups |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4195 (when (and (not (equal (car groups) "poster")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4196 (not (member (car groups) known-groups)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4197 (not (member (car groups) errors))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4198 (push (car groups) errors)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4199 (pop groups)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4200 (cond |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4201 ;; Gnus is not running. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4202 ((or (not (and (boundp 'gnus-active-hashtb) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4203 gnus-active-hashtb)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4204 (not (boundp 'gnus-read-active-file))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4205 t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4206 ;; We don't have all the group names. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4207 ((and (or (not gnus-read-active-file) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4208 (eq gnus-read-active-file 'some)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4209 errors) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4210 (y-or-n-p |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4211 (format |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4212 "Really use %s possibly unknown group%s: %s? " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4213 (if (= (length errors) 1) "this" "these") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4214 (if (= (length errors) 1) "" "s") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4215 (mapconcat 'identity errors ", ")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4216 ;; There were no errors. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4217 ((not errors) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4218 t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4219 ;; There are unknown groups. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4220 (t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4221 (y-or-n-p |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4222 (format |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4223 "Really post to %s unknown group%s: %s? " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4224 (if (= (length errors) 1) "this" "these") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4225 (if (= (length errors) 1) "" "s") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4226 (mapconcat 'identity errors ", "))))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4227 ;; Check continuation headers. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4228 (message-check 'continuation-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4229 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4230 (let ((do-posting t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4231 (while (re-search-forward "^[^ \t\n][^:\n]*$" nil t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4232 (if (y-or-n-p "Fix continuation lines? ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4233 (progn |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4234 (goto-char (match-beginning 0)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4235 (insert " ")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4236 (unless (y-or-n-p "Send anyway? ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4237 (setq do-posting nil)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4238 do-posting)) |
17493 | 4239 ;; Check the Newsgroups & Followup-To headers for syntax errors. |
4240 (message-check 'valid-newsgroups | |
4241 (let ((case-fold-search t) | |
4242 (headers '("Newsgroups" "Followup-To")) | |
4243 header error) | |
4244 (while (and headers (not error)) | |
4245 (when (setq header (mail-fetch-field (car headers))) | |
4246 (if (or | |
4247 (not | |
4248 (string-match | |
4249 "\\`\\([-+_&.a-zA-Z0-9]+\\)?\\(,[-+_&.a-zA-Z0-9]+\\)*\\'" | |
4250 header)) | |
4251 (memq | |
4252 nil (mapcar | |
4253 (lambda (g) | |
4254 (not (string-match "\\.\\'\\|\\.\\." g))) | |
4255 (message-tokenize-header header ",")))) | |
4256 (setq error t))) | |
4257 (unless error | |
4258 (pop headers))) | |
4259 (if (not error) | |
4260 t | |
4261 (y-or-n-p | |
4262 (format "The %s header looks odd: \"%s\". Really post? " | |
4263 (car headers) header))))) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4264 (message-check 'repeated-newsgroups |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4265 (let ((case-fold-search t) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4266 (headers '("Newsgroups" "Followup-To")) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4267 header error groups group) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4268 (while (and headers |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4269 (not error)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4270 (when (setq header (mail-fetch-field (pop headers))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4271 (setq groups (message-tokenize-header header ",")) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4272 (while (setq group (pop groups)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4273 (when (member group groups) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4274 (setq error group |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4275 groups nil))))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4276 (if (not error) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4277 t |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4278 (y-or-n-p |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4279 (format "Group %s is repeated in headers. Really post? " error))))) |
17493 | 4280 ;; Check the From header. |
4281 (message-check 'from | |
4282 (let* ((case-fold-search t) | |
4283 (from (message-fetch-field "from")) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4284 ad) |
17493 | 4285 (cond |
4286 ((not from) | |
4287 (message "There is no From line. Posting is denied.") | |
4288 nil) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4289 ((or (not (string-match |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4290 "@[^\\.]*\\." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4291 (setq ad (nth 1 (mail-extract-address-components |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4292 from))))) ;larsi@ifi |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4293 (string-match "\\.\\." ad) ;larsi@ifi..uio |
17493 | 4294 (string-match "@\\." ad) ;larsi@.ifi.uio |
4295 (string-match "\\.$" ad) ;larsi@ifi.uio. | |
4296 (not (string-match "^[^@]+@[^@]+$" ad)) ;larsi.ifi.uio | |
4297 (string-match "(.*).*(.*)" from)) ;(lars) (lars) | |
4298 (message | |
4299 "Denied posting -- the From looks strange: \"%s\"." from) | |
4300 nil) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4301 ((let ((addresses (rfc822-addresses from))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4302 (while (and addresses |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4303 (not (eq (string-to-char (car addresses)) ?\())) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4304 (setq addresses (cdr addresses))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4305 addresses) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4306 (message |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4307 "Denied posting -- bad From address: \"%s\"." from) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4308 nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4309 (t t)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4310 ;; Check the Reply-To header. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4311 (message-check 'reply-to |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4312 (let* ((case-fold-search t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4313 (reply-to (message-fetch-field "reply-to")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4314 ad) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4315 (cond |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4316 ((not reply-to) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4317 t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4318 ((string-match "," reply-to) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4319 (y-or-n-p |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4320 (format "Multiple Reply-To addresses: \"%s\". Really post? " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4321 reply-to))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4322 ((or (not (string-match |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4323 "@[^\\.]*\\." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4324 (setq ad (nth 1 (mail-extract-address-components |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4325 reply-to))))) ;larsi@ifi |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4326 (string-match "\\.\\." ad) ;larsi@ifi..uio |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4327 (string-match "@\\." ad) ;larsi@.ifi.uio |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4328 (string-match "\\.$" ad) ;larsi@ifi.uio. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4329 (not (string-match "^[^@]+@[^@]+$" ad)) ;larsi.ifi.uio |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4330 (string-match "(.*).*(.*)" reply-to)) ;(lars) (lars) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4331 (y-or-n-p |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4332 (format |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4333 "The Reply-To looks strange: \"%s\". Really post? " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4334 reply-to))) |
17493 | 4335 (t t)))))) |
4336 | |
4337 (defun message-check-news-body-syntax () | |
4338 (and | |
4339 ;; Check for long lines. | |
4340 (message-check 'long-lines | |
4341 (goto-char (point-min)) | |
4342 (re-search-forward | |
4343 (concat "^" (regexp-quote mail-header-separator) "$")) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4344 (forward-line 1) |
17493 | 4345 (while (and |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4346 (or (looking-at |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4347 "<#\\(/\\)?\\(multipart\\|part\\|external\\|mml\\)") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4348 (let ((p (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4349 (end-of-line) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4350 (< (- (point) p) 80))) |
17493 | 4351 (zerop (forward-line 1)))) |
4352 (or (bolp) | |
4353 (eobp) | |
4354 (y-or-n-p | |
4355 "You have lines longer than 79 characters. Really post? "))) | |
4356 ;; Check whether the article is empty. | |
4357 (message-check 'empty | |
4358 (goto-char (point-min)) | |
4359 (re-search-forward | |
4360 (concat "^" (regexp-quote mail-header-separator) "$")) | |
4361 (forward-line 1) | |
4362 (let ((b (point))) | |
4363 (goto-char (point-max)) | |
4364 (re-search-backward message-signature-separator nil t) | |
4365 (beginning-of-line) | |
4366 (or (re-search-backward "[^ \n\t]" b t) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4367 (if (message-gnksa-enable-p 'empty-article) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4368 (y-or-n-p "Empty article. Really post? ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4369 (message "Denied posting -- Empty article.") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4370 nil)))) |
17493 | 4371 ;; Check for control characters. |
4372 (message-check 'control-chars | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4373 (if (re-search-forward "[\000-\007\013\015-\032\034-\037\200-\237]" nil t) |
17493 | 4374 (y-or-n-p |
4375 "The article contains control characters. Really post? ") | |
4376 t)) | |
4377 ;; Check excessive size. | |
4378 (message-check 'size | |
4379 (if (> (buffer-size) 60000) | |
4380 (y-or-n-p | |
4381 (format "The article is %d octets long. Really post? " | |
4382 (buffer-size))) | |
4383 t)) | |
4384 ;; Check whether any new text has been added. | |
4385 (message-check 'new-text | |
4386 (or | |
4387 (not message-checksum) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4388 (not (eq (message-checksum) message-checksum)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4389 (if (message-gnksa-enable-p 'quoted-text-only) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4390 (y-or-n-p |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4391 "It looks like no new text has been added. Really post? ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4392 (message "Denied posting -- no new text has been added.") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4393 nil))) |
17493 | 4394 ;; Check the length of the signature. |
4395 (message-check 'signature | |
4396 (goto-char (point-max)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4397 (if (> (count-lines (point) (point-max)) 5) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4398 (y-or-n-p |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4399 (format |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4400 "Your .sig is %d lines; it should be max 4. Really post? " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4401 (1- (count-lines (point) (point-max))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4402 t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4403 ;; Ensure that text follows last quoted portion. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4404 (message-check 'quoting-style |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4405 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4406 (let ((no-problem t)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4407 (when (search-backward-regexp "^>[^\n]*\n" nil t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4408 (setq no-problem (search-forward-regexp "^[ \t]*[^>\n]" nil t))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4409 (if no-problem |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4410 t |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4411 (if (message-gnksa-enable-p 'quoted-text-only) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4412 (y-or-n-p "Your text should follow quoted text. Really post? ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4413 ;; Ensure that |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4414 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4415 (re-search-forward |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4416 (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:
54287
diff
changeset
|
4417 (if (search-forward-regexp "^[ \t]*[^>\n]" nil t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4418 (y-or-n-p "Your text should follow quoted text. Really post? ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4419 (message "Denied posting -- only quoted text.") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4420 nil))))))) |
17493 | 4421 |
4422 (defun message-checksum () | |
4423 "Return a \"checksum\" for the current buffer." | |
4424 (let ((sum 0)) | |
4425 (save-excursion | |
4426 (goto-char (point-min)) | |
4427 (re-search-forward | |
4428 (concat "^" (regexp-quote mail-header-separator) "$")) | |
4429 (while (not (eobp)) | |
4430 (when (not (looking-at "[ \t\n]")) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4431 (setq sum (logxor (ash sum 1) (if (natnump sum) 0 1) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4432 (char-after)))) |
17493 | 4433 (forward-char 1))) |
4434 sum)) | |
4435 | |
4436 (defun message-do-fcc () | |
4437 "Process Fcc headers in the current buffer." | |
4438 (let ((case-fold-search t) | |
4439 (buf (current-buffer)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4440 list file |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4441 (mml-externalize-attachments message-fcc-externalize-attachments)) |
17493 | 4442 (save-excursion |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4443 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4444 (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:
54287
diff
changeset
|
4445 (setq file (message-fetch-field "fcc" t))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4446 (when file |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4447 (set-buffer (get-buffer-create " *message temp*")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4448 (erase-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4449 (insert-buffer-substring buf) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4450 (message-encode-message-body) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4451 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4452 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4453 (while (setq file (message-fetch-field "fcc" t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4454 (push file list) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4455 (message-remove-header "fcc" nil t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4456 (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:
54287
diff
changeset
|
4457 (rfc2047-header-encoding-alist |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4458 (cons '("Newsgroups" . default) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4459 rfc2047-header-encoding-alist))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4460 (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:
54287
diff
changeset
|
4461 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4462 (when (re-search-forward |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4463 (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:
54287
diff
changeset
|
4464 nil t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4465 (replace-match "" t t )) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4466 ;; Process FCC operations. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4467 (while list |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4468 (setq file (pop list)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4469 (if (string-match "^[ \t]*|[ \t]*\\(.*\\)[ \t]*$" file) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4470 ;; Pipe the article to the program in question. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4471 (call-process-region (point-min) (point-max) shell-file-name |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4472 nil nil nil shell-command-switch |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4473 (match-string 1 file)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4474 ;; Save the article. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4475 (setq file (expand-file-name file)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4476 (unless (file-exists-p (file-name-directory file)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4477 (make-directory (file-name-directory file) t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4478 (if (and message-fcc-handler-function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4479 (not (eq message-fcc-handler-function 'rmail-output))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4480 (funcall message-fcc-handler-function file) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4481 (if (and (file-readable-p file) (mail-file-babyl-p file)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4482 (rmail-output file 1 nil t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4483 (let ((mail-use-rfc822 t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4484 (rmail-output file 1 t t)))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4485 (kill-buffer (current-buffer)))))) |
17493 | 4486 |
4487 (defun message-output (filename) | |
35147 | 4488 "Append this article to Unix/babyl mail file FILENAME." |
17493 | 4489 (if (and (file-readable-p filename) |
4490 (mail-file-babyl-p filename)) | |
4491 (gnus-output-to-rmail filename t) | |
4492 (gnus-output-to-mail filename t))) | |
4493 | |
4494 (defun message-cleanup-headers () | |
4495 "Do various automatic cleanups of the headers." | |
4496 ;; Remove empty lines in the header. | |
4497 (save-restriction | |
4498 (message-narrow-to-headers) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4499 ;; Remove blank lines. |
17493 | 4500 (while (re-search-forward "^[ \t]*\n" nil t) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4501 (replace-match "" t t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4502 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4503 ;; Correct Newsgroups and Followup-To headers: Change sequence of |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4504 ;; spaces to comma and eliminate spaces around commas. Eliminate |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4505 ;; embedded line breaks. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4506 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4507 (while (re-search-forward "^\\(Newsgroups\\|Followup-To\\): +" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4508 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4509 (narrow-to-region |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4510 (point) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4511 (if (re-search-forward "^[^ \t]" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4512 (match-beginning 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4513 (forward-line 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4514 (point))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4515 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4516 (while (re-search-forward "\n[ \t]+" nil t) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4517 (replace-match " " t t)) ;No line breaks (too confusing) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4518 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4519 (while (re-search-forward "[ \t\n]*,[ \t\n]*\\|[ \t]+" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4520 (replace-match "," t t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4521 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4522 ;; Remove trailing commas. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4523 (when (re-search-forward ",+$" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4524 (replace-match "" t t)))))) |
17493 | 4525 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4526 (defun message-make-date (&optional now) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4527 "Make a valid data header. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4528 If NOW, use that time instead." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4529 (let* ((now (or now (current-time))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4530 (zone (nth 8 (decode-time now))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4531 (sign "+")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4532 (when (< zone 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4533 (setq sign "-") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4534 (setq zone (- zone))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4535 (concat |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4536 ;; The day name of the %a spec is locale-specific. Pfff. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4537 (format "%s, " (capitalize (car (rassoc (nth 6 (decode-time now)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4538 parse-time-weekdays)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4539 (format-time-string "%d" now) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4540 ;; The month name of the %b spec is locale-specific. Pfff. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4541 (format " %s " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4542 (capitalize (car (rassoc (nth 4 (decode-time now)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4543 parse-time-months)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4544 (format-time-string "%Y %H:%M:%S " now) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4545 ;; We do all of this because XEmacs doesn't have the %z spec. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4546 (format "%s%02d%02d" sign (/ zone 3600) (/ (% zone 3600) 60))))) |
17493 | 4547 |
4548 (defun message-make-message-id () | |
4549 "Make a unique Message-ID." | |
4550 (concat "<" (message-unique-id) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4551 (let ((psubject (save-excursion (message-fetch-field "subject"))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4552 (psupersedes |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4553 (save-excursion (message-fetch-field "supersedes")))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4554 (if (or |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4555 (and message-reply-headers |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4556 (mail-header-references message-reply-headers) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4557 (mail-header-subject message-reply-headers) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4558 psubject |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4559 (not (string= |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4560 (message-strip-subject-re |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4561 (mail-header-subject message-reply-headers)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4562 (message-strip-subject-re psubject)))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4563 (and psupersedes |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4564 (string-match "_-_@" psupersedes))) |
17493 | 4565 "_-_" "")) |
4566 "@" (message-make-fqdn) ">")) | |
4567 | |
4568 (defvar message-unique-id-char nil) | |
4569 | |
4570 ;; If you ever change this function, make sure the new version | |
4571 ;; cannot generate IDs that the old version could. | |
4572 ;; You might for example insert a "." somewhere (not next to another dot | |
4573 ;; or string boundary), or modify the "fsf" string. | |
4574 (defun message-unique-id () | |
4575 ;; Don't use microseconds from (current-time), they may be unsupported. | |
4576 ;; Instead we use this randomly inited counter. | |
4577 (setq message-unique-id-char | |
4578 (% (1+ (or message-unique-id-char (logand (random t) (1- (lsh 1 20))))) | |
4579 ;; (current-time) returns 16-bit ints, | |
4580 ;; and 2^16*25 just fits into 4 digits i base 36. | |
4581 (* 25 25))) | |
4582 (let ((tm (current-time))) | |
4583 (concat | |
4584 (if (memq system-type '(ms-dos emx vax-vms)) | |
4585 (let ((user (downcase (user-login-name)))) | |
4586 (while (string-match "[^a-z0-9_]" user) | |
4587 (aset user (match-beginning 0) ?_)) | |
4588 user) | |
4589 (message-number-base36 (user-uid) -1)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4590 (message-number-base36 (+ (car tm) |
17493 | 4591 (lsh (% message-unique-id-char 25) 16)) 4) |
4592 (message-number-base36 (+ (nth 1 tm) | |
4593 (lsh (/ message-unique-id-char 25) 16)) 4) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4594 ;; Append a given name, because while the generated ID is unique |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4595 ;; to this newsreader, other newsreaders might otherwise generate |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4596 ;; the same ID via another algorithm. |
17493 | 4597 ".fsf"))) |
4598 | |
4599 (defun message-number-base36 (num len) | |
4600 (if (if (< len 0) | |
4601 (<= num 0) | |
4602 (= len 0)) | |
4603 "" | |
4604 (concat (message-number-base36 (/ num 36) (1- len)) | |
4605 (char-to-string (aref "zyxwvutsrqponmlkjihgfedcba9876543210" | |
4606 (% num 36)))))) | |
4607 | |
4608 (defun message-make-organization () | |
4609 "Make an Organization header." | |
4610 (let* ((organization | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4611 (when message-user-organization |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4612 (if (functionp message-user-organization) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4613 (funcall message-user-organization) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4614 message-user-organization)))) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4615 (with-temp-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4616 (mm-enable-multibyte) |
17493 | 4617 (cond ((stringp organization) |
4618 (insert organization)) | |
4619 ((and (eq t organization) | |
4620 message-user-organization-file | |
4621 (file-exists-p message-user-organization-file)) | |
4622 (insert-file-contents message-user-organization-file))) | |
4623 (goto-char (point-min)) | |
4624 (while (re-search-forward "[\t\n]+" nil t) | |
4625 (replace-match "" t t)) | |
4626 (unless (zerop (buffer-size)) | |
4627 (buffer-string))))) | |
4628 | |
4629 (defun message-make-lines () | |
4630 "Count the number of lines and return numeric string." | |
4631 (save-excursion | |
4632 (save-restriction | |
4633 (widen) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4634 (message-goto-body) |
17493 | 4635 (int-to-string (count-lines (point) (point-max)))))) |
4636 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4637 (defun message-make-references () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4638 "Return the References header for this message." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4639 (when message-reply-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4640 (let ((message-id (mail-header-message-id message-reply-headers)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4641 (references (mail-header-references message-reply-headers)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4642 new-references) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4643 (if (or references message-id) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4644 (concat (or references "") (and references " ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4645 (or message-id "")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4646 nil)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4647 |
17493 | 4648 (defun message-make-in-reply-to () |
4649 "Return the In-Reply-To header for this message." | |
4650 (when message-reply-headers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4651 (let ((from (mail-header-from message-reply-headers)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4652 (date (mail-header-date message-reply-headers)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4653 (msg-id (mail-header-message-id message-reply-headers))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4654 (when from |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4655 (let ((name (mail-extract-address-components from))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4656 (concat msg-id (if msg-id " (") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4657 (or (car name) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4658 (nth 1 name)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4659 "'s message of \"" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4660 (if (or (not date) (string= date "")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4661 "(unknown date)" date) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4662 "\"" (if msg-id ")"))))))) |
17493 | 4663 |
4664 (defun message-make-distribution () | |
4665 "Make a Distribution header." | |
4666 (let ((orig-distribution (message-fetch-reply-field "distribution"))) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4667 (cond ((functionp message-distribution-function) |
17493 | 4668 (funcall message-distribution-function)) |
4669 (t orig-distribution)))) | |
4670 | |
4671 (defun message-make-expires () | |
4672 "Return an Expires header based on `message-expires'." | |
4673 (let ((current (current-time)) | |
4674 (future (* 1.0 message-expires 60 60 24))) | |
4675 ;; Add the future to current. | |
4676 (setcar current (+ (car current) (round (/ future (expt 2 16))))) | |
4677 (setcar (cdr current) (+ (nth 1 current) (% (round future) (expt 2 16)))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4678 (message-make-date current))) |
17493 | 4679 |
4680 (defun message-make-path () | |
4681 "Return uucp path." | |
4682 (let ((login-name (user-login-name))) | |
4683 (cond ((null message-user-path) | |
4684 (concat (system-name) "!" login-name)) | |
4685 ((stringp message-user-path) | |
4686 ;; Support GENERICPATH. Suggested by vixie@decwrl.dec.com. | |
4687 (concat message-user-path "!" login-name)) | |
4688 (t login-name)))) | |
4689 | |
4690 (defun message-make-from () | |
4691 "Make a From header." | |
4692 (let* ((style message-from-style) | |
4693 (login (message-make-address)) | |
4694 (fullname | |
4695 (or (and (boundp 'user-full-name) | |
4696 user-full-name) | |
4697 (user-full-name)))) | |
4698 (when (string= fullname "&") | |
4699 (setq fullname (user-login-name))) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4700 (with-temp-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4701 (mm-enable-multibyte) |
17493 | 4702 (cond |
4703 ((or (null style) | |
4704 (equal fullname "")) | |
4705 (insert login)) | |
4706 ((or (eq style 'angles) | |
4707 (and (not (eq style 'parens)) | |
4708 ;; Use angles if no quoting is needed, or if parens would | |
4709 ;; need quoting too. | |
4710 (or (not (string-match "[^- !#-'*+/-9=?A-Z^-~]" fullname)) | |
4711 (let ((tmp (concat fullname nil))) | |
4712 (while (string-match "([^()]*)" tmp) | |
4713 (aset tmp (match-beginning 0) ?-) | |
4714 (aset tmp (1- (match-end 0)) ?-)) | |
4715 (string-match "[\\()]" tmp))))) | |
4716 (insert fullname) | |
4717 (goto-char (point-min)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4718 ;; Look for a character that cannot appear unquoted |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4719 ;; according to RFC 822. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4720 (when (re-search-forward "[^- !#-'*+/-9=?A-Z^-~]" nil 1) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4721 ;; Quote fullname, escaping specials. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4722 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4723 (insert "\"") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4724 (while (re-search-forward "[\"\\]" nil 1) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4725 (replace-match "\\\\\\&" t)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4726 (insert "\"")) |
17493 | 4727 (insert " <" login ">")) |
4728 (t ; 'parens or default | |
4729 (insert login " (") | |
4730 (let ((fullname-start (point))) | |
4731 (insert fullname) | |
4732 (goto-char fullname-start) | |
4733 ;; RFC 822 says \ and nonmatching parentheses | |
4734 ;; must be escaped in comments. | |
4735 ;; Escape every instance of ()\ ... | |
4736 (while (re-search-forward "[()\\]" nil 1) | |
4737 (replace-match "\\\\\\&" t)) | |
4738 ;; ... then undo escaping of matching parentheses, | |
4739 ;; including matching nested parentheses. | |
4740 (goto-char fullname-start) | |
4741 (while (re-search-forward | |
4742 "\\(\\=\\|[^\\]\\(\\\\\\\\\\)*\\)\\\\(\\(\\([^\\]\\|\\\\\\\\\\)*\\)\\\\)" | |
4743 nil 1) | |
4744 (replace-match "\\1(\\3)" t) | |
4745 (goto-char fullname-start))) | |
4746 (insert ")"))) | |
4747 (buffer-string)))) | |
4748 | |
4749 (defun message-make-sender () | |
4750 "Return the \"real\" user address. | |
4751 This function tries to ignore all user modifications, and | |
4752 give as trustworthy answer as possible." | |
4753 (concat (user-login-name) "@" (system-name))) | |
4754 | |
4755 (defun message-make-address () | |
4756 "Make the address of the user." | |
4757 (or (message-user-mail-address) | |
4758 (concat (user-login-name) "@" (message-make-domain)))) | |
4759 | |
4760 (defun message-user-mail-address () | |
4761 "Return the pertinent part of `user-mail-address'." | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4762 (when (and user-mail-address |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4763 (string-match "@.*\\." user-mail-address)) |
17493 | 4764 (if (string-match " " user-mail-address) |
4765 (nth 1 (mail-extract-address-components user-mail-address)) | |
4766 user-mail-address))) | |
4767 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4768 (defun message-sendmail-envelope-from () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4769 "Return the envelope from." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4770 (cond ((eq message-sendmail-envelope-from 'header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4771 (nth 1 (mail-extract-address-components |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4772 (message-fetch-field "from")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4773 ((stringp message-sendmail-envelope-from) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4774 message-sendmail-envelope-from) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4775 (t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4776 (message-make-address)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4777 |
17493 | 4778 (defun message-make-fqdn () |
4779 "Return user's fully qualified domain name." | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4780 (let* ((system-name (system-name)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4781 (user-mail (message-user-mail-address)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4782 (user-domain |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4783 (if (and user-mail |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4784 (string-match "@\\(.*\\)\\'" user-mail)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4785 (match-string 1 user-mail))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4786 (case-fold-search t)) |
17493 | 4787 (cond |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4788 ((and message-user-fqdn |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4789 (stringp message-user-fqdn) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4790 (string-match message-valid-fqdn-regexp message-user-fqdn) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4791 (not (string-match message-bogus-system-names message-user-fqdn))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4792 message-user-fqdn) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4793 ;; `message-user-fqdn' seems to be valid |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4794 ((and (string-match message-valid-fqdn-regexp system-name) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4795 (not (string-match message-bogus-system-names system-name))) |
17493 | 4796 ;; `system-name' returned the right result. |
4797 system-name) | |
4798 ;; Try `mail-host-address'. | |
4799 ((and (boundp 'mail-host-address) | |
4800 (stringp mail-host-address) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4801 (string-match message-valid-fqdn-regexp mail-host-address) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4802 (not (string-match message-bogus-system-names mail-host-address))) |
17493 | 4803 mail-host-address) |
4804 ;; We try `user-mail-address' as a backup. | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4805 ((and user-domain |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4806 (stringp user-domain) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4807 (string-match message-valid-fqdn-regexp user-domain) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4808 (not (string-match message-bogus-system-names user-domain))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4809 user-domain) |
17493 | 4810 ;; Default to this bogus thing. |
4811 (t | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4812 (concat system-name |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4813 ".i-did-not-set--mail-host-address--so-tickle-me"))))) |
17493 | 4814 |
4815 (defun message-make-host-name () | |
4816 "Return the name of the host." | |
4817 (let ((fqdn (message-make-fqdn))) | |
4818 (string-match "^[^.]+\\." fqdn) | |
4819 (substring fqdn 0 (1- (match-end 0))))) | |
4820 | |
4821 (defun message-make-domain () | |
4822 "Return the domain name." | |
4823 (or mail-host-address | |
4824 (message-make-fqdn))) | |
4825 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4826 (defun message-to-list-only () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4827 "Send a message to the list only. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4828 Remove all addresses but the list address from To and Cc headers." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4829 (interactive) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4830 (let ((listaddr (message-make-mail-followup-to t))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4831 (when listaddr |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4832 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4833 (message-remove-header "to") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4834 (message-remove-header "cc") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4835 (message-position-on-field "To" "X-Draft-From") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4836 (insert listaddr))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4837 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4838 (defun message-make-mail-followup-to (&optional only-show-subscribed) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4839 "Return the Mail-Followup-To header. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4840 If passed the optional argument ONLY-SHOW-SUBSCRIBED only return the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4841 subscribed address (and not the additional To and Cc header contents)." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4842 (let* ((case-fold-search t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4843 (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:
54287
diff
changeset
|
4844 (cc (message-fetch-field "cc")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4845 (msg-recipients (concat to (and to cc ", ") cc)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4846 (recipients |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4847 (mapcar 'mail-strip-quoted-names |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4848 (message-tokenize-header msg-recipients))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4849 (file-regexps |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4850 (if message-subscribed-address-file |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4851 (let (begin end item re) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4852 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4853 (with-temp-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4854 (insert-file-contents message-subscribed-address-file) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4855 (while (not (eobp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4856 (setq begin (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4857 (forward-line 1) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4858 (setq end (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4859 (if (bolp) (setq end (1- end))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4860 (setq item (regexp-quote (buffer-substring begin end))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4861 (if re (setq re (concat re "\\|" item)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4862 (setq re (concat "\\`\\(" item)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4863 (and re (list (concat re "\\)\\'")))))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4864 (mft-regexps (apply 'append message-subscribed-regexps |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4865 (mapcar 'regexp-quote |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4866 message-subscribed-addresses) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4867 file-regexps |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4868 (mapcar 'funcall |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4869 message-subscribed-address-functions)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4870 (save-match-data |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4871 (let ((subscribed-lists nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4872 (list |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4873 (loop for recipient in recipients |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4874 when (loop for regexp in mft-regexps |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4875 when (string-match regexp recipient) return t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4876 return recipient))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4877 (when list |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4878 (if only-show-subscribed |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4879 list |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4880 msg-recipients)))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4881 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4882 (defun message-idna-to-ascii-rhs-1 (header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4883 "Interactively potentially IDNA encode domain names in HEADER." |
82978
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4884 (let ((field (message-fetch-field header)) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4885 rhs ace address) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4886 (when field |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4887 (dolist (address (mail-header-parse-addresses field)) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4888 (setq address (car address) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4889 rhs (downcase (or (cadr (split-string address "@")) "")) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4890 ace (downcase (idna-to-ascii rhs))) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4891 (when (and (not (equal rhs ace)) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4892 (or (not (eq message-use-idna 'ask)) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4893 (y-or-n-p (format "Replace %s with %s? " rhs ace)))) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4894 (goto-char (point-min)) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4895 (while (re-search-forward (concat "^" header ":") nil t) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4896 (message-narrow-to-field) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4897 (while (search-forward (concat "@" rhs) nil t) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4898 (replace-match (concat "@" ace) t t)) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4899 (goto-char (point-max)) |
80f0490297cb
[ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson"
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82975
diff
changeset
|
4900 (widen))))))) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4901 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4902 (defun message-idna-to-ascii-rhs () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4903 "Possibly IDNA encode non-ASCII domain names in From:, To: and Cc: headers. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4904 See `message-idna-encode'." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4905 (interactive) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4906 (when message-use-idna |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4907 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4908 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4909 (message-narrow-to-head) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4910 (message-idna-to-ascii-rhs-1 "From") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4911 (message-idna-to-ascii-rhs-1 "To") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4912 (message-idna-to-ascii-rhs-1 "Cc"))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4913 |
17493 | 4914 (defun message-generate-headers (headers) |
4915 "Prepare article HEADERS. | |
4916 Headers already prepared in the buffer are not modified." | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4917 (setq headers (append headers message-required-headers)) |
17493 | 4918 (save-restriction |
4919 (message-narrow-to-headers) | |
4920 (let* ((Date (message-make-date)) | |
4921 (Message-ID (message-make-message-id)) | |
4922 (Organization (message-make-organization)) | |
4923 (From (message-make-from)) | |
4924 (Path (message-make-path)) | |
4925 (Subject nil) | |
4926 (Newsgroups nil) | |
4927 (In-Reply-To (message-make-in-reply-to)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4928 (References (message-make-references)) |
17493 | 4929 (To nil) |
4930 (Distribution (message-make-distribution)) | |
4931 (Lines (message-make-lines)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4932 (User-Agent message-newsreader) |
17493 | 4933 (Expires (message-make-expires)) |
4934 (case-fold-search t) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4935 (optionalp nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4936 header value elem header-string) |
17493 | 4937 ;; First we remove any old generated headers. |
4938 (let ((headers message-deletable-headers)) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4939 (unless (buffer-modified-p) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4940 (setq headers (delq 'Message-ID (copy-sequence headers)))) |
17493 | 4941 (while headers |
4942 (goto-char (point-min)) | |
4943 (and (re-search-forward | |
4944 (concat "^" (symbol-name (car headers)) ": *") nil t) | |
4945 (get-text-property (1+ (match-beginning 0)) 'message-deletable) | |
4946 (message-delete-line)) | |
4947 (pop headers))) | |
4948 ;; Go through all the required headers and see if they are in the | |
4949 ;; articles already. If they are not, or are empty, they are | |
4950 ;; inserted automatically - except for Subject, Newsgroups and | |
4951 ;; Distribution. | |
4952 (while headers | |
4953 (goto-char (point-min)) | |
4954 (setq elem (pop headers)) | |
4955 (if (consp elem) | |
4956 (if (eq (car elem) 'optional) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4957 (setq header (cdr elem) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4958 optionalp t) |
17493 | 4959 (setq header (car elem))) |
4960 (setq header elem)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4961 (setq header-string (if (stringp header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4962 header |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4963 (symbol-name header))) |
17493 | 4964 (when (or (not (re-search-forward |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4965 (concat "^" |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4966 (regexp-quote (downcase header-string)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4967 ":") |
17493 | 4968 nil t)) |
4969 (progn | |
4970 ;; The header was found. We insert a space after the | |
4971 ;; colon, if there is none. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4972 (if (/= (char-after) ? ) (insert " ") (forward-char 1)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4973 ;; Find out whether the header is empty. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4974 (looking-at "[ \t]*\n[^ \t]"))) |
17493 | 4975 ;; So we find out what value we should insert. |
4976 (setq value | |
4977 (cond | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4978 ((and (consp elem) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4979 (eq (car elem) 'optional) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4980 (not (member header-string message-inserted-headers))) |
17493 | 4981 ;; This is an optional header. If the cdr of this |
4982 ;; is something that is nil, then we do not insert | |
4983 ;; this header. | |
4984 (setq header (cdr elem)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4985 (or (and (functionp (cdr elem)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4986 (funcall (cdr elem))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4987 (and (boundp (cdr elem)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4988 (symbol-value (cdr elem))))) |
17493 | 4989 ((consp elem) |
4990 ;; The element is a cons. Either the cdr is a | |
4991 ;; string to be inserted verbatim, or it is a | |
4992 ;; function, and we insert the value returned from | |
4993 ;; this function. | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4994 (or (and (stringp (cdr elem)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4995 (cdr elem)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4996 (and (functionp (cdr elem)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4997 (funcall (cdr elem))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4998 ((and (boundp header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
4999 (symbol-value header)) |
17493 | 5000 ;; The element is a symbol. We insert the value |
5001 ;; of this symbol, if any. | |
5002 (symbol-value header)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5003 ((not (message-check-element header)) |
17493 | 5004 ;; We couldn't generate a value for this header, |
5005 ;; so we just ask the user. | |
5006 (read-from-minibuffer | |
5007 (format "Empty header for %s; enter value: " header))))) | |
5008 ;; Finally insert the header. | |
5009 (when (and value | |
5010 (not (equal value ""))) | |
5011 (save-excursion | |
5012 (if (bolp) | |
5013 (progn | |
5014 ;; This header didn't exist, so we insert it. | |
5015 (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:
54287
diff
changeset
|
5016 (let ((formatter |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5017 (cdr (assq header message-header-format-alist)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5018 (if formatter |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5019 (funcall formatter header value) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5020 (insert header-string ": " value)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5021 ;; We check whether the value was ended by a |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5022 ;; newline. If now, we insert one. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5023 (unless (bolp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5024 (insert "\n")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5025 (forward-line -1))) |
17493 | 5026 ;; The value of this header was empty, so we clear |
5027 ;; totally and insert the new value. | |
5028 (delete-region (point) (gnus-point-at-eol)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5029 ;; If the header is optional, and the header was |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5030 ;; empty, we con't insert it anyway. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5031 (unless optionalp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5032 (push header-string message-inserted-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5033 (insert value))) |
17493 | 5034 ;; Add the deletable property to the headers that require it. |
5035 (and (memq header message-deletable-headers) | |
5036 (progn (beginning-of-line) (looking-at "[^:]+: ")) | |
5037 (add-text-properties | |
5038 (point) (match-end 0) | |
5039 '(message-deletable t face italic) (current-buffer))))))) | |
5040 ;; Insert new Sender if the From is strange. | |
5041 (let ((from (message-fetch-field "from")) | |
5042 (sender (message-fetch-field "sender")) | |
5043 (secure-sender (message-make-sender))) | |
5044 (when (and from | |
5045 (not (message-check-element 'sender)) | |
5046 (not (string= | |
5047 (downcase | |
5048 (cadr (mail-extract-address-components from))) | |
5049 (downcase secure-sender))) | |
5050 (or (null sender) | |
5051 (not | |
5052 (string= | |
5053 (downcase | |
5054 (cadr (mail-extract-address-components sender))) | |
5055 (downcase secure-sender))))) | |
5056 (goto-char (point-min)) | |
5057 ;; Rename any old Sender headers to Original-Sender. | |
5058 (when (re-search-forward "^\\(Original-\\)*Sender:" nil t) | |
5059 (beginning-of-line) | |
5060 (insert "Original-") | |
5061 (beginning-of-line)) | |
5062 (when (or (message-news-p) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5063 (string-match "@.+\\.." secure-sender)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5064 (insert "Sender: " secure-sender "\n")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5065 ;; Check for IDNA |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5066 (message-idna-to-ascii-rhs)))) |
17493 | 5067 |
5068 (defun message-insert-courtesy-copy () | |
5069 "Insert a courtesy message in mail copies of combined messages." | |
5070 (let (newsgroups) | |
5071 (save-excursion | |
5072 (save-restriction | |
5073 (message-narrow-to-headers) | |
5074 (when (setq newsgroups (message-fetch-field "newsgroups")) | |
5075 (goto-char (point-max)) | |
5076 (insert "Posted-To: " newsgroups "\n"))) | |
5077 (forward-line 1) | |
5078 (when message-courtesy-message | |
5079 (cond | |
5080 ((string-match "%s" message-courtesy-message) | |
5081 (insert (format message-courtesy-message newsgroups))) | |
5082 (t | |
5083 (insert message-courtesy-message))))))) | |
5084 | |
5085 ;;; | |
5086 ;;; Setting up a message buffer | |
5087 ;;; | |
5088 | |
5089 (defun message-fill-address (header value) | |
5090 (save-restriction | |
5091 (narrow-to-region (point) (point)) | |
5092 (insert (capitalize (symbol-name header)) | |
5093 ": " | |
5094 (if (consp value) (car value) value) | |
5095 "\n") | |
5096 (narrow-to-region (point-min) (1- (point-max))) | |
5097 (let (quoted last) | |
5098 (goto-char (point-min)) | |
5099 (while (not (eobp)) | |
5100 (skip-chars-forward "^,\"" (point-max)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5101 (if (or (eq (char-after) ?,) |
17493 | 5102 (eobp)) |
5103 (when (not quoted) | |
5104 (if (and (> (current-column) 78) | |
5105 last) | |
5106 (progn | |
5107 (save-excursion | |
5108 (goto-char last) | |
5109 (insert "\n\t")) | |
5110 (setq last (1+ (point)))) | |
5111 (setq last (1+ (point))))) | |
5112 (setq quoted (not quoted))) | |
5113 (unless (eobp) | |
5114 (forward-char 1)))) | |
5115 (goto-char (point-max)) | |
5116 (widen) | |
5117 (forward-line 1))) | |
5118 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5119 (defun message-split-line () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5120 "Split current line, moving portion beyond point vertically down. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5121 If the current line has `message-yank-prefix', insert it on the new line." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5122 (interactive "*") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5123 (condition-case nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5124 (split-line message-yank-prefix) ;; Emacs 21.3.50+ supports arg. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5125 (error |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5126 (split-line)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5127 |
17493 | 5128 (defun message-fill-header (header value) |
5129 (let ((begin (point)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5130 (fill-column 78) |
17493 | 5131 (fill-prefix "\t")) |
5132 (insert (capitalize (symbol-name header)) | |
5133 ": " | |
5134 (if (consp value) (car value) value) | |
5135 "\n") | |
5136 (save-restriction | |
5137 (narrow-to-region begin (point)) | |
5138 (fill-region-as-paragraph begin (point)) | |
5139 ;; Tapdance around looong Message-IDs. | |
5140 (forward-line -1) | |
5141 (when (looking-at "[ \t]*$") | |
5142 (message-delete-line)) | |
5143 (goto-char begin) | |
5144 (re-search-forward ":" nil t) | |
5145 (when (looking-at "\n[ \t]+") | |
5146 (replace-match " " t t)) | |
5147 (goto-char (point-max))))) | |
5148 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5149 (defun message-shorten-1 (list cut surplus) |
35147 | 5150 "Cut SURPLUS elements out of LIST, beginning with CUTth one." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5151 (setcdr (nthcdr (- cut 2) list) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5152 (nthcdr (+ (- cut 2) surplus 1) list))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5153 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5154 (defun message-shorten-references (header references) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5155 "Trim REFERENCES to be 21 Message-ID long or less, and fold them. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5156 If folding is disallowed, also check that the REFERENCES are less |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5157 than 988 characters long, and if they are not, trim them until they are." |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5158 (let ((maxcount 21) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5159 (count 0) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5160 (cut 2) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5161 refs) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5162 (with-temp-buffer |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5163 (insert references) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5164 (goto-char (point-min)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5165 ;; Cons a list of valid references. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5166 (while (re-search-forward "<[^>]+>" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5167 (push (match-string 0) refs)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5168 (setq refs (nreverse refs) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5169 count (length refs))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5170 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5171 ;; If the list has more than MAXCOUNT elements, trim it by |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5172 ;; removing the CUTth element and the required number of |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5173 ;; elements that follow. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5174 (when (> count maxcount) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5175 (let ((surplus (- count maxcount))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5176 (message-shorten-1 refs cut surplus) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5177 (decf count surplus))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5178 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5179 ;; If folding is disallowed, make sure the total length (including |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5180 ;; the spaces between) will be less than MAXSIZE characters. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5181 ;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5182 ;; Only disallow folding for News messages. At this point the headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5183 ;; have not been generated, thus we use message-this-is-news directly. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5184 (when (and message-this-is-news message-cater-to-broken-inn) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5185 (let ((maxsize 988) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5186 (totalsize (+ (apply #'+ (mapcar #'length refs)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5187 (1- count))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5188 (surplus 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5189 (ptr (nthcdr (1- cut) refs))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5190 ;; Decide how many elements to cut off... |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5191 (while (> totalsize maxsize) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5192 (decf totalsize (1+ (length (car ptr)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5193 (incf surplus) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5194 (setq ptr (cdr ptr))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5195 ;; ...and do it. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5196 (when (> surplus 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5197 (message-shorten-1 refs cut surplus)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5198 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5199 ;; Finally, collect the references back into a string and insert |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5200 ;; it into the buffer. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5201 (let ((refstring (mapconcat #'identity refs " "))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5202 (if (and message-this-is-news message-cater-to-broken-inn) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5203 (insert (capitalize (symbol-name header)) ": " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5204 refstring "\n") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5205 (message-fill-header header refstring))))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5206 |
17493 | 5207 (defun message-position-point () |
5208 "Move point to where the user probably wants to find it." | |
5209 (message-narrow-to-headers) | |
5210 (cond | |
5211 ((re-search-forward "^[^:]+:[ \t]*$" nil t) | |
5212 (search-backward ":" ) | |
5213 (widen) | |
5214 (forward-char 1) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5215 (if (eq (char-after) ? ) |
17493 | 5216 (forward-char 1) |
5217 (insert " "))) | |
5218 (t | |
5219 (goto-char (point-max)) | |
5220 (widen) | |
5221 (forward-line 1) | |
5222 (unless (looking-at "$") | |
5223 (forward-line 2))) | |
5224 (sit-for 0))) | |
5225 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5226 (defcustom message-beginning-of-line t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5227 "Whether \\<message-mode-map>\\[message-beginning-of-line]\ |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5228 goes to beginning of header values." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5229 :group 'message-buffers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5230 :link '(custom-manual "(message)Movement") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5231 :type 'boolean) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5232 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5233 (defun message-beginning-of-line (&optional n) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5234 "Move point to beginning of header value or to beginning of line. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5235 The prefix argument N is passed directly to `beginning-of-line'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5236 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5237 This command is identical to `beginning-of-line' if point is |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5238 outside the message header or if the option `message-beginning-of-line' |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5239 is nil. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5240 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5241 If point is in the message header and on a (non-continued) header |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5242 line, move point to the beginning of the header value. If point |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5243 is already there, move point to beginning of line. Therefore, |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5244 repeated calls will toggle point between beginning of field and |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5245 beginning of line." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5246 (interactive "p") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5247 (let ((zrs 'zmacs-region-stays)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5248 (when (and (interactive-p) (boundp zrs)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5249 (set zrs t))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5250 (if (and message-beginning-of-line |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5251 (message-point-in-header-p)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5252 (let* ((here (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5253 (bol (progn (beginning-of-line n) (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5254 (eol (gnus-point-at-eol)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5255 (eoh (re-search-forward ": *" eol t))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5256 (if (or (not eoh) (equal here eoh)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5257 (goto-char bol) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5258 (goto-char eoh))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5259 (beginning-of-line n))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5260 |
17493 | 5261 (defun message-buffer-name (type &optional to group) |
5262 "Return a new (unique) buffer name based on TYPE and TO." | |
5263 (cond | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5264 ;; Generate a new buffer name The Message Way. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5265 ((eq message-generate-new-buffers 'unique) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5266 (generate-new-buffer-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5267 (concat "*" type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5268 (if to |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5269 (concat " to " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5270 (or (car (mail-extract-address-components to)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5271 to) "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5272 "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5273 (if (and group (not (string= group ""))) (concat " on " group) "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5274 "*"))) |
17493 | 5275 ;; Check whether `message-generate-new-buffers' is a function, |
5276 ;; and if so, call it. | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5277 ((functionp message-generate-new-buffers) |
17493 | 5278 (funcall message-generate-new-buffers type to group)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5279 ((eq message-generate-new-buffers 'unsent) |
17493 | 5280 (generate-new-buffer-name |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5281 (concat "*unsent " type |
17493 | 5282 (if to |
5283 (concat " to " | |
5284 (or (car (mail-extract-address-components to)) | |
5285 to) "") | |
5286 "") | |
5287 (if (and group (not (string= group ""))) (concat " on " group) "") | |
5288 "*"))) | |
5289 ;; Use standard name. | |
5290 (t | |
5291 (format "*%s message*" type)))) | |
5292 | |
5293 (defun message-pop-to-buffer (name) | |
5294 "Pop to buffer NAME, and warn if it already exists and is modified." | |
5295 (let ((buffer (get-buffer name))) | |
5296 (if (and buffer | |
5297 (buffer-name buffer)) | |
5298 (progn | |
5299 (set-buffer (pop-to-buffer buffer)) | |
5300 (when (and (buffer-modified-p) | |
5301 (not (y-or-n-p | |
5302 "Message already being composed; erase? "))) | |
5303 (error "Message being composed"))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5304 (set-buffer (pop-to-buffer name))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5305 (erase-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5306 (message-mode))) |
17493 | 5307 |
5308 (defun message-do-send-housekeeping () | |
5309 "Kill old message buffers." | |
5310 ;; We might have sent this buffer already. Delete it from the | |
5311 ;; list of buffers. | |
5312 (setq message-buffer-list (delq (current-buffer) message-buffer-list)) | |
5313 (while (and message-max-buffers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5314 message-buffer-list |
17493 | 5315 (>= (length message-buffer-list) message-max-buffers)) |
5316 ;; Kill the oldest buffer -- unless it has been changed. | |
5317 (let ((buffer (pop message-buffer-list))) | |
5318 (when (and (buffer-name buffer) | |
5319 (not (buffer-modified-p buffer))) | |
5320 (kill-buffer buffer)))) | |
5321 ;; Rename the buffer. | |
5322 (if message-send-rename-function | |
5323 (funcall message-send-rename-function) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5324 ;; Note: mail-abbrevs of XEmacs renames buffer name behind Gnus. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5325 (when (string-match |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5326 "\\`\\*\\(sent \\|unsent \\)?\\(.+\\)\\*[^\\*]*\\|\\`mail to " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5327 (buffer-name)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5328 (let ((name (match-string 2 (buffer-name))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5329 to group) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5330 (if (not (or (null name) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5331 (string-equal name "mail") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5332 (string-equal name "posting"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5333 (setq name (concat "*sent " name "*")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5334 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5335 (setq 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:
54287
diff
changeset
|
5336 (setq group (message-fetch-field "newsgroups")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5337 (widen) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5338 (setq name |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5339 (cond |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5340 (to (concat "*sent mail to " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5341 (or (car (mail-extract-address-components to)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5342 to) "*")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5343 ((and group (not (string= group ""))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5344 (concat "*sent posting on " group "*")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5345 (t "*sent mail*")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5346 (unless (string-equal name (buffer-name)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5347 (rename-buffer name t))))) |
17493 | 5348 ;; Push the current buffer onto the list. |
5349 (when message-max-buffers | |
5350 (setq message-buffer-list | |
5351 (nconc message-buffer-list (list (current-buffer)))))) | |
5352 | |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5353 (defun message-mail-user-agent () |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5354 (let ((mua (cond |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5355 ((not message-mail-user-agent) nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5356 ((eq message-mail-user-agent t) mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5357 (t message-mail-user-agent)))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5358 (if (memq mua '(message-user-agent gnus-user-agent)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5359 nil |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5360 mua))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5361 |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5362 (defun message-setup (headers &optional replybuffer actions switch-function) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5363 (let ((mua (message-mail-user-agent)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5364 subject to field yank-action) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5365 (if (not (and message-this-is-mail mua)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5366 (message-setup-1 headers replybuffer actions) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5367 (if replybuffer |
34859
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
5368 (setq yank-action (list 'insert-buffer replybuffer))) |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5369 (setq headers (copy-sequence headers)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5370 (setq field (assq 'Subject headers)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5371 (when field |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5372 (setq subject (cdr field)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5373 (setq headers (delq field headers))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5374 (setq field (assq 'To headers)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5375 (when field |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5376 (setq to (cdr field)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5377 (setq headers (delq field headers))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5378 (let ((mail-user-agent mua)) |
35147 | 5379 (compose-mail to subject |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5380 (mapcar (lambda (item) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5381 (cons |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5382 (format "%s" (car item)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5383 (cdr item))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5384 headers) |
35147 | 5385 nil switch-function yank-action actions))))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49034
diff
changeset
|
5386 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5387 (defun message-headers-to-generate (headers included-headers excluded-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5388 "Return a list that includes all headers from HEADERS. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5389 If INCLUDED-HEADERS is a list, just include those headers. If if is |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5390 t, include all headers. In any case, headers from EXCLUDED-HEADERS |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5391 are not included." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5392 (let ((result nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5393 header-name) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5394 (dolist (header headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5395 (setq header-name (cond |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5396 ((and (consp header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5397 (eq (car header) 'optional)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5398 ;; On the form (optional . Header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5399 (cdr header)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5400 ((consp header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5401 ;; On the form (Header . function) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5402 (car header)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5403 (t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5404 ;; Just a Header. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5405 header))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5406 (when (and (not (memq header-name excluded-headers)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5407 (or (eq included-headers t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5408 (memq header-name included-headers))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5409 (push header result))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5410 (nreverse result))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5411 |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5412 (defun message-setup-1 (headers &optional replybuffer actions) |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
5413 (dolist (action actions) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
5414 (condition-case nil |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
5415 (add-to-list 'message-send-actions |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
5416 `(apply ',(car action) ',(cdr action))))) |
17493 | 5417 (setq message-reply-buffer replybuffer) |
5418 (goto-char (point-min)) | |
5419 ;; Insert all the headers. | |
5420 (mail-header-format | |
5421 (let ((h headers) | |
5422 (alist message-header-format-alist)) | |
5423 (while h | |
5424 (unless (assq (caar h) message-header-format-alist) | |
5425 (push (list (caar h)) alist)) | |
5426 (pop h)) | |
5427 alist) | |
5428 headers) | |
5429 (delete-region (point) (progn (forward-line -1) (point))) | |
5430 (when message-default-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5431 (insert message-default-headers) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5432 (or (bolp) (insert ?\n))) |
17493 | 5433 (put-text-property |
5434 (point) | |
5435 (progn | |
5436 (insert mail-header-separator "\n") | |
5437 (1- (point))) | |
5438 'read-only nil) | |
5439 (forward-line -1) | |
5440 (when (message-news-p) | |
5441 (when message-default-news-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5442 (insert message-default-news-headers) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5443 (or (bolp) (insert ?\n))) |
17493 | 5444 (when message-generate-headers-first |
5445 (message-generate-headers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5446 (message-headers-to-generate |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5447 (append message-required-news-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5448 message-required-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5449 message-generate-headers-first |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5450 '(Lines Subject))))) |
17493 | 5451 (when (message-mail-p) |
5452 (when message-default-mail-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5453 (insert message-default-mail-headers) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5454 (or (bolp) (insert ?\n))) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5455 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5456 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5457 (if message-alternative-emails |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5458 (message-use-alternative-email-as-from))) |
17493 | 5459 (when message-generate-headers-first |
5460 (message-generate-headers | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5461 (message-headers-to-generate |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5462 (append message-required-mail-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5463 message-required-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5464 message-generate-headers-first |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5465 '(Lines Subject))))) |
17493 | 5466 (run-hooks 'message-signature-setup-hook) |
5467 (message-insert-signature) | |
5468 (save-restriction | |
5469 (message-narrow-to-headers) | |
5470 (run-hooks 'message-header-setup-hook)) | |
5471 (set-buffer-modified-p nil) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5472 (setq buffer-undo-list nil) |
17493 | 5473 (run-hooks 'message-setup-hook) |
5474 (message-position-point) | |
5475 (undo-boundary)) | |
5476 | |
5477 (defun message-set-auto-save-file-name () | |
5478 "Associate the message buffer with a file in the drafts directory." | |
23379
cfa9bc8ed327
(message-auto-save-directory): Renamed from
Karl Heuer <kwzh@gnu.org>
parents:
23096
diff
changeset
|
5479 (when message-auto-save-directory |
34057
98bd49d8cf7d
(message-auto-save-directory): Use
Dave Love <fx@gnu.org>
parents:
33982
diff
changeset
|
5480 (unless (file-directory-p |
98bd49d8cf7d
(message-auto-save-directory): Use
Dave Love <fx@gnu.org>
parents:
33982
diff
changeset
|
5481 (directory-file-name message-auto-save-directory)) |
48376
285ddf07e772
* message.el (message-set-auto-save-file-name): Use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
47947
diff
changeset
|
5482 (make-directory message-auto-save-directory t)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5483 (if (gnus-alive-p) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5484 (setq message-draft-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5485 (nndraft-request-associate-buffer "drafts")) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5486 (setq buffer-file-name (expand-file-name |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5487 (if (memq system-type |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5488 '(ms-dos ms-windows windows-nt |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5489 cygwin cygwin32 win32 w32 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5490 mswindows)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5491 "message" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5492 "*message*") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5493 message-auto-save-directory)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5494 (setq buffer-auto-save-file-name (make-auto-save-file-name))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5495 (clear-visited-file-modtime) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5496 (setq buffer-file-coding-system message-draft-coding-system))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5497 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5498 (defun message-disassociate-draft () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5499 "Disassociate the message buffer from the drafts directory." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5500 (when message-draft-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5501 (nndraft-request-expire-articles |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5502 (list message-draft-article) "drafts" nil t))) |
17493 | 5503 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5504 (defun message-insert-headers () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5505 "Generate the headers for the article." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5506 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5507 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5508 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5509 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5510 (when (message-news-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5511 (message-generate-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5512 (delq 'Lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5513 (delq 'Subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5514 (copy-sequence message-required-news-headers))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5515 (when (message-mail-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5516 (message-generate-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5517 (delq 'Lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5518 (delq 'Subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5519 (copy-sequence message-required-mail-headers)))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5520 |
17493 | 5521 |
5522 | |
5523 ;;; | |
5524 ;;; Commands for interfacing with message | |
5525 ;;; | |
5526 | |
5527 ;;;###autoload | |
5528 (defun message-mail (&optional to subject | |
5529 other-headers continue switch-function | |
5530 yank-action send-actions) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5531 "Start editing a mail message to be sent. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5532 OTHER-HEADERS is an alist of header/value pairs." |
17493 | 5533 (interactive) |
34859
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
5534 (let ((message-this-is-mail t) replybuffer) |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5535 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5536 (message-pop-to-buffer (message-buffer-name "mail" to))) |
34859
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
5537 ;; FIXME: message-mail should do something if YANK-ACTION is not |
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
5538 ;; insert-buffer. |
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
5539 (and (consp yank-action) (eq (car yank-action) 'insert-buffer) |
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
5540 (setq replybuffer (nth 1 yank-action))) |
17493 | 5541 (message-setup |
5542 (nconc | |
5543 `((To . ,(or to "")) (Subject . ,(or subject ""))) | |
34859
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
5544 (when other-headers other-headers)) |
41750
a96c3ddfa03e
2001-12-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41511
diff
changeset
|
5545 replybuffer send-actions) |
34859
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
5546 ;; FIXME: Should return nil if failure. |
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
5547 t)) |
17493 | 5548 |
5549 ;;;###autoload | |
5550 (defun message-news (&optional newsgroups subject) | |
5551 "Start editing a news article to be sent." | |
5552 (interactive) | |
5553 (let ((message-this-is-news t)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5554 (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups)) |
17493 | 5555 (message-setup `((Newsgroups . ,(or newsgroups "")) |
5556 (Subject . ,(or subject "")))))) | |
5557 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5558 (defun message-get-reply-headers (wide &optional to-address address-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5559 (let (follow-to mct never-mct to cc author mft recipients) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5560 ;; Find all relevant headers we need. |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5561 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5562 (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:
54287
diff
changeset
|
5563 ;; Gmane renames "To". Look at "Original-To", too, if it is present in |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5564 ;; message-header-synonyms. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5565 (setq to (or (message-fetch-field "to") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5566 (and (loop for synonym in message-header-synonyms |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5567 when (memq 'Original-To synonym) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5568 return t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5569 (message-fetch-field "original-to"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5570 cc (message-fetch-field "cc") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5571 mct (message-fetch-field "mail-copies-to") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5572 author (or (message-fetch-field "mail-reply-to") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5573 (message-fetch-field "reply-to") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5574 (message-fetch-field "from") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5575 "") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5576 mft (and message-use-mail-followup-to |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5577 (message-fetch-field "mail-followup-to")))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5578 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5579 ;; Handle special values of Mail-Copies-To. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5580 (when mct |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5581 (cond ((or (equal (downcase mct) "never") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5582 (equal (downcase mct) "nobody")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5583 (setq never-mct t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5584 (setq mct nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5585 ((or (equal (downcase mct) "always") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5586 (equal (downcase mct) "poster")) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5587 (setq mct author)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5588 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5589 (save-match-data |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5590 ;; Build (textual) list of new recipient addresses. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5591 (cond |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5592 ((not wide) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5593 (setq recipients (concat ", " author))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5594 (address-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5595 (dolist (header address-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5596 (let ((value (message-fetch-field header))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5597 (when value |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5598 (setq recipients (concat recipients ", " value)))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5599 ((and mft |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5600 (string-match "[^ \t,]" mft) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5601 (or (not (eq message-use-mail-followup-to 'ask)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5602 (message-y-or-n-p "Obey Mail-Followup-To? " t "\ |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5603 You should normally obey the Mail-Followup-To: header. In this |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5604 article, it has the value of |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5605 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5606 " mft " |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5607 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5608 which directs your response to " (if (string-match "," mft) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5609 "the specified addresses" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5610 "that address only") ". |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5611 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5612 Most commonly, Mail-Followup-To is used by a mailing list poster to |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5613 express that responses should be sent to just the list, and not the |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5614 poster as well. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5615 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5616 If a message is posted to several mailing lists, Mail-Followup-To may |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5617 also be used to direct the following discussion to one list only, |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5618 because discussions that are spread over several lists tend to be |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5619 fragmented and very difficult to follow. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5620 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5621 Also, some source/announcement lists are not intended for discussion; |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5622 responses here are directed to other addresses."))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5623 (setq recipients (concat ", " mft))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5624 (to-address |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5625 (setq recipients (concat ", " to-address)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5626 ;; If the author explicitly asked for a copy, we don't deny it to them. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5627 (if mct (setq recipients (concat recipients ", " mct)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5628 (t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5629 (setq recipients (if never-mct "" (concat ", " author))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5630 (if to (setq recipients (concat recipients ", " to))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5631 (if cc (setq recipients (concat recipients ", " cc))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5632 (if mct (setq recipients (concat recipients ", " mct))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5633 (if (>= (length recipients) 2) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5634 ;; Strip the leading ", ". |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5635 (setq recipients (substring recipients 2))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5636 ;; Squeeze whitespace. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5637 (while (string-match "[ \t][ \t]+" recipients) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5638 (setq recipients (replace-match " " t t recipients))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5639 ;; Remove addresses that match `rmail-dont-reply-to-names'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5640 (let ((rmail-dont-reply-to-names message-dont-reply-to-names)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5641 (setq recipients (rmail-dont-reply-to recipients))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5642 ;; Perhaps "Mail-Copies-To: never" removed the only address? |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5643 (if (string-equal recipients "") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5644 (setq recipients author)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5645 ;; Convert string to a list of (("foo@bar" . "Name <Foo@BAR>") ...). |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5646 (setq recipients |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5647 (mapcar |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5648 (lambda (addr) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5649 (cons (downcase (mail-strip-quoted-names addr)) addr)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5650 (message-tokenize-header recipients))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5651 ;; Remove first duplicates. (Why not all duplicates? Is this a bug?) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5652 (let ((s recipients)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5653 (while s |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5654 (setq recipients (delq (assoc (car (pop s)) s) recipients)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5655 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5656 ;; Remove hierarchical lists that are contained within each other, |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5657 ;; if message-hierarchical-addresses is defined. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5658 (when message-hierarchical-addresses |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5659 (let ((plain-addrs (mapcar 'car recipients)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5660 subaddrs recip) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5661 (while plain-addrs |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5662 (setq subaddrs (assoc (car plain-addrs) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5663 message-hierarchical-addresses) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5664 plain-addrs (cdr plain-addrs)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5665 (when subaddrs |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5666 (setq subaddrs (cdr subaddrs)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5667 (while subaddrs |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5668 (setq recip (assoc (car subaddrs) recipients) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5669 subaddrs (cdr subaddrs)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5670 (if recip |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5671 (setq recipients (delq recip recipients)))))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5672 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5673 ;; Build the header alist. Allow the user to be asked whether |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5674 ;; or not to reply to all recipients in a wide reply. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5675 (setq follow-to (list (cons 'To (cdr (pop recipients))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5676 (when (and recipients |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5677 (or (not message-wide-reply-confirm-recipients) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5678 (y-or-n-p "Reply to all recipients? "))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5679 (setq recipients (mapconcat |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5680 (lambda (addr) (cdr addr)) recipients ", ")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5681 (if (string-match "^ +" recipients) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5682 (setq recipients (substring recipients (match-end 0)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5683 (push (cons 'Cc recipients) follow-to))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5684 follow-to)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5685 |
17493 | 5686 ;;;###autoload |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5687 (defun message-reply (&optional to-address wide) |
17493 | 5688 "Start editing a reply to the article in the current buffer." |
5689 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5690 (require 'gnus-sum) ; for gnus-list-identifiers |
17493 | 5691 (let ((cur (current-buffer)) |
5692 from subject date reply-to to cc | |
5693 references message-id follow-to | |
5694 (inhibit-point-motion-hooks t) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5695 (message-this-is-mail t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5696 gnus-warning) |
17493 | 5697 (save-restriction |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
5698 (message-narrow-to-head-1) |
17493 | 5699 ;; Allow customizations to have their say. |
5700 (if (not wide) | |
5701 ;; This is a regular reply. | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5702 (when (functionp message-reply-to-function) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5703 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5704 (setq follow-to (funcall message-reply-to-function)))) |
17493 | 5705 ;; This is a followup. |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5706 (when (functionp message-wide-reply-to-function) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5707 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5708 (setq follow-to |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5709 (funcall message-wide-reply-to-function))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5710 (setq message-id (message-fetch-field "message-id" t) |
17493 | 5711 references (message-fetch-field "references") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5712 date (message-fetch-field "date") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5713 from (message-fetch-field "from") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5714 subject (or (message-fetch-field "subject") "none")) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5715 (when gnus-list-identifiers |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5716 (setq subject (message-strip-list-identifiers subject))) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5717 (setq subject (concat "Re: " (message-strip-subject-re subject))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5718 (when message-subject-trailing-was-query |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5719 (setq subject (message-strip-subject-trailing-was subject))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5720 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5721 (when (and (setq gnus-warning (message-fetch-field "gnus-warning")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5722 (string-match "<[^>]+>" gnus-warning)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5723 (setq message-id (match-string 0 gnus-warning))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5724 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5725 (unless follow-to |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5726 (setq follow-to (message-get-reply-headers wide to-address)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5727 |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5728 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5729 (message-pop-to-buffer |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5730 (message-buffer-name |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5731 (if wide "wide reply" "reply") from |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
5732 (if wide to-address nil)))) |
17493 | 5733 |
5734 (setq message-reply-headers | |
5735 (vector 0 subject from date message-id references 0 0 "")) | |
5736 | |
5737 (message-setup | |
5738 `((Subject . ,subject) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5739 ,@follow-to) |
17493 | 5740 cur))) |
5741 | |
5742 ;;;###autoload | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5743 (defun message-wide-reply (&optional to-address) |
17493 | 5744 "Make a \"wide\" reply to the message in the current buffer." |
5745 (interactive) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5746 (message-reply to-address t)) |
17493 | 5747 |
5748 ;;;###autoload | |
5749 (defun message-followup (&optional to-newsgroups) | |
5750 "Follow up to the message in the current buffer. | |
5751 If TO-NEWSGROUPS, use that as the new Newsgroups line." | |
5752 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5753 (require 'gnus-sum) ; for gnus-list-identifiers |
17493 | 5754 (let ((cur (current-buffer)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5755 from subject date reply-to mrt mct |
17493 | 5756 references message-id follow-to |
5757 (inhibit-point-motion-hooks t) | |
5758 (message-this-is-news t) | |
5759 followup-to distribution newsgroups gnus-warning posted-to) | |
5760 (save-restriction | |
5761 (narrow-to-region | |
5762 (goto-char (point-min)) | |
5763 (if (search-forward "\n\n" nil t) | |
5764 (1- (point)) | |
5765 (point-max))) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5766 (when (functionp message-followup-to-function) |
17493 | 5767 (setq follow-to |
5768 (funcall message-followup-to-function))) | |
5769 (setq from (message-fetch-field "from") | |
5770 date (message-fetch-field "date") | |
5771 subject (or (message-fetch-field "subject") "none") | |
5772 references (message-fetch-field "references") | |
5773 message-id (message-fetch-field "message-id" t) | |
5774 followup-to (message-fetch-field "followup-to") | |
5775 newsgroups (message-fetch-field "newsgroups") | |
5776 posted-to (message-fetch-field "posted-to") | |
5777 reply-to (message-fetch-field "reply-to") | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5778 mrt (message-fetch-field "mail-reply-to") |
17493 | 5779 distribution (message-fetch-field "distribution") |
5780 mct (message-fetch-field "mail-copies-to")) | |
5781 (when (and (setq gnus-warning (message-fetch-field "gnus-warning")) | |
5782 (string-match "<[^>]+>" gnus-warning)) | |
5783 (setq message-id (match-string 0 gnus-warning))) | |
5784 ;; Remove bogus distribution. | |
5785 (when (and (stringp distribution) | |
5786 (let ((case-fold-search t)) | |
5787 (string-match "world" distribution))) | |
5788 (setq distribution nil)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5789 (if gnus-list-identifiers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5790 (setq subject (message-strip-list-identifiers subject))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5791 (setq subject (concat "Re: " (message-strip-subject-re subject))) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5792 (when message-subject-trailing-was-query |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5793 (setq subject (message-strip-subject-trailing-was subject))) |
17493 | 5794 (widen)) |
5795 | |
5796 (message-pop-to-buffer (message-buffer-name "followup" from newsgroups)) | |
5797 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5798 (setq message-reply-headers |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5799 (vector 0 subject from date message-id references 0 0 "")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5800 |
17493 | 5801 (message-setup |
5802 `((Subject . ,subject) | |
5803 ,@(cond | |
5804 (to-newsgroups | |
5805 (list (cons 'Newsgroups to-newsgroups))) | |
5806 (follow-to follow-to) | |
5807 ((and followup-to message-use-followup-to) | |
5808 (list | |
5809 (cond | |
5810 ((equal (downcase followup-to) "poster") | |
5811 (if (or (eq message-use-followup-to 'use) | |
5812 (message-y-or-n-p "Obey Followup-To: poster? " t "\ | |
5813 You should normally obey the Followup-To: header. | |
5814 | |
5815 `Followup-To: poster' sends your response via e-mail instead of news. | |
5816 | |
5817 A typical situation where `Followup-To: poster' is used is when the poster | |
5818 does not read the newsgroup, so he wouldn't see any replies sent to it.")) | |
5819 (progn | |
5820 (setq message-this-is-news nil) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5821 (cons 'To (or mrt reply-to from ""))) |
17493 | 5822 (cons 'Newsgroups newsgroups))) |
5823 (t | |
5824 (if (or (equal followup-to newsgroups) | |
5825 (not (eq message-use-followup-to 'ask)) | |
5826 (message-y-or-n-p | |
5827 (concat "Obey Followup-To: " followup-to "? ") t "\ | |
5828 You should normally obey the Followup-To: header. | |
5829 | |
5830 `Followup-To: " followup-to "' | |
5831 directs your response to " (if (string-match "," followup-to) | |
5832 "the specified newsgroups" | |
5833 "that newsgroup only") ". | |
5834 | |
5835 If a message is posted to several newsgroups, Followup-To is often | |
5836 used to direct the following discussion to one newsgroup only, | |
5837 because discussions that are spread over several newsgroup tend to | |
5838 be fragmented and very difficult to follow. | |
5839 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5840 Also, some source/announcement newsgroups are not intended for discussion; |
17493 | 5841 responses here are directed to other newsgroups.")) |
5842 (cons 'Newsgroups followup-to) | |
5843 (cons 'Newsgroups newsgroups)))))) | |
5844 (posted-to | |
5845 `((Newsgroups . ,posted-to))) | |
5846 (t | |
5847 `((Newsgroups . ,newsgroups)))) | |
5848 ,@(and distribution (list (cons 'Distribution distribution))) | |
5849 ,@(when (and mct | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5850 (not (or (equal (downcase mct) "never") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5851 (equal (downcase mct) "nobody")))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5852 (list (cons 'Cc (if (or (equal (downcase mct) "always") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5853 (equal (downcase mct) "poster")) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5854 (or mrt reply-to from "") |
17493 | 5855 mct))))) |
5856 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5857 cur))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5858 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5859 (defun message-is-yours-p () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5860 "Non-nil means current article is yours. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5861 If you have added 'cancel-messages to 'message-shoot-gnksa-feet', all articles |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5862 are yours except those that have Cancel-Lock header not belonging to you. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5863 Instead of shooting GNKSA feet, you should modify 'message-alternative-emails' |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5864 regexp to match all of yours addresses." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5865 ;; Canlock-logic as suggested by Per Abrahamsen |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5866 ;; <abraham@dina.kvl.dk> |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5867 ;; |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5868 ;; IF article has cancel-lock THEN |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5869 ;; IF we can verify it THEN |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5870 ;; issue cancel |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5871 ;; ELSE |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5872 ;; error: cancellock: article is not yours |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5873 ;; ELSE |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5874 ;; Use old rules, comparing sender... |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5875 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5876 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5877 (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:
54287
diff
changeset
|
5878 (if (message-fetch-field "Cancel-Lock") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5879 (if (null (canlock-verify)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5880 t |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5881 (error "Failed to verify Cancel-lock: This article is not yours")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5882 (let (sender from) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5883 (or |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5884 (message-gnksa-enable-p 'cancel-messages) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5885 (and (setq sender (message-fetch-field "sender")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5886 (string-equal (downcase sender) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5887 (downcase (message-make-sender)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5888 ;; Email address in From field equals to our address |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5889 (and (setq from (message-fetch-field "from")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5890 (string-equal |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5891 (downcase (cadr (mail-extract-address-components from))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5892 (downcase (cadr (mail-extract-address-components |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5893 (message-make-from)))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5894 ;; Email address in From field matches |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5895 ;; 'message-alternative-emails' regexp |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5896 (and from |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5897 message-alternative-emails |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5898 (string-match |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5899 message-alternative-emails |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5900 (cadr (mail-extract-address-components from)))))))))) |
17493 | 5901 |
5902 ;;;###autoload | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5903 (defun message-cancel-news (&optional arg) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5904 "Cancel an article you posted. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5905 If ARG, allow editing of the cancellation message." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5906 (interactive "P") |
17493 | 5907 (unless (message-news-p) |
5908 (error "This is not a news article; canceling is impossible")) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5909 (let (from newsgroups message-id distribution buf) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5910 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5911 ;; Get header info from original article. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5912 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5913 (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:
54287
diff
changeset
|
5914 (setq from (message-fetch-field "from") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5915 newsgroups (message-fetch-field "newsgroups") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5916 message-id (message-fetch-field "message-id" t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5917 distribution (message-fetch-field "distribution"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5918 ;; Make sure that this article was written by the user. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5919 (unless (message-is-yours-p) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5920 (error "This article is not yours")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5921 (when (yes-or-no-p "Do you really want to cancel this article? ") |
17493 | 5922 ;; Make control message. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5923 (if arg |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5924 (message-news) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5925 (setq buf (set-buffer (get-buffer-create " *message cancel*")))) |
17493 | 5926 (erase-buffer) |
5927 (insert "Newsgroups: " newsgroups "\n" | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5928 "From: " from "\n" |
17493 | 5929 "Subject: cmsg cancel " message-id "\n" |
5930 "Control: cancel " message-id "\n" | |
5931 (if distribution | |
5932 (concat "Distribution: " distribution "\n") | |
5933 "") | |
5934 mail-header-separator "\n" | |
5935 message-cancel-message) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5936 (run-hooks 'message-cancel-hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5937 (unless arg |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5938 (message "Canceling your article...") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5939 (if (let ((message-syntax-checks |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5940 'dont-check-for-anything-just-trust-me)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5941 (funcall message-send-news-function)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5942 (message "Canceling your article...done")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5943 (kill-buffer buf)))))) |
17493 | 5944 |
5945 ;;;###autoload | |
5946 (defun message-supersede () | |
5947 "Start composing a message to supersede the current message. | |
5948 This is done simply by taking the old article and adding a Supersedes | |
5949 header line with the old Message-ID." | |
5950 (interactive) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5951 (let ((cur (current-buffer))) |
17493 | 5952 ;; Check whether the user owns the article that is to be superseded. |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
5953 (unless (message-is-yours-p) |
17493 | 5954 (error "This article is not yours")) |
5955 ;; Get a normal message buffer. | |
5956 (message-pop-to-buffer (message-buffer-name "supersede")) | |
5957 (insert-buffer-substring cur) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5958 (mime-to-mml) |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
5959 (message-narrow-to-head-1) |
17493 | 5960 ;; Remove unwanted headers. |
5961 (when message-ignored-supersedes-headers | |
5962 (message-remove-header message-ignored-supersedes-headers t)) | |
5963 (goto-char (point-min)) | |
5964 (if (not (re-search-forward "^Message-ID: " nil t)) | |
5965 (error "No Message-ID in this article") | |
5966 (replace-match "Supersedes: " t t)) | |
5967 (goto-char (point-max)) | |
5968 (insert mail-header-separator) | |
5969 (widen) | |
5970 (forward-line 1))) | |
5971 | |
5972 ;;;###autoload | |
5973 (defun message-recover () | |
5974 "Reread contents of current buffer from its last auto-save file." | |
5975 (interactive) | |
5976 (let ((file-name (make-auto-save-file-name))) | |
5977 (cond ((save-window-excursion | |
5978 (if (not (eq system-type 'vax-vms)) | |
5979 (with-output-to-temp-buffer "*Directory*" | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5980 (with-current-buffer standard-output |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5981 (fundamental-mode)) ; for Emacs 20.4+ |
17493 | 5982 (buffer-disable-undo standard-output) |
5983 (let ((default-directory "/")) | |
5984 (call-process | |
5985 "ls" nil standard-output nil "-l" file-name)))) | |
5986 (yes-or-no-p (format "Recover auto save file %s? " file-name))) | |
5987 (let ((buffer-read-only nil)) | |
5988 (erase-buffer) | |
5989 (insert-file-contents file-name nil))) | |
5990 (t (error "message-recover cancelled"))))) | |
5991 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5992 ;;; Washing Subject: |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5993 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5994 (defun message-wash-subject (subject) |
35147 | 5995 "Remove junk like \"Re:\", \"(fwd)\", etc. added to subject string SUBJECT. |
5996 Previous forwarders, replyers, etc. may add it." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5997 (with-temp-buffer |
41494
933ab100fb4a
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36856
diff
changeset
|
5998 (insert subject) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5999 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6000 ;; strip Re/Fwd stuff off the beginning |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6001 (while (re-search-forward |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6002 "\\([Rr][Ee]:\\|[Ff][Ww][Dd]\\(\\[[0-9]*\\]\\)?:\\|[Ff][Ww]:\\)" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6003 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6004 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6005 ;; and gnus-style forwards [foo@bar.com] subject |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6006 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6007 (while (re-search-forward "\\[[^ \t]*\\(@\\|\\.\\)[^ \t]*\\]" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6008 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6009 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6010 ;; and off the end |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6011 (goto-char (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6012 (while (re-search-backward "([Ff][Ww][Dd])" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6013 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6014 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6015 ;; and finally, any whitespace that was left-over |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6016 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6017 (while (re-search-forward "^[ \t]+" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6018 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6019 (goto-char (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6020 (while (re-search-backward "[ \t]+$" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6021 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6022 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6023 (buffer-string))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6024 |
17493 | 6025 ;;; Forwarding messages. |
6026 | |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6027 (defvar message-forward-decoded-p nil |
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6028 "Non-nil means the original message is decoded.") |
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6029 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6030 (defun message-forward-subject-name-subject (subject) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6031 "Generate a SUBJECT for a forwarded message. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6032 The form is: [Source] Subject, where if the original message was mail, |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6033 Source is the name of the sender, and if the original message was |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6034 news, Source is the list of newsgroups is was posted to." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6035 (let* ((group (message-fetch-field "newsgroups")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6036 (from (message-fetch-field "from")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6037 (prefix |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6038 (if group |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6039 (gnus-group-decoded-name group) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6040 (or (and from (car (gnus-extract-address-components from))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6041 "(nowhere)")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6042 (concat "[" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6043 (if message-forward-decoded-p |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6044 prefix |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6045 (mail-decode-encoded-word-string prefix)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6046 "] " subject))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6047 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6048 (defun message-forward-subject-author-subject (subject) |
35147 | 6049 "Generate a SUBJECT for a forwarded message. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6050 The form is: [Source] Subject, where if the original message was mail, |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6051 Source is the sender, and if the original message was news, Source is |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6052 the list of newsgroups is was posted to." |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6053 (let* ((group (message-fetch-field "newsgroups")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6054 (prefix |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6055 (if group |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6056 (gnus-group-decoded-name group) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6057 (or (message-fetch-field "from") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6058 "(nowhere)")))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6059 (concat "[" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6060 (if message-forward-decoded-p |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6061 prefix |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6062 (mail-decode-encoded-word-string prefix)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6063 "] " subject))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6064 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6065 (defun message-forward-subject-fwd (subject) |
35147 | 6066 "Generate a SUBJECT for a forwarded message. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6067 The form is: Fwd: Subject, where Subject is the original subject of |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6068 the message." |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6069 (if (string-match "^Fwd: " subject) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6070 subject |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6071 (concat "Fwd: " subject))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6072 |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6073 (defun message-make-forward-subject () |
17493 | 6074 "Return a Subject header suitable for the message in the current buffer." |
6075 (save-excursion | |
6076 (save-restriction | |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6077 (message-narrow-to-head-1) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6078 (let ((funcs message-make-forward-subject-function) |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6079 (subject (message-fetch-field "Subject"))) |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6080 (setq subject |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6081 (if subject |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6082 (if message-forward-decoded-p |
35957
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35453
diff
changeset
|
6083 subject |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35453
diff
changeset
|
6084 (mail-decode-encoded-word-string subject)) |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6085 "")) |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6086 (if message-wash-forwarded-subjects |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6087 (setq subject (message-wash-subject subject))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6088 ;; Make sure funcs is a list. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6089 (and funcs |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6090 (not (listp funcs)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6091 (setq funcs (list funcs))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6092 ;; Apply funcs in order, passing subject generated by previous |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6093 ;; func to the next one. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6094 (while funcs |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6095 (when (functionp (car funcs)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6096 (setq subject (funcall (car funcs) subject))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6097 (setq funcs (cdr funcs))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6098 subject)))) |
17493 | 6099 |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6100 (eval-when-compile |
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6101 (defvar gnus-article-decoded-p)) |
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6102 |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6103 |
17493 | 6104 ;;;###autoload |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6105 (defun message-forward (&optional news digest) |
17493 | 6106 "Forward the current message via mail. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6107 Optional NEWS will use news to forward instead of mail. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6108 Optional DIGEST will use digest to forward." |
17493 | 6109 (interactive "P") |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6110 (let* ((cur (current-buffer)) |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6111 (message-forward-decoded-p |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6112 (if (local-variable-p 'gnus-article-decoded-p (current-buffer)) |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6113 gnus-article-decoded-p ;; In an article buffer. |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6114 message-forward-decoded-p)) |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6115 (subject (message-make-forward-subject))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6116 (if news |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6117 (message-news nil subject) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6118 (message-mail nil subject)) |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6119 (message-forward-make-body cur digest))) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6120 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6121 (defun message-forward-make-body-plain (forward-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6122 (insert |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6123 "\n-------------------- Start of forwarded message --------------------\n") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6124 (let ((b (point)) e) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6125 (insert |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6126 (with-temp-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6127 (mm-disable-multibyte) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6128 (insert |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6129 (with-current-buffer forward-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6130 (mm-with-unibyte-current-buffer (buffer-string)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6131 (mm-enable-multibyte) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6132 (mime-to-mml) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6133 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6134 (when (looking-at "From ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6135 (replace-match "X-From-Line: ")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6136 (buffer-string))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6137 (setq e (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6138 (insert |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6139 "\n-------------------- End of forwarded message --------------------\n") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6140 (when (and (not current-prefix-arg) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6141 message-forward-ignored-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6142 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6143 (narrow-to-region b e) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6144 (goto-char b) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6145 (narrow-to-region (point) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6146 (or (search-forward "\n\n" nil t) (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6147 (message-remove-header message-forward-ignored-headers t))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6148 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6149 (defun message-forward-make-body-mime (forward-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6150 (insert "\n\n<#part type=message/rfc822 disposition=inline raw=t>\n") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6151 (let ((b (point)) e) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6152 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6153 (narrow-to-region (point) (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6154 (mml-insert-buffer forward-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6155 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6156 (when (looking-at "From ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6157 (replace-match "X-From-Line: ")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6158 (goto-char (point-max))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6159 (setq e (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6160 (insert "<#/part>\n"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6161 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6162 (defun message-forward-make-body-mml (forward-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6163 (insert "\n\n<#mml type=message/rfc822 disposition=inline>\n") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6164 (let ((b (point)) e) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6165 (if (not message-forward-decoded-p) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6166 (insert |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6167 (with-temp-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6168 (mm-disable-multibyte) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6169 (insert |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6170 (with-current-buffer forward-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6171 (mm-with-unibyte-current-buffer (buffer-string)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6172 (mm-enable-multibyte) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6173 (mime-to-mml) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6174 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6175 (when (looking-at "From ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6176 (replace-match "X-From-Line: ")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6177 (buffer-string))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6178 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6179 (narrow-to-region (point) (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6180 (mml-insert-buffer forward-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6181 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6182 (when (looking-at "From ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6183 (replace-match "X-From-Line: ")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6184 (goto-char (point-max)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6185 (setq e (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6186 (insert "<#/mml>\n") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6187 (when (and (not current-prefix-arg) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6188 message-forward-ignored-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6189 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6190 (narrow-to-region b e) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6191 (goto-char b) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6192 (narrow-to-region (point) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6193 (or (search-forward "\n\n" nil t) (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6194 (message-remove-header message-forward-ignored-headers t))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6195 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6196 (defun message-forward-make-body-digest-plain (forward-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6197 (insert |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6198 "\n-------------------- Start of forwarded message --------------------\n") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6199 (let ((b (point)) e) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6200 (mml-insert-buffer forward-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6201 (setq e (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6202 (insert |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6203 "\n-------------------- End of forwarded message --------------------\n"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6204 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6205 (defun message-forward-make-body-digest-mime (forward-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6206 (insert "\n<#multipart type=digest>\n") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6207 (let ((b (point)) e) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6208 (insert-buffer-substring forward-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6209 (setq e (point)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6210 (insert "<#/multipart>\n") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6211 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6212 (narrow-to-region b e) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6213 (goto-char b) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6214 (narrow-to-region (point) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6215 (or (search-forward "\n\n" nil t) (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6216 (delete-region (point-min) (point-max))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6217 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6218 (defun message-forward-make-body-digest (forward-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6219 (if message-forward-as-mime |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6220 (message-forward-make-body-digest-mime forward-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6221 (message-forward-make-body-digest-plain forward-buffer))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6222 |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6223 ;;;###autoload |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6224 (defun message-forward-make-body (forward-buffer &optional digest) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6225 ;; Put point where we want it before inserting the forwarded |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6226 ;; message. |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6227 (if message-forward-before-signature |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6228 (message-goto-body) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6229 (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:
54287
diff
changeset
|
6230 (if digest |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6231 (message-forward-make-body-digest forward-buffer) |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6232 (if 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:
54287
diff
changeset
|
6233 (if (and message-forward-show-mml |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6234 (not (and (eq message-forward-show-mml 'best) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6235 (with-current-buffer forward-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6236 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6237 (re-search-forward |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6238 "Content-Type: *multipart/\\(signed\\|encrypted\\)" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6239 nil t))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6240 (message-forward-make-body-mml forward-buffer) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6241 (message-forward-make-body-mime forward-buffer)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6242 (message-forward-make-body-plain forward-buffer))) |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6243 (message-position-point)) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6244 |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6245 ;;;###autoload |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6246 (defun message-forward-rmail-make-body (forward-buffer) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6247 (save-window-excursion |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6248 (set-buffer forward-buffer) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6249 ;; Rmail doesn't have rmail-msg-restore-non-pruned-header in Emacs |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6250 ;; 20. FIXIT, or we drop support for rmail in Emacs 20. |
43075
e14b8be37d7d
* message.el (message-forward-rmail-make-body): Directly use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42475
diff
changeset
|
6251 (if (rmail-msg-is-pruned) |
e14b8be37d7d
* message.el (message-forward-rmail-make-body): Directly use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42475
diff
changeset
|
6252 (rmail-msg-restore-non-pruned-header))) |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6253 (message-forward-make-body forward-buffer)) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6254 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6255 (eval-when-compile (defvar rmail-enable-mime-composing)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6256 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6257 ;; Fixme: Should have defcustom. |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6258 ;;;###autoload |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6259 (defun message-insinuate-rmail () |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6260 "Let RMAIL use message to forward." |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6261 (interactive) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6262 (setq rmail-enable-mime-composing t) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49034
diff
changeset
|
6263 (setq rmail-insert-mime-forwarded-message-function |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6264 'message-forward-rmail-make-body)) |
17493 | 6265 |
6266 ;;;###autoload | |
6267 (defun message-resend (address) | |
6268 "Resend the current article to ADDRESS." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6269 (interactive |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6270 (list (message-read-from-minibuffer "Resend message to: "))) |
17493 | 6271 (message "Resending message to %s..." address) |
6272 (save-excursion | |
6273 (let ((cur (current-buffer)) | |
6274 beg) | |
6275 ;; We first set up a normal mail buffer. | |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6276 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6277 (set-buffer (get-buffer-create " *message resend*")) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6278 (erase-buffer)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6279 (let ((message-this-is-mail t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6280 message-setup-hook) |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6281 (message-setup `((To . ,address)))) |
17493 | 6282 ;; Insert our usual headers. |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6283 (message-generate-headers '(From Date To Message-ID)) |
17493 | 6284 (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:
54287
diff
changeset
|
6285 ;; Remove X-Draft-From header etc. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6286 (message-remove-header message-ignored-mail-headers t) |
17493 | 6287 ;; Rename them all to "Resent-*". |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6288 (goto-char (point-min)) |
17493 | 6289 (while (re-search-forward "^[A-Za-z]" nil t) |
6290 (forward-char -1) | |
6291 (insert "Resent-")) | |
6292 (widen) | |
6293 (forward-line) | |
6294 (delete-region (point) (point-max)) | |
6295 (setq beg (point)) | |
6296 ;; Insert the message to be resent. | |
6297 (insert-buffer-substring cur) | |
6298 (goto-char (point-min)) | |
6299 (search-forward "\n\n") | |
6300 (forward-char -1) | |
6301 (save-restriction | |
6302 (narrow-to-region beg (point)) | |
6303 (message-remove-header message-ignored-resent-headers t) | |
6304 (goto-char (point-max))) | |
6305 (insert mail-header-separator) | |
6306 ;; Rename all old ("Also-")Resent headers. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6307 (while (re-search-backward "^\\(Also-\\)*Resent-" beg t) |
17493 | 6308 (beginning-of-line) |
6309 (insert "Also-")) | |
6310 ;; Quote any "From " lines at the beginning. | |
6311 (goto-char beg) | |
6312 (when (looking-at "From ") | |
6313 (replace-match "X-From-Line: ")) | |
6314 ;; Send it. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6315 (let ((message-inhibit-body-encoding t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6316 message-required-mail-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6317 (message-send-mail)) |
17493 | 6318 (kill-buffer (current-buffer))) |
6319 (message "Resending message to %s...done" address))) | |
6320 | |
6321 ;;;###autoload | |
6322 (defun message-bounce () | |
6323 "Re-mail the current message. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6324 This only makes sense if the current message is a bounce message that |
17493 | 6325 contains some mail you have written which has been bounced back to |
6326 you." | |
6327 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6328 (let ((handles (mm-dissect-buffer t)) |
17493 | 6329 boundary) |
6330 (message-pop-to-buffer (message-buffer-name "bounce")) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6331 (if (stringp (car handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6332 ;; This is a MIME bounce. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6333 (mm-insert-part (car (last handles))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6334 ;; This is a non-MIME bounce, so we try to remove things |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6335 ;; manually. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6336 (mm-insert-part handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6337 (undo-boundary) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6338 (goto-char (point-min)) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6339 (re-search-forward "\n\n+" nil t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6340 (setq boundary (point)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6341 ;; We remove everything before the bounced mail. |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6342 (if (or (re-search-forward message-unsent-separator nil t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6343 (progn |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6344 (search-forward "\n\n" nil 'move) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6345 (re-search-backward "^Return-Path:.*\n" boundary t))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6346 (progn |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6347 (forward-line 1) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6348 (delete-region (point-min) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6349 (if (re-search-forward "^[^ \n\t]+:" nil t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6350 (match-beginning 0) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6351 (point)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6352 (goto-char boundary) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6353 (when (re-search-backward "^.?From .*\n" nil t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6354 (delete-region (match-beginning 0) (match-end 0))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6355 (mm-enable-multibyte) |
17493 | 6356 (save-restriction |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6357 (message-narrow-to-head-1) |
17493 | 6358 (message-remove-header message-ignored-bounced-headers t) |
6359 (goto-char (point-max)) | |
6360 (insert mail-header-separator)) | |
6361 (message-position-point))) | |
6362 | |
6363 ;;; | |
6364 ;;; Interactive entry points for new message buffers. | |
6365 ;;; | |
6366 | |
6367 ;;;###autoload | |
6368 (defun message-mail-other-window (&optional to subject) | |
6369 "Like `message-mail' command, but display mail buffer in another window." | |
6370 (interactive) | |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6371 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6372 (let ((pop-up-windows t) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6373 (special-display-buffer-names nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6374 (special-display-regexps nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6375 (same-window-buffer-names nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6376 (same-window-regexps nil)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6377 (message-pop-to-buffer (message-buffer-name "mail" to)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6378 (let ((message-this-is-mail t)) |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6379 (message-setup `((To . ,(or to "")) (Subject . ,(or subject ""))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6380 nil nil 'switch-to-buffer-other-window))) |
17493 | 6381 |
6382 ;;;###autoload | |
6383 (defun message-mail-other-frame (&optional to subject) | |
6384 "Like `message-mail' command, but display mail buffer in another frame." | |
6385 (interactive) | |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6386 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6387 (let ((pop-up-frames t) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6388 (special-display-buffer-names nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6389 (special-display-regexps nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6390 (same-window-buffer-names nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6391 (same-window-regexps nil)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6392 (message-pop-to-buffer (message-buffer-name "mail" to)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6393 (let ((message-this-is-mail t)) |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6394 (message-setup `((To . ,(or to "")) (Subject . ,(or subject ""))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6395 nil nil 'switch-to-buffer-other-frame))) |
17493 | 6396 |
6397 ;;;###autoload | |
6398 (defun message-news-other-window (&optional newsgroups subject) | |
6399 "Start editing a news article to be sent." | |
6400 (interactive) | |
6401 (let ((pop-up-windows t) | |
6402 (special-display-buffer-names nil) | |
6403 (special-display-regexps nil) | |
6404 (same-window-buffer-names nil) | |
6405 (same-window-regexps nil)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6406 (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6407 (let ((message-this-is-news t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6408 (message-setup `((Newsgroups . ,(or newsgroups "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6409 (Subject . ,(or subject "")))))) |
17493 | 6410 |
6411 ;;;###autoload | |
6412 (defun message-news-other-frame (&optional newsgroups subject) | |
6413 "Start editing a news article to be sent." | |
6414 (interactive) | |
6415 (let ((pop-up-frames t) | |
6416 (special-display-buffer-names nil) | |
6417 (special-display-regexps nil) | |
6418 (same-window-buffer-names nil) | |
6419 (same-window-regexps nil)) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6420 (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6421 (let ((message-this-is-news t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6422 (message-setup `((Newsgroups . ,(or newsgroups "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6423 (Subject . ,(or subject "")))))) |
17493 | 6424 |
6425 ;;; underline.el | |
6426 | |
6427 ;; This code should be moved to underline.el (from which it is stolen). | |
6428 | |
6429 ;;;###autoload | |
6430 (defun bold-region (start end) | |
6431 "Bold all nonblank characters in the region. | |
6432 Works by overstriking characters. | |
6433 Called from program, takes two arguments START and END | |
6434 which specify the range to operate on." | |
6435 (interactive "r") | |
6436 (save-excursion | |
6437 (let ((end1 (make-marker))) | |
6438 (move-marker end1 (max start end)) | |
6439 (goto-char (min start end)) | |
6440 (while (< (point) end1) | |
6441 (or (looking-at "[_\^@- ]") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6442 (insert (char-after) "\b")) |
17493 | 6443 (forward-char 1))))) |
6444 | |
6445 ;;;###autoload | |
6446 (defun unbold-region (start end) | |
6447 "Remove all boldness (overstruck characters) in the region. | |
6448 Called from program, takes two arguments START and END | |
6449 which specify the range to operate on." | |
6450 (interactive "r") | |
6451 (save-excursion | |
6452 (let ((end1 (make-marker))) | |
6453 (move-marker end1 (max start end)) | |
6454 (goto-char (min start end)) | |
6455 (while (re-search-forward "\b" end1 t) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6456 (if (eq (char-after) (char-after (- (point) 2))) |
17493 | 6457 (delete-char -2)))))) |
6458 | |
82975
590114f9753d
2004-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82966
diff
changeset
|
6459 (defun message-exchange-point-and-mark () |
590114f9753d
2004-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82966
diff
changeset
|
6460 "Exchange point and mark, but don't activate region if it was inactive." |
590114f9753d
2004-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82966
diff
changeset
|
6461 (unless (prog1 |
590114f9753d
2004-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82966
diff
changeset
|
6462 (message-mark-active-p) |
590114f9753d
2004-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82966
diff
changeset
|
6463 (exchange-point-and-mark)) |
590114f9753d
2004-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82966
diff
changeset
|
6464 (setq mark-active nil))) |
590114f9753d
2004-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
Reiner Steib <Reiner.Steib@gmx.de>
parents:
82966
diff
changeset
|
6465 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6466 (defalias 'message-make-overlay 'make-overlay) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6467 (defalias 'message-delete-overlay 'delete-overlay) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6468 (defalias 'message-overlay-put 'overlay-put) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6469 (defun message-kill-all-overlays () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6470 (if (featurep 'xemacs) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6471 (map-extents (lambda (extent ignore) (delete-extent extent))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6472 (mapcar #'delete-overlay (overlays-in (point-min) (point-max))))) |
17493 | 6473 |
6474 ;; Support for toolbar | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6475 (eval-when-compile |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6476 (defvar tool-bar-map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6477 (defvar tool-bar-mode)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6478 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6479 (defun message-tool-bar-local-item-from-menu (command icon in-map &optional from-map &rest props) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6480 ;; We need to make tool bar entries in local keymaps with |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6481 ;; `tool-bar-local-item-from-menu' in Emacs > 21.3 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6482 (if (fboundp 'tool-bar-local-item-from-menu) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6483 ;; This is for Emacs 21.3 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6484 (tool-bar-local-item-from-menu command icon in-map from-map props) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6485 (tool-bar-add-item-from-menu command icon from-map props))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6486 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6487 (defun message-tool-bar-map () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6488 (or message-tool-bar-map |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6489 (setq message-tool-bar-map |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6490 (and |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6491 (condition-case nil (require 'tool-bar) (error nil)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6492 (fboundp 'tool-bar-add-item-from-menu) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6493 tool-bar-mode |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6494 (let ((tool-bar-map (copy-keymap tool-bar-map)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6495 (load-path (mm-image-load-path))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6496 ;; Zap some items which aren't so relevant and take |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6497 ;; up space. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6498 (dolist (key '(print-buffer kill-buffer save-buffer |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6499 write-file dired open-file)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6500 (define-key tool-bar-map (vector key) nil)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6501 (message-tool-bar-local-item-from-menu |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6502 'message-send-and-exit "mail_send" tool-bar-map message-mode-map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6503 (message-tool-bar-local-item-from-menu |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6504 'message-kill-buffer "close" tool-bar-map message-mode-map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6505 (message-tool-bar-local-item-from-menu |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6506 'message-dont-send "cancel" tool-bar-map message-mode-map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6507 (message-tool-bar-local-item-from-menu |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6508 'mml-attach-file "attach" tool-bar-map mml-mode-map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6509 (message-tool-bar-local-item-from-menu |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6510 'ispell-message "spell" tool-bar-map message-mode-map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6511 (message-tool-bar-local-item-from-menu |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6512 'mml-preview "preview" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6513 tool-bar-map mml-mode-map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6514 (message-tool-bar-local-item-from-menu |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6515 'message-insert-importance-high "important" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6516 tool-bar-map message-mode-map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6517 (message-tool-bar-local-item-from-menu |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6518 'message-insert-importance-low "unimportant" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6519 tool-bar-map message-mode-map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6520 (message-tool-bar-local-item-from-menu |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6521 'message-insert-disposition-notification-to "receipt" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6522 tool-bar-map message-mode-map) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6523 tool-bar-map))))) |
17493 | 6524 |
6525 ;;; Group name completion. | |
6526 | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6527 (defcustom message-newgroups-header-regexp |
17493 | 6528 "^\\(Newsgroups\\|Followup-To\\|Posted-To\\|Gcc\\):" |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6529 "Regexp that match headers that lists groups." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6530 :group 'message |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6531 :type 'regexp) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6532 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6533 (defcustom message-completion-alist |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6534 (list (cons message-newgroups-header-regexp 'message-expand-group) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6535 '("^\\(Resent-\\)?\\(To\\|B?Cc\\):" . message-expand-name) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6536 '("^\\(Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6537 . message-expand-name) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6538 '("^\\(Disposition-Notification-To\\|Return-Receipt-To\\):" |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6539 . message-expand-name)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6540 "Alist of (RE . FUN). Use FUN for completion on header lines matching RE." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6541 :group 'message |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6542 :type '(alist :key-type regexp :value-type function)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6543 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6544 (defcustom message-tab-body-function nil |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6545 "*Function to execute when `message-tab' (TAB) is executed in the body. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6546 If nil, the function bound in `text-mode-map' or `global-map' is executed." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6547 :group 'message |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6548 :link '(custom-manual "(message)Various Commands") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6549 :type 'function) |
17493 | 6550 |
6551 (defun message-tab () | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6552 "Complete names according to `message-completion-alist'. |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6553 Execute function specified by `message-tab-body-function' when not in |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6554 those headers." |
17493 | 6555 (interactive) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6556 (let ((alist message-completion-alist)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6557 (while (and alist |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6558 (let ((mail-abbrev-mode-regexp (caar alist))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6559 (not (mail-abbrev-in-expansion-header-p)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6560 (setq alist (cdr alist))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6561 (funcall (or (cdar alist) message-tab-body-function |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6562 (lookup-key text-mode-map "\t") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6563 (lookup-key global-map "\t") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6564 'indent-relative)))) |
17493 | 6565 |
6566 (defun message-expand-group () | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6567 "Expand the group name under point." |
17493 | 6568 (let* ((b (save-excursion |
6569 (save-restriction | |
6570 (narrow-to-region | |
6571 (save-excursion | |
6572 (beginning-of-line) | |
6573 (skip-chars-forward "^:") | |
6574 (1+ (point))) | |
6575 (point)) | |
6576 (skip-chars-backward "^, \t\n") (point)))) | |
6577 (completion-ignore-case t) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6578 (string (buffer-substring b (progn (skip-chars-forward "^,\t\n ") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6579 (point)))) |
17493 | 6580 (hashtb (and (boundp 'gnus-active-hashtb) gnus-active-hashtb)) |
6581 (completions (all-completions string hashtb)) | |
6582 comp) | |
6583 (delete-region b (point)) | |
6584 (cond | |
6585 ((= (length completions) 1) | |
6586 (if (string= (car completions) string) | |
6587 (progn | |
6588 (insert string) | |
6589 (message "Only matching group")) | |
6590 (insert (car completions)))) | |
6591 ((and (setq comp (try-completion string hashtb)) | |
6592 (not (string= comp string))) | |
6593 (insert comp)) | |
6594 (t | |
6595 (insert string) | |
6596 (if (not comp) | |
6597 (message "No matching groups") | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6598 (save-selected-window |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6599 (pop-to-buffer "*Completions*") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6600 (buffer-disable-undo) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6601 (let ((buffer-read-only nil)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6602 (erase-buffer) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6603 (let ((standard-output (current-buffer))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6604 (display-completion-list (sort completions 'string<))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6605 (goto-char (point-min)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6606 (delete-region (point) (progn (forward-line 3) (point)))))))))) |
17493 | 6607 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6608 (defun message-expand-name () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6609 (if (fboundp 'bbdb-complete-name) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6610 (bbdb-complete-name) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6611 (expand-abbrev))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6612 |
17493 | 6613 ;;; Help stuff. |
6614 | |
6615 (defun message-talkative-question (ask question show &rest text) | |
19525
59026d8478f7
Require cl only at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
19481
diff
changeset
|
6616 "Call FUNCTION with argument QUESTION; optionally display TEXT... args. |
59026d8478f7
Require cl only at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
19481
diff
changeset
|
6617 If SHOW is non-nil, the arguments TEXT... are displayed in a temp buffer. |
17493 | 6618 The following arguments may contain lists of values." |
6619 (if (and show | |
6620 (setq text (message-flatten-list text))) | |
6621 (save-window-excursion | |
6622 (save-excursion | |
6623 (with-output-to-temp-buffer " *MESSAGE information message*" | |
6624 (set-buffer " *MESSAGE information message*") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6625 (fundamental-mode) ; for Emacs 20.4+ |
17493 | 6626 (mapcar 'princ text) |
6627 (goto-char (point-min)))) | |
6628 (funcall ask question)) | |
6629 (funcall ask question))) | |
6630 | |
6631 (defun message-flatten-list (list) | |
6632 "Return a new, flat list that contains all elements of LIST. | |
6633 | |
6634 \(message-flatten-list '(1 (2 3 (4 5 (6))) 7)) | |
6635 => (1 2 3 4 5 6 7)" | |
6636 (cond ((consp list) | |
6637 (apply 'append (mapcar 'message-flatten-list list))) | |
6638 (list | |
6639 (list list)))) | |
6640 | |
6641 (defun message-generate-new-buffer-clone-locals (name &optional varstr) | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6642 "Create and return a buffer with name based on NAME using `generate-new-buffer'. |
17493 | 6643 Then clone the local variables and values from the old buffer to the |
6644 new one, cloning only the locals having a substring matching the | |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6645 regexp VARSTR." |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6646 (let ((oldbuf (current-buffer))) |
17493 | 6647 (save-excursion |
6648 (set-buffer (generate-new-buffer name)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6649 (message-clone-locals oldbuf varstr) |
17493 | 6650 (current-buffer)))) |
6651 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6652 (defun message-clone-locals (buffer &optional varstr) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6653 "Clone the local variables from BUFFER to the current buffer." |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6654 (let ((locals (save-excursion |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6655 (set-buffer buffer) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6656 (buffer-local-variables))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6657 (regexp "^gnus\\|^nn\\|^message\\|^user-mail-address")) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6658 (mapcar |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6659 (lambda (local) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6660 (when (and (consp local) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6661 (car local) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6662 (string-match regexp (symbol-name (car local))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6663 (or (null varstr) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6664 (string-match varstr (symbol-name (car local))))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6665 (ignore-errors |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6666 (set (make-local-variable (car local)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6667 (cdr local))))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6668 locals))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6669 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6670 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6671 ;;; MIME functions |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6672 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6673 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6674 (defvar message-inhibit-body-encoding nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6675 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6676 (defun message-encode-message-body () |
35147 | 6677 (unless message-inhibit-body-encoding |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6678 (let ((mail-parse-charset (or mail-parse-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6679 message-default-charset)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6680 (case-fold-search t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6681 lines content-type-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6682 (message-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6683 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6684 (narrow-to-region (point) (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6685 (let ((new (mml-generate-mime))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6686 (when new |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6687 (delete-region (point-min) (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6688 (insert new) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6689 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6690 (if (eq (aref new 0) ?\n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6691 (delete-char 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6692 (search-forward "\n\n") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6693 (setq lines (buffer-substring (point-min) (1- (point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6694 (delete-region (point-min) (point)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6695 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6696 (message-narrow-to-headers-or-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6697 (message-remove-header "Mime-Version") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6698 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6699 (insert "MIME-Version: 1.0\n") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6700 (when lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6701 (insert lines)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6702 (setq content-type-p |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6703 (or mml-boundary |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6704 (re-search-backward "^Content-Type:" nil t)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6705 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6706 (message-narrow-to-headers-or-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6707 (message-remove-first-header "Content-Type") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6708 (message-remove-first-header "Content-Transfer-Encoding")) |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6709 ;; We always make sure that the message has a Content-Type |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6710 ;; header. This is because some broken MTAs and MUAs get |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6711 ;; awfully confused when confronted with a message with a |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6712 ;; MIME-Version header and without a Content-Type header. For |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6713 ;; instance, Solaris' /usr/bin/mail. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6714 (unless content-type-p |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6715 (goto-char (point-min)) |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6716 ;; For unknown reason, MIME-Version doesn't exist. |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6717 (when (re-search-forward "^MIME-Version:" nil t) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6718 (forward-line 1) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6719 (insert "Content-Type: text/plain; charset=us-ascii\n")))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6720 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6721 (defun message-read-from-minibuffer (prompt &optional initial-contents) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6722 "Read from the minibuffer while providing abbrev expansion." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6723 (if (fboundp 'mail-abbrevs-setup) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6724 (let ((mail-abbrev-mode-regexp "") |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6725 (minibuffer-setup-hook 'mail-abbrevs-setup) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6726 (minibuffer-local-map message-minibuffer-local-map)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6727 (read-from-minibuffer prompt initial-contents)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6728 (let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6729 (minibuffer-local-map message-minibuffer-local-map)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6730 (read-string prompt initial-contents)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6731 |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6732 (defun message-use-alternative-email-as-from () |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6733 (require 'mail-utils) |
35147 | 6734 (let* ((fields '("To" "Cc")) |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6735 (emails |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6736 (split-string |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6737 (mail-strip-quoted-names |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6738 (mapconcat 'message-fetch-reply-field fields ",")) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6739 "[ \f\t\n\r\v,]+")) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6740 email) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6741 (while emails |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6742 (if (string-match message-alternative-emails (car emails)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6743 (setq email (car emails) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6744 emails nil)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6745 (pop emails)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6746 (unless (or (not email) (equal email user-mail-address)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6747 (goto-char (point-max)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6748 (insert "From: " email "\n")))) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
6749 |
82951
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6750 (defun message-options-get (symbol) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6751 (cdr (assq symbol message-options))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6752 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6753 (defun message-options-set (symbol value) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6754 (let ((the-cons (assq symbol message-options))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6755 (if the-cons |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6756 (if value |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6757 (setcdr the-cons value) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6758 (setq message-options (delq the-cons message-options))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6759 (and value |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6760 (push (cons symbol value) message-options)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6761 value) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6762 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6763 (defun message-options-set-recipient () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6764 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6765 (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:
54287
diff
changeset
|
6766 (message-options-set 'message-sender |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6767 (mail-strip-quoted-names |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6768 (message-fetch-field "from"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6769 (message-options-set 'message-recipients |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6770 (mail-strip-quoted-names |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6771 (let ((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:
54287
diff
changeset
|
6772 (cc (message-fetch-field "cc")) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6773 (bcc (message-fetch-field "bcc"))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6774 (concat |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6775 (or to "") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6776 (if (and to cc) ", ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6777 (or cc "") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6778 (if (and (or to cc) bcc) ", ") |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6779 (or bcc ""))))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6780 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6781 (defun message-hide-headers () |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6782 "Hide headers based on the `message-hidden-headers' variable." |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6783 (let ((regexps (if (stringp message-hidden-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6784 (list message-hidden-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6785 message-hidden-headers)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6786 (inhibit-point-motion-hooks t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6787 (after-change-functions nil)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6788 (when regexps |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6789 (save-excursion |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6790 (save-restriction |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6791 (message-narrow-to-headers) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6792 (goto-char (point-min)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6793 (while (not (eobp)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6794 (if (not (message-hide-header-p regexps)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6795 (message-next-header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6796 (let ((begin (point))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6797 (message-next-header) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6798 (add-text-properties |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6799 begin (point) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6800 '(invisible t message-hidden t)))))))))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6801 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6802 (defun message-hide-header-p (regexps) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6803 (let ((result nil) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6804 (reverse nil)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6805 (when (eq (car regexps) 'not) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6806 (setq reverse t) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6807 (pop regexps)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6808 (dolist (regexp regexps) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6809 (setq result (or result (looking-at regexp)))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6810 (if reverse |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6811 (not result) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6812 result))) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6813 |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6814 (when (featurep 'xemacs) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6815 (require 'messagexmas) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6816 (message-xmas-redefine)) |
0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
Andreas Schwab <schwab@suse.de>
parents:
54287
diff
changeset
|
6817 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6818 (provide 'message) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6819 |
17493 | 6820 (run-hooks 'message-load-hook) |
6821 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6822 ;; Local Variables: |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6823 ;; coding: iso-8859-1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6824 ;; End: |
17493 | 6825 |
52401 | 6826 ;;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0 |
17493 | 6827 ;;; message.el ends here |