Mercurial > emacs
annotate lisp/gnus/message.el @ 93484:0c5143f2417b
(Commentary): Point to calendar.el.
(calendar-string-to-mayan-long-count, calendar-goto-mayan-long-count-date):
Simplify.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 01 Apr 2008 02:42:05 +0000 |
parents | 06240ef0da8e |
children | 0ffd6dd0f75d |
rev | line source |
---|---|
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1 ;;; message.el --- composing mail and news messages |
64754
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64735
diff
changeset
|
2 |
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64735
diff
changeset
|
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
79708 | 4 ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
17493 | 7 ;; Keywords: mail, news |
8 | |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
78224
24202b793a08
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
77823
diff
changeset
|
13 ;; the Free Software Foundation; either version 3, or (at your option) |
17493 | 14 ;; any later version. |
15 | |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
64085 | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 ;; Boston, MA 02110-1301, USA. | |
17493 | 25 |
26 ;;; Commentary: | |
27 | |
28 ;; This mode provides mail-sending facilities from within Emacs. It | |
29 ;; consists mainly of large chunks of code from the sendmail.el, | |
30 ;; gnus-msg.el and rnewspost.el files. | |
31 | |
32 ;;; Code: | |
33 | |
87191
066a2efbc9c8
(declare-function): Add compatibility declaration.
Glenn Morris <rgm@gnu.org>
parents:
87097
diff
changeset
|
34 (eval-and-compile |
066a2efbc9c8
(declare-function): Add compatibility declaration.
Glenn Morris <rgm@gnu.org>
parents:
87097
diff
changeset
|
35 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
36 (eval-when-compile |
86154 | 37 (require 'cl)) |
87191
066a2efbc9c8
(declare-function): Add compatibility declaration.
Glenn Morris <rgm@gnu.org>
parents:
87097
diff
changeset
|
38 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
39 (require 'hashcash) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
40 (require 'canlock) |
17493 | 41 (require 'mailheader) |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
42 (require 'gmm-utils) |
17493 | 43 (require 'nnheader) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
44 ;; This is apparently necessary even though things are autoloaded. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
45 ;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
46 ;; require mailabbrev here. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
47 (if (featurep 'xemacs) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
48 (require 'mail-abbrevs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
49 (require 'mailabbrev)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
50 (require 'mail-parse) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
51 (require 'mml) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
52 (require 'rfc822) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
53 (require 'ecomplete) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
54 |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
55 (autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/ |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
56 |
86154 | 57 (defvar gnus-message-group-art) |
58 (defvar gnus-list-identifiers) ; gnus-sum is required where necessary | |
59 (defvar rmail-enable-mime-composing) | |
17493 | 60 |
61 (defgroup message '((user-mail-address custom-variable) | |
62 (user-full-name custom-variable)) | |
63 "Mail and news message composing." | |
64 :link '(custom-manual "(message)Top") | |
65 :group 'mail | |
66 :group 'news) | |
67 | |
68 (put 'user-mail-address 'custom-type 'string) | |
69 (put 'user-full-name 'custom-type 'string) | |
70 | |
71 (defgroup message-various nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
72 "Various Message Variables." |
17493 | 73 :link '(custom-manual "(message)Various Message Variables") |
74 :group 'message) | |
75 | |
76 (defgroup message-buffers nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
77 "Message Buffers." |
17493 | 78 :link '(custom-manual "(message)Message Buffers") |
79 :group 'message) | |
80 | |
81 (defgroup message-sending nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
82 "Message Sending." |
17493 | 83 :link '(custom-manual "(message)Sending Variables") |
84 :group 'message) | |
85 | |
86 (defgroup message-interface nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
87 "Message Interface." |
17493 | 88 :link '(custom-manual "(message)Interface") |
89 :group 'message) | |
90 | |
91 (defgroup message-forwarding nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
92 "Message Forwarding." |
17493 | 93 :link '(custom-manual "(message)Forwarding") |
94 :group 'message-interface) | |
95 | |
96 (defgroup message-insertion nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
97 "Message Insertion." |
17493 | 98 :link '(custom-manual "(message)Insertion") |
99 :group 'message) | |
100 | |
101 (defgroup message-headers nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
102 "Message Headers." |
17493 | 103 :link '(custom-manual "(message)Message Headers") |
104 :group 'message) | |
105 | |
106 (defgroup message-news nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
107 "Composing News Messages." |
17493 | 108 :group 'message) |
109 | |
110 (defgroup message-mail nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
111 "Composing Mail Messages." |
17493 | 112 :group 'message) |
113 | |
114 (defgroup message-faces nil | |
115 "Faces used for message composing." | |
116 :group 'message | |
117 :group 'faces) | |
118 | |
119 (defcustom message-directory "~/Mail/" | |
120 "*Directory from which all other mail file variables are derived." | |
121 :group 'message-various | |
122 :type 'directory) | |
123 | |
124 (defcustom message-max-buffers 10 | |
125 "*How many buffers to keep before starting to kill them off." | |
126 :group 'message-buffers | |
127 :type 'integer) | |
128 | |
129 (defcustom message-send-rename-function nil | |
130 "Function called to rename the buffer after sending it." | |
131 :group 'message-buffers | |
35147 | 132 :type '(choice function (const nil))) |
17493 | 133 |
134 (defcustom message-fcc-handler-function 'message-output | |
135 "*A function called to save outgoing articles. | |
136 This function will be called with the name of the file to store the | |
137 article in. The default function is `message-output' which saves in Unix | |
138 mailbox format." | |
139 :type '(radio (function-item message-output) | |
140 (function :tag "Other")) | |
141 :group 'message-sending) | |
142 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
143 (defcustom message-fcc-externalize-attachments nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
144 "If non-nil, attachments are included as external parts in Fcc copies." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
145 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
146 :type 'boolean |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
147 :group 'message-sending) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
148 |
17493 | 149 (defcustom message-courtesy-message |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
150 "The following message is a courtesy copy of an article\nthat has been posted to %s as well.\n\n" |
17493 | 151 "*This is inserted at the start of a mailed copy of a posted message. |
152 If the string contains the format spec \"%s\", the Newsgroups | |
153 the article has been posted to will be inserted there. | |
154 If this variable is nil, no such courtesy message will be added." | |
155 :group 'message-sending | |
58835
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
57856
diff
changeset
|
156 :type '(radio string (const nil))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
157 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
158 (defcustom message-ignored-bounced-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
159 "^\\(Received\\|Return-Path\\|Delivered-To\\):" |
17493 | 160 "*Regexp that matches headers to be removed in resent bounced mail." |
161 :group 'message-interface | |
162 :type 'regexp) | |
163 | |
164 (defcustom message-from-style 'default | |
165 "*Specifies how \"From\" headers look. | |
166 | |
35147 | 167 If nil, they contain just the return address like: |
17493 | 168 king@grassland.com |
169 If `parens', they look like: | |
170 king@grassland.com (Elvis Parsley) | |
171 If `angles', they look like: | |
172 Elvis Parsley <king@grassland.com> | |
173 | |
174 Otherwise, most addresses look like `angles', but they look like | |
175 `parens' if `angles' would need quoting and `parens' would not." | |
176 :type '(choice (const :tag "simple" nil) | |
177 (const parens) | |
178 (const angles) | |
179 (const default)) | |
180 :group 'message-headers) | |
181 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
182 (defcustom message-insert-canlock t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
183 "Whether to insert a Cancel-Lock header in news postings." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
184 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
185 :group 'message-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
186 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
187 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
188 (defcustom message-syntax-checks |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
189 (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
|
190 ;; 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
|
191 "*Controls what syntax checks should not be performed on outgoing posts. |
17493 | 192 To disable checking of long signatures, for instance, add |
193 `(signature . disabled)' to this list. | |
194 | |
195 Don't touch this variable unless you really know what you're doing. | |
196 | |
85809 | 197 Checks include `approved', `bogus-recipient', `continuation-headers', |
198 `control-chars', `empty', `existing-newsgroups', `from', `illegible-text', | |
71379 | 199 `invisible-text', `long-header-lines', `long-lines', `message-id', |
200 `multiple-headers', `new-text', `newsgroups', `quoting-style', | |
71398 | 201 `repeated-newsgroups', `reply-to', `sender', `sendsys', `shoot', |
71379 | 202 `shorten-followup-to', `signature', `size', `subject', `subject-cmsg' |
203 and `valid-newsgroups'." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
204 :group 'message-news |
35147 | 205 :type '(repeat sexp)) ; Fixme: improve this |
17493 | 206 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
207 (defcustom message-required-headers '((optional . References) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
208 From) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
209 "*Headers to be generated or prompted for when sending a message. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
210 Also see `message-required-news-headers' and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
211 `message-required-mail-headers'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
212 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
213 :group 'message-news |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
214 :group 'message-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
215 :link '(custom-manual "(message)Message Headers") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
216 :type '(repeat sexp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
217 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
218 (defcustom message-draft-headers '(References From Date) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
219 "*Headers to be generated when saving a draft message." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
220 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
221 :group 'message-news |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
222 :group 'message-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
223 :link '(custom-manual "(message)Message Headers") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
224 :type '(repeat sexp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
225 |
17493 | 226 (defcustom message-required-news-headers |
227 '(From Newsgroups Subject Date Message-ID | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
228 (optional . Organization) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
229 (optional . User-Agent)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
230 "*Headers to be generated or prompted for when posting an article. |
17493 | 231 RFC977 and RFC1036 require From, Date, Newsgroups, Subject, |
232 Message-ID. Organization, Lines, In-Reply-To, Expires, and | |
76650 | 233 User-Agent are optional. If you don't want message to insert some |
17493 | 234 header, remove it from this list." |
235 :group 'message-news | |
236 :group 'message-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
237 :link '(custom-manual "(message)Message Headers") |
17493 | 238 :type '(repeat sexp)) |
239 | |
240 (defcustom message-required-mail-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
241 '(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
|
242 (optional . User-Agent)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
243 "*Headers to be generated or prompted for when mailing a message. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
244 It is recommended that From, Date, To, Subject and Message-ID be |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
245 included. Organization and User-Agent are optional." |
17493 | 246 :group 'message-mail |
247 :group 'message-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
248 :link '(custom-manual "(message)Message Headers") |
17493 | 249 :type '(repeat sexp)) |
250 | |
251 (defcustom message-deletable-headers '(Message-ID Date Lines) | |
252 "Headers to be deleted if they already exist and were generated by message previously." | |
253 :group 'message-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
254 :link '(custom-manual "(message)Message Headers") |
17493 | 255 :type 'sexp) |
256 | |
257 (defcustom message-ignored-news-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
258 "^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:" |
17493 | 259 "*Regexp of headers to be removed unconditionally before posting." |
260 :group 'message-news | |
261 :group 'message-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
262 :link '(custom-manual "(message)Message Headers") |
57561
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
263 :type '(repeat :value-to-internal (lambda (widget value) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
264 (custom-split-regexp-maybe value)) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
265 :match (lambda (widget value) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
266 (or (stringp value) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
267 (widget-editable-list-match widget value))) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
268 regexp)) |
17493 | 269 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
270 (defcustom message-ignored-mail-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
271 "^[GF]cc:\\|^Resent-Fcc:\\|^Xref:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:" |
17493 | 272 "*Regexp of headers to be removed unconditionally before mailing." |
273 :group 'message-mail | |
274 :group 'message-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
275 :link '(custom-manual "(message)Mail Headers") |
17493 | 276 :type 'regexp) |
277 | |
87097 | 278 (defcustom message-ignored-supersedes-headers "^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|^Received:\\|^X-From-Line:\\|^X-Trace:\\|^X-ID:\\|^X-Complaints-To:\\|Return-Path:\\|^Supersedes:\\|^NNTP-Posting-Date:\\|^X-Trace:\\|^X-Complaints-To:\\|^Cancel-Lock:\\|^Cancel-Key:\\|^X-Hashcash:\\|^X-Payment:\\|^Approved:" |
17493 | 279 "*Header lines matching this regexp will be deleted before posting. |
280 It's best to delete old Path and Date headers before posting to avoid | |
281 any confusion." | |
282 :group 'message-interface | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
283 :link '(custom-manual "(message)Superseding") |
57561
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
284 :type '(repeat :value-to-internal (lambda (widget value) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
285 (custom-split-regexp-maybe value)) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
286 :match (lambda (widget value) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
287 (or (stringp value) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
288 (widget-editable-list-match widget value))) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
289 regexp)) |
17493 | 290 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
291 (defcustom message-subject-re-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
292 "^[ \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
|
293 "*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
|
294 :group 'message-various |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
295 :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
|
296 :type 'regexp) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
297 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
298 ;;; Start of variables adopted from `message-utils.el'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
299 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
300 (defcustom message-subject-trailing-was-query 'ask |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
301 "*What to do with trailing \"(was: <old subject>)\" in subject lines. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
302 If nil, leave the subject unchanged. If it is the symbol `ask', query |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
303 the user what do do. In this case, the subject is matched against |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
304 `message-subject-trailing-was-ask-regexp'. If |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
305 `message-subject-trailing-was-query' is t, always strip the trailing |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
306 old subject. In this case, `message-subject-trailing-was-regexp' is |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
307 used." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
308 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
309 :type '(choice (const :tag "never" nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
310 (const :tag "always strip" t) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
311 (const ask)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
312 :link '(custom-manual "(message)Message Headers") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
313 :group 'message-various) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
314 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
315 (defcustom message-subject-trailing-was-ask-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
316 "[ \t]*\\([[(]+[Ww][Aa][Ss][ \t]*.*[\])]+\\)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
317 "*Regexp matching \"(was: <old subject>)\" in the subject line. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
318 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
319 The function `message-strip-subject-trailing-was' uses this regexp if |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
320 `message-subject-trailing-was-query' is set to the symbol `ask'. If |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
321 the variable is t instead of `ask', use |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
322 `message-subject-trailing-was-regexp' instead. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
323 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
324 It is okay to create some false positives here, as the user is asked." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
325 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
326 :group 'message-various |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
327 :link '(custom-manual "(message)Message Headers") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
328 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
329 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
330 (defcustom message-subject-trailing-was-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
331 "[ \t]*\\((*[Ww][Aa][Ss]:[ \t]*.*)\\)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
332 "*Regexp matching \"(was: <old subject>)\" in the subject line. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
333 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
334 If `message-subject-trailing-was-query' is set to t, the subject is |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
335 matched against `message-subject-trailing-was-regexp' in |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
336 `message-strip-subject-trailing-was'. You should use a regexp creating very |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
337 few false positives here." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
338 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
339 :group 'message-various |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
340 :link '(custom-manual "(message)Message Headers") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
341 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
342 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
343 ;;; marking inserted text |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
344 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
345 (defcustom message-mark-insert-begin |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
346 "--8<---------------cut here---------------start------------->8---\n" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
347 "How to mark the beginning of some inserted text." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
348 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
349 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
350 :link '(custom-manual "(message)Insertion Variables") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
351 :group 'message-various) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
352 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
353 (defcustom message-mark-insert-end |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
354 "--8<---------------cut here---------------end--------------->8---\n" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
355 "How to mark the end of some inserted text." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
356 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
357 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
358 :link '(custom-manual "(message)Insertion Variables") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
359 :group 'message-various) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
360 |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
361 (defcustom message-archive-header "X-No-Archive: Yes\n" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
362 "Header to insert when you don't want your article to be archived. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
363 Archives \(such as groups.google.com\) respect this header." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
364 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
365 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
366 :link '(custom-manual "(message)Header Commands") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
367 :group 'message-various) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
368 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
369 (defcustom message-archive-note |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
370 "X-No-Archive: Yes - save http://groups.google.com/" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
371 "Note to insert why you wouldn't want this posting archived. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
372 If nil, don't insert any text in the body." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
373 :version "22.1" |
58835
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
57856
diff
changeset
|
374 :type '(radio string (const nil)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
375 :link '(custom-manual "(message)Header Commands") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
376 :group 'message-various) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
377 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
378 ;;; Crossposts and Followups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
379 ;; inspired by JoH-followup-to by Jochem Huhman <joh at gmx.de> |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
380 ;; new suggestions by R. Weikusat <rw at another.de> |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
381 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
382 (defvar message-cross-post-old-target nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
383 "Old target for cross-posts or follow-ups.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
384 (make-variable-buffer-local 'message-cross-post-old-target) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
385 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
386 (defcustom message-cross-post-default t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
387 "When non-nil `message-cross-post-followup-to' will perform a crosspost. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
388 If nil, `message-cross-post-followup-to' will only do a followup. Note that |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
389 you can explicitly override this setting by calling |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
390 `message-cross-post-followup-to' with a prefix." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
391 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
392 :type 'boolean |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
393 :group 'message-various) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
394 |
60390
d8ddb2b48062
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-155
Miles Bader <miles@gnu.org>
parents:
60356
diff
changeset
|
395 (defcustom message-cross-post-note "Crosspost & Followup-To: " |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
396 "Note to insert before signature to notify of cross-post and follow-up." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
397 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
398 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
399 :group 'message-various) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
400 |
60390
d8ddb2b48062
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-155
Miles Bader <miles@gnu.org>
parents:
60356
diff
changeset
|
401 (defcustom message-followup-to-note "Followup-To: " |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
402 "Note to insert before signature to notify of follow-up only." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
403 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
404 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
405 :group 'message-various) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
406 |
60390
d8ddb2b48062
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-155
Miles Bader <miles@gnu.org>
parents:
60356
diff
changeset
|
407 (defcustom message-cross-post-note-function 'message-cross-post-insert-note |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
408 "Function to use to insert note about Crosspost or Followup-To. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
409 The function will be called with four arguments. The function should not only |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
410 insert a note, but also ensure old notes are deleted. See the documentation |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
411 for `message-cross-post-insert-note'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
412 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
413 :type 'function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
414 :group 'message-various) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
415 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
416 ;;; End of variables adopted from `message-utils.el'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
417 |
93386 | 418 (defcustom message-signature-separator "^-- $" |
419 "Regexp matching the signature separator. | |
420 This variable is used to strip off the signature from quoted text | |
421 when `message-cite-function' is | |
422 `message-cite-original-without-signature'. Most useful values | |
423 are \"^-- $\" (strict) and \"^-- *$\" (loose; allow missing | |
424 whitespace)." | |
425 :type '(choice (const :tag "strict" "^-- $") | |
426 (const :tag "loose" "^-- *$") | |
427 regexp) | |
428 :version "23.1" ;; No Gnus (changed default) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
429 :link '(custom-manual "(message)Various Message Variables") |
17493 | 430 :group 'message-various) |
431 | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
432 (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
|
433 "*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
|
434 :type 'string |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
435 :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
|
436 :group 'message-various) |
17493 | 437 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
438 (defcustom message-interactive t |
17493 | 439 "Non-nil means when sending a message wait for and display errors. |
440 nil means let mailer mail back a message to report errors." | |
441 :group 'message-sending | |
442 :group 'message-mail | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
443 :link '(custom-manual "(message)Sending Variables") |
17493 | 444 :type 'boolean) |
445 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
446 (defcustom message-generate-new-buffers 'unique |
76650 | 447 "*Say whether to create a new message buffer to compose a message. |
448 Valid values include: | |
449 | |
450 nil | |
451 Generate the buffer name in the Message way (e.g., *mail*, *news*, | |
452 *mail to whom*, *news on group*, etc.) and continue editing in the | |
453 existing buffer of that name. If there is no such buffer, it will | |
454 be newly created. | |
455 | |
456 `unique' or t | |
457 Create the new buffer with the name generated in the Message way. | |
458 | |
459 `unsent' | |
460 Similar to `unique' but the buffer name begins with \"*unsent \". | |
461 | |
462 `standard' | |
463 Similar to nil but the buffer name is simpler like *mail message*. | |
464 | |
465 function | |
466 If this is a function, call that function with three parameters: | |
467 The type, the To address and the group name (any of these may be nil). | |
468 The function should return the new buffer name." | |
17493 | 469 :group 'message-buffers |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
470 :link '(custom-manual "(message)Message Buffers") |
76650 | 471 :type '(choice (const nil) |
472 (sexp :tag "unique" :format "unique\n" :value unique | |
473 :match (lambda (widget value) (memq value '(unique t)))) | |
474 (const unsent) | |
475 (const standard) | |
476 (function :format "\n %{%t%}: %v"))) | |
17493 | 477 |
478 (defcustom message-kill-buffer-on-exit nil | |
479 "*Non-nil means that the message buffer will be killed after sending a message." | |
480 :group 'message-buffers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
481 :link '(custom-manual "(message)Message Buffers") |
17493 | 482 :type 'boolean) |
483 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
484 (defcustom message-kill-buffer-query t |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
485 "*Non-nil means that killing a modified message buffer has to be confirmed. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
486 This is used by `message-kill-buffer'." |
92336
5f827896103e
Change defcustom :version from 23.0 to 23.1.
Glenn Morris <rgm@gnu.org>
parents:
92147
diff
changeset
|
487 :version "23.1" ;; No Gnus |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
488 :group 'message-buffers |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
489 :type 'boolean) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
490 |
86154 | 491 (defvar gnus-local-organization) |
17493 | 492 (defcustom message-user-organization |
493 (or (and (boundp 'gnus-local-organization) | |
494 (stringp gnus-local-organization) | |
495 gnus-local-organization) | |
496 (getenv "ORGANIZATION") | |
497 t) | |
498 "*String to be used as an Organization header. | |
499 If t, use `message-user-organization-file'." | |
500 :group 'message-headers | |
501 :type '(choice string | |
502 (const :tag "consult file" t))) | |
503 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
504 (defcustom message-user-organization-file |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
505 (let (orgfile) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
506 (dolist (f (list "/etc/organization" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
507 "/etc/news/organization" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
508 "/usr/lib/news/organization")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
509 (when (file-readable-p f) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
510 (setq orgfile f))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
511 orgfile) |
17493 | 512 "*Local news organization file." |
513 :type 'file | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
514 :link '(custom-manual "(message)News Headers") |
17493 | 515 :group 'message-headers) |
516 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
517 (defcustom message-make-forward-subject-function |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
518 #'message-forward-subject-name-subject |
35147 | 519 "*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
|
520 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
|
521 successive function. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
522 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
523 The provided functions are: |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
524 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
525 * `message-forward-subject-author-subject' Source of article (author or |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
526 newsgroup), in brackets followed by the subject |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
527 * `message-forward-subject-name-subject' Source of article (name of author |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
528 or newsgroup), in brackets followed by the subject |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
529 * `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
|
530 to it." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
531 :group 'message-forwarding |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
532 :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
|
533 :type '(radio (function-item message-forward-subject-author-subject) |
35147 | 534 (function-item message-forward-subject-fwd) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
535 (function-item message-forward-subject-name-subject) |
35147 | 536 (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
|
537 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
538 (defcustom message-forward-as-mime t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
539 "*Non-nil means forward messages as an inline/rfc822 MIME section. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
540 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
|
541 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
542 :group 'message-forwarding |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
543 :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
|
544 :type 'boolean) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
545 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
546 (defcustom message-forward-show-mml 'best |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
547 "*Non-nil means show forwarded messages as MML (decoded from MIME). |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
548 Otherwise, forwarded messages are unchanged. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
549 Can also be the symbol `best' to indicate that MML should be |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
550 used, except when it is a bad idea to use MML. One example where |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
551 it is a bad idea is when forwarding a signed or encrypted |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
552 message, because converting MIME to MML would invalidate the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
553 digital signature." |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
554 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
555 :group 'message-forwarding |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
556 :type '(choice (const :tag "use MML" t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
557 (const :tag "don't use MML " nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
558 (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
|
559 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
560 (defcustom message-forward-before-signature t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
561 "*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
|
562 :group 'message-forwarding |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
563 :type 'boolean) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
564 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
565 (defcustom message-wash-forwarded-subjects nil |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
566 "*Non-nil means try to remove as much cruft as possible from the subject. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
567 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
|
568 :group 'message-forwarding |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
569 :link '(custom-manual "(message)Forwarding") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
570 :type 'boolean) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
571 |
92754
6984a176570c
(message-ignored-resent-headers): Add "Delivered-To".
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92694
diff
changeset
|
572 (defcustom message-ignored-resent-headers |
6984a176570c
(message-ignored-resent-headers): Add "Delivered-To".
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92694
diff
changeset
|
573 ;; `Delivered-To' needs to be removed because some mailers use it to |
6984a176570c
(message-ignored-resent-headers): Add "Delivered-To".
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92694
diff
changeset
|
574 ;; detect loops, so if you resend a message to an address that ultimately |
6984a176570c
(message-ignored-resent-headers): Add "Delivered-To".
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92694
diff
changeset
|
575 ;; comes back to you (e.g. a mailing-list to which you subscribe, in which |
6984a176570c
(message-ignored-resent-headers): Add "Delivered-To".
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92694
diff
changeset
|
576 ;; case you may be removed from the list on the grounds that mail to you |
6984a176570c
(message-ignored-resent-headers): Add "Delivered-To".
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92694
diff
changeset
|
577 ;; bounced with a "mailing loop" error). |
6984a176570c
(message-ignored-resent-headers): Add "Delivered-To".
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92694
diff
changeset
|
578 "^Return-receipt\\|^X-Gnus\\|^Gnus-Warning:\\|^>?From \\|^Delivered-To:" |
17493 | 579 "*All headers that match this regexp will be deleted when resending a message." |
580 :group 'message-interface | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
581 :link '(custom-manual "(message)Resending") |
57561
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
582 :type '(repeat :value-to-internal (lambda (widget value) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
583 (custom-split-regexp-maybe value)) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
584 :match (lambda (widget value) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
585 (or (stringp value) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
586 (widget-editable-list-match widget value))) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
587 regexp)) |
17493 | 588 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
589 (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
|
590 "*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
|
591 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
592 :group 'message-forwarding |
57561
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
593 :type '(repeat :value-to-internal (lambda (widget value) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
594 (custom-split-regexp-maybe value)) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
595 :match (lambda (widget value) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
596 (or (stringp value) |
505c55fe8dc9
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Miles Bader <miles@gnu.org>
parents:
57489
diff
changeset
|
597 (widget-editable-list-match widget value))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
598 regexp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
599 |
17493 | 600 (defcustom message-ignored-cited-headers "." |
601 "*Delete these headers from the messages you yank." | |
602 :group 'message-insertion | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
603 :link '(custom-manual "(message)Insertion Variables") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
604 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
605 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
606 (defcustom message-cite-prefix-regexp |
87097 | 607 (if (string-match "[[:digit:]]" "1") |
608 ;; Support POSIX? XEmacs 21.5.27 doesn't. | |
609 "\\([ \t]*[_.[:word:]]+>+\\|[ \t]*[]>|}]\\)+" | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
610 ;; ?-, ?_ or ?. MUST NOT be in syntax entry w. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
611 (let (non-word-constituents) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
612 (with-syntax-table text-mode-syntax-table |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
613 (setq non-word-constituents |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
614 (concat |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
615 (if (string-match "\\w" "_") "" "_") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
616 (if (string-match "\\w" ".") "" ".")))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
617 (if (equal non-word-constituents "") |
87097 | 618 "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>|}]\\)+" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
619 (concat "\\([ \t]*\\(\\w\\|[" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
620 non-word-constituents |
87097 | 621 "]\\)+>+\\|[ \t]*[]>|}]\\)+")))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
622 "*Regexp matching the longest possible citation prefix on a line." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
623 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
624 :group 'message-insertion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
625 :link '(custom-manual "(message)Insertion Variables") |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
626 :type 'regexp |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
627 :set (lambda (symbol value) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
628 (prog1 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
629 (custom-set-default symbol value) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
630 (if (boundp 'gnus-message-cite-prefix-regexp) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
631 (setq gnus-message-cite-prefix-regexp |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
632 (concat "^\\(?:" value "\\)")))))) |
17493 | 633 |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
634 (defcustom message-cancel-message "I am canceling my own article.\n" |
17493 | 635 "Message to be inserted in the cancel message." |
636 :group 'message-interface | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
637 :link '(custom-manual "(message)Canceling News") |
17493 | 638 :type 'string) |
639 | |
86257
99cb1a203e08
defvar smtpmail-default-smtp-server.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86256
diff
changeset
|
640 (defvar smtpmail-default-smtp-server) |
99cb1a203e08
defvar smtpmail-default-smtp-server.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86256
diff
changeset
|
641 |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
642 (defun message-send-mail-function () |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
643 "Return suitable value for the variable `message-send-mail-function'." |
86276
b284b075c181
(message-send-mail-function): Require sendmail.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86257
diff
changeset
|
644 (cond ((and (require 'sendmail) |
b284b075c181
(message-send-mail-function): Require sendmail.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86257
diff
changeset
|
645 (boundp 'sendmail-program) |
b284b075c181
(message-send-mail-function): Require sendmail.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86257
diff
changeset
|
646 sendmail-program |
86256
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
647 (executable-find sendmail-program)) |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
648 'message-send-mail-with-sendmail) |
86256
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
649 ((and (locate-library "smtpmail") |
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
650 (require 'smtpmail) |
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
651 smtpmail-default-smtp-server) |
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
652 'message-smtpmail-send-it) |
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
653 ((locate-library "mailclient") |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
654 'message-send-mail-with-mailclient) |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
655 (t |
86256
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
656 (lambda () |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
657 (error "Don't know how to send mail. Please customize `message-send-mail-function'"))))) |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
658 |
17493 | 659 ;; Useful to set in site-init.el |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
660 (defcustom message-send-mail-function (message-send-mail-function) |
17493 | 661 "Function to call to send the current buffer as mail. |
662 The headers should be delimited by a line whose contents match the | |
663 variable `mail-header-separator'. | |
664 | |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
665 Valid values include `message-send-mail-with-sendmail' |
35147 | 666 `message-send-mail-with-mh', `message-send-mail-with-qmail', |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
667 `message-smtpmail-send-it', `smtpmail-send-it', |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
668 `feedmail-send-it' and `message-send-mail-with-mailclient'. The |
92694 | 669 default is system dependent and determined by the function |
670 `message-send-mail-function'. | |
35147 | 671 |
672 See also `send-mail-function'." | |
17493 | 673 :type '(radio (function-item message-send-mail-with-sendmail) |
674 (function-item message-send-mail-with-mh) | |
675 (function-item message-send-mail-with-qmail) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
676 (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
|
677 (function-item smtpmail-send-it) |
35147 | 678 (function-item feedmail-send-it) |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
679 (function-item message-send-mail-with-mailclient |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
680 :tag "Use Mailclient package") |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
681 (function :tag "Other")) |
17493 | 682 :group 'message-sending |
92336
5f827896103e
Change defcustom :version from 23.0 to 23.1.
Glenn Morris <rgm@gnu.org>
parents:
92147
diff
changeset
|
683 :version "23.1" ;; No Gnus |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
684 :initialize 'custom-initialize-default |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
685 :link '(custom-manual "(message)Mail Variables") |
17493 | 686 :group 'message-mail) |
687 | |
688 (defcustom message-send-news-function 'message-send-news | |
689 "Function to call to send the current buffer as news. | |
690 The headers should be delimited by a line whose contents match the | |
691 variable `mail-header-separator'." | |
692 :group 'message-sending | |
693 :group 'message-news | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
694 :link '(custom-manual "(message)News Variables") |
17493 | 695 :type 'function) |
696 | |
697 (defcustom message-reply-to-function nil | |
35147 | 698 "If non-nil, function that should return a list of headers. |
17493 | 699 This function should pick out addresses from the To, Cc, and From headers |
700 and respond with new To and Cc headers." | |
701 :group 'message-interface | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
702 :link '(custom-manual "(message)Reply") |
35147 | 703 :type '(choice function (const nil))) |
17493 | 704 |
705 (defcustom message-wide-reply-to-function nil | |
35147 | 706 "If non-nil, function that should return a list of headers. |
17493 | 707 This function should pick out addresses from the To, Cc, and From headers |
708 and respond with new To and Cc headers." | |
709 :group 'message-interface | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
710 :link '(custom-manual "(message)Wide Reply") |
35147 | 711 :type '(choice function (const nil))) |
17493 | 712 |
713 (defcustom message-followup-to-function nil | |
35147 | 714 "If non-nil, function that should return a list of headers. |
17493 | 715 This function should pick out addresses from the To, Cc, and From headers |
716 and respond with new To and Cc headers." | |
717 :group 'message-interface | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
718 :link '(custom-manual "(message)Followup") |
35147 | 719 :type '(choice function (const nil))) |
17493 | 720 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
721 (defcustom message-extra-wide-headers nil |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
722 "If non-nil, a list of additional address headers. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
723 These are used when composing a wide reply." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
724 :group 'message-sending |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
725 :type '(repeat string)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
726 |
17493 | 727 (defcustom message-use-followup-to 'ask |
728 "*Specifies what to do with Followup-To header. | |
729 If nil, always ignore the header. If it is t, use its value, but | |
730 query before using the \"poster\" value. If it is the symbol `ask', | |
731 always query the user whether to use the value. If it is the symbol | |
732 `use', always use the value." | |
733 :group 'message-interface | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
734 :link '(custom-manual "(message)Followup") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
735 :type '(choice (const :tag "ignore" nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
736 (const :tag "use & query" t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
737 (const use) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
738 (const ask))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
739 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
740 (defcustom message-use-mail-followup-to 'use |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
741 "*Specifies what to do with Mail-Followup-To header. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
742 If nil, always ignore the header. If it is the symbol `ask', always |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
743 query the user whether to use the value. If it is the symbol `use', |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
744 always use the value." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
745 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
746 :group 'message-interface |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
747 :link '(custom-manual "(message)Mailing Lists") |
17493 | 748 :type '(choice (const :tag "ignore" nil) |
749 (const use) | |
750 (const ask))) | |
751 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
752 (defcustom message-subscribed-address-functions nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
753 "*Specifies functions for determining list subscription. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
754 If nil, do not attempt to determine list subscription with functions. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
755 If non-nil, this variable contains a list of functions which return |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
756 regular expressions to match lists. These functions can be used in |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
757 conjunction with `message-subscribed-regexps' and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
758 `message-subscribed-addresses'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
759 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
760 :group 'message-interface |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
761 :link '(custom-manual "(message)Mailing Lists") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
762 :type '(repeat sexp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
763 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
764 (defcustom message-subscribed-address-file nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
765 "*A file containing addresses the user is subscribed to. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
766 If nil, do not look at any files to determine list subscriptions. If |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
767 non-nil, each line of this file should be a mailing list address." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
768 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
769 :group 'message-interface |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
770 :link '(custom-manual "(message)Mailing Lists") |
58835
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
57856
diff
changeset
|
771 :type '(radio file (const nil))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
772 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
773 (defcustom message-subscribed-addresses nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
774 "*Specifies a list of addresses the user is subscribed to. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
775 If nil, do not use any predefined list subscriptions. This list of |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
776 addresses can be used in conjunction with |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
777 `message-subscribed-address-functions' and `message-subscribed-regexps'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
778 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
779 :group 'message-interface |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
780 :link '(custom-manual "(message)Mailing Lists") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
781 :type '(repeat string)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
782 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
783 (defcustom message-subscribed-regexps nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
784 "*Specifies a list of addresses the user is subscribed to. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
785 If nil, do not use any predefined list subscriptions. This list of |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
786 regular expressions can be used in conjunction with |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
787 `message-subscribed-address-functions' and `message-subscribed-addresses'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
788 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
789 :group 'message-interface |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
790 :link '(custom-manual "(message)Mailing Lists") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
791 :type '(repeat regexp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
792 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
793 (defcustom message-allow-no-recipients 'ask |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
794 "Specifies what to do when there are no recipients other than Gcc/Fcc. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
795 If it is the symbol `always', the posting is allowed. If it is the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
796 symbol `never', the posting is not allowed. If it is the symbol |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
797 `ask', you are prompted." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
798 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
799 :group 'message-interface |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
800 :link '(custom-manual "(message)Message Headers") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
801 :type '(choice (const always) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
802 (const never) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
803 (const ask))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
804 |
17493 | 805 (defcustom message-sendmail-f-is-evil nil |
35147 | 806 "*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
|
807 Doing so would be even more evil than leaving it out." |
17493 | 808 :group 'message-sending |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
809 :link '(custom-manual "(message)Mail Variables") |
17493 | 810 :type 'boolean) |
811 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
812 (defcustom message-sendmail-envelope-from nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
813 "*Envelope-from when sending mail with sendmail. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
814 If this is nil, use `user-mail-address'. If it is the symbol |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
815 `header', use the From: header of the message." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
816 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
817 :type '(choice (string :tag "From name") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
818 (const :tag "Use From: header from message" header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
819 (const :tag "Use `user-mail-address'" nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
820 :link '(custom-manual "(message)Mail Variables") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
821 :group 'message-sending) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
822 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
823 (defcustom message-sendmail-extra-arguments nil |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
824 "Additional arguments to `sendmail-program'." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
825 ;; E.g. '("-a" "account") for msmtp |
92336
5f827896103e
Change defcustom :version from 23.0 to 23.1.
Glenn Morris <rgm@gnu.org>
parents:
92147
diff
changeset
|
826 :version "23.1" ;; No Gnus |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
827 :type '(repeat string) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
828 ;; :link '(custom-manual "(message)Mail Variables") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
829 :group 'message-sending) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
830 |
17493 | 831 ;; qmail-related stuff |
832 (defcustom message-qmail-inject-program "/var/qmail/bin/qmail-inject" | |
833 "Location of the qmail-inject program." | |
834 :group 'message-sending | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
835 :link '(custom-manual "(message)Mail Variables") |
17493 | 836 :type 'file) |
837 | |
838 (defcustom message-qmail-inject-args nil | |
839 "Arguments passed to qmail-inject programs. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
840 This should be a list of strings, one string for each argument. It |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
841 may also be a function. |
17493 | 842 |
843 For e.g., if you wish to set the envelope sender address so that bounces | |
844 go to the right place or to deal with listserv's usage of that address, you | |
845 might set this variable to '(\"-f\" \"you@some.where\")." | |
846 :group 'message-sending | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
847 :link '(custom-manual "(message)Mail Variables") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
848 :type '(choice (function) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
849 (repeat string))) |
17493 | 850 |
86154 | 851 (defvar gnus-post-method) |
852 (defvar gnus-select-method) | |
17493 | 853 (defcustom message-post-method |
854 (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
|
855 (listp gnus-post-method) |
17493 | 856 gnus-post-method) |
857 gnus-post-method) | |
858 ((boundp 'gnus-select-method) | |
859 gnus-select-method) | |
860 (t '(nnspool ""))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
861 "*Method used to post news. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
862 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
|
863 variable isn't used." |
17493 | 864 :group 'message-news |
865 :group 'message-sending | |
866 ;; This should be the `gnus-select-method' widget, but that might | |
867 ;; create a dependence to `gnus.el'. | |
868 :type 'sexp) | |
869 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
870 ;; FIXME: This should be a temporary workaround until someone implements a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
871 ;; proper solution. If a crash happens while replying, the auto-save file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
872 ;; will *not* have a `References:' header if `message-generate-headers-first' |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
873 ;; is nil. See: http://article.gmane.org/gmane.emacs.gnus.general/51138 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
874 (defcustom message-generate-headers-first '(references) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
875 "Which headers should be generated before starting to compose a message. |
59756
b53453586872
(message-beginning-of-line): Change the behavior when
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58835
diff
changeset
|
876 If t, generate all required headers. This can also be a list of headers to |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
877 generate. The variables `message-required-news-headers' and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
878 `message-required-mail-headers' specify which headers to generate. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
879 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
880 Note that the variable `message-deletable-headers' specifies headers which |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
881 are to be deleted and then re-generated before sending, so this variable |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
882 will not have a visible effect for those headers." |
17493 | 883 :group 'message-headers |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
884 :link '(custom-manual "(message)Message Headers") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
885 :type '(choice (const :tag "None" nil) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
886 (const :tag "References" '(references)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
887 (const :tag "All" t) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
888 (repeat (sexp :tag "Header")))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
889 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
890 (defcustom message-fill-column 72 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
891 "Column beyond which automatic line-wrapping should happen. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
892 Local value for message buffers. If non-nil, also turn on |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
893 auto-fill in message buffers." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
894 :group 'message-various |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
895 ;; :link '(custom-manual "(message)Message Headers") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
896 :type '(choice (const :tag "Don't turn on auto fill" nil) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
897 (integer))) |
17493 | 898 |
899 (defcustom message-setup-hook nil | |
900 "Normal hook, run each time a new outgoing message is initialized. | |
901 The function `message-setup' runs this hook." | |
902 :group 'message-various | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
903 :link '(custom-manual "(message)Various Message Variables") |
17493 | 904 :type 'hook) |
905 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
906 (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
|
907 "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
|
908 :group 'message-various |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
909 :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
|
910 :type 'hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
911 |
17493 | 912 (defcustom message-signature-setup-hook nil |
913 "Normal hook, run each time a new outgoing message is initialized. | |
914 It is run after the headers have been inserted and before | |
915 the signature is inserted." | |
916 :group 'message-various | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
917 :link '(custom-manual "(message)Various Message Variables") |
17493 | 918 :type 'hook) |
919 | |
920 (defcustom message-mode-hook nil | |
921 "Hook run in message mode buffers." | |
922 :group 'message-various | |
923 :type 'hook) | |
924 | |
925 (defcustom message-header-hook nil | |
926 "Hook run in a message mode buffer narrowed to the headers." | |
927 :group 'message-various | |
928 :type 'hook) | |
929 | |
930 (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
|
931 "Hook called narrowed to the headers when setting up a message buffer." |
17493 | 932 :group 'message-various |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
933 :link '(custom-manual "(message)Various Message Variables") |
17493 | 934 :type 'hook) |
935 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
936 (defcustom message-minibuffer-local-map |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
937 (let ((map (make-sparse-keymap 'message-minibuffer-local-map))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
938 (set-keymap-parent map minibuffer-local-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
939 map) |
57856
df80d19d7a2e
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-660
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
940 "Keymap for `message-read-from-minibuffer'." |
62755
0d1a48b1ca68
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-324
Miles Bader <miles@gnu.org>
parents:
61462
diff
changeset
|
941 :version "22.1" |
0d1a48b1ca68
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-324
Miles Bader <miles@gnu.org>
parents:
61462
diff
changeset
|
942 :group 'message-various) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
943 |
17493 | 944 (defcustom message-citation-line-function 'message-insert-citation-line |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
945 "*Function called to insert the \"Whomever writes:\" line. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
946 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
947 Predefined functions include `message-insert-citation-line' and |
85974 | 948 `message-insert-formatted-citation-line' (see the variable |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
949 `message-citation-line-format'). |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
950 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
951 Note that Gnus provides a feature where the reader can click on |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
952 `writes:' to hide the cited text. If you change this line too much, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
953 people who read your message will have to change their Gnus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
954 configuration. See the variable `gnus-cite-attribution-suffix'." |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
955 :type '(choice |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
956 (function-item :tag "plain" message-insert-citation-line) |
85974 | 957 (function-item :tag "formatted" message-insert-formatted-citation-line) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
958 (function :tag "Other")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
959 :link '(custom-manual "(message)Insertion Variables") |
17493 | 960 :group 'message-insertion) |
961 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
962 (defcustom message-citation-line-format "On %a, %b %d %Y, %N wrote:\n" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
963 "Format of the \"Whomever writes:\" line. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
964 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
965 The string is formatted using `format-spec'. The following |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
966 constructs are replaced: |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
967 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
968 %f The full From, e.g. \"John Doe <john.doe@example.invalid>\". |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
969 %n The mail address, e.g. \"john.doe@example.invalid\". |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
970 %N The real name if present, e.g.: \"John Doe\", else fall |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
971 back to the mail address. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
972 %F The first name if present, e.g.: \"John\". |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
973 %L The last name if present, e.g.: \"Doe\". |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
974 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
975 All other format specifiers are passed to `format-time-string' |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
976 which is called using the date from the article your replying to. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
977 Extracting the first (%F) and last name (%L) is done |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
978 heuristically, so you should always check it yourself. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
979 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
980 Please also read the note in the documentation of |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
981 `message-citation-line-function'." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
982 :type '(choice (const :tag "Plain" "%f writes:") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
983 (const :tag "Include date" "On %a, %b %d %Y, %n wrote:") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
984 string) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
985 :link '(custom-manual "(message)Insertion Variables") |
92336
5f827896103e
Change defcustom :version from 23.0 to 23.1.
Glenn Morris <rgm@gnu.org>
parents:
92147
diff
changeset
|
986 :version "23.1" ;; No Gnus |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
987 :group 'message-insertion) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
988 |
17493 | 989 (defcustom message-yank-prefix "> " |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
990 "*Prefix inserted on the lines of yanked messages. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
991 Fix `message-cite-prefix-regexp' if it is set to an abnormal value. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
992 See also `message-yank-cited-prefix' and `message-yank-empty-prefix'." |
17493 | 993 :type 'string |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
994 :link '(custom-manual "(message)Insertion Variables") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
995 :group 'message-insertion) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
996 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
997 (defcustom message-yank-cited-prefix ">" |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
998 "*Prefix inserted on cited lines of yanked messages. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
999 Fix `message-cite-prefix-regexp' if it is set to an abnormal value. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1000 See also `message-yank-prefix' and `message-yank-empty-prefix'." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1001 :version "22.1" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1002 :type 'string |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1003 :link '(custom-manual "(message)Insertion Variables") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1004 :group 'message-insertion) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1005 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1006 (defcustom message-yank-empty-prefix ">" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1007 "*Prefix inserted on empty lines of yanked messages. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1008 See also `message-yank-prefix' and `message-yank-cited-prefix'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
1009 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1010 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1011 :link '(custom-manual "(message)Insertion Variables") |
17493 | 1012 :group 'message-insertion) |
1013 | |
1014 (defcustom message-indentation-spaces 3 | |
1015 "*Number of spaces to insert at the beginning of each cited line. | |
1016 Used by `message-yank-original' via `message-yank-cite'." | |
1017 :group 'message-insertion | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1018 :link '(custom-manual "(message)Insertion Variables") |
17493 | 1019 :type 'integer) |
1020 | |
93386 | 1021 (defcustom message-cite-function 'message-cite-original-without-signature |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
1022 "*Function for citing an original message. |
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
1023 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
|
1024 `message-cite-original-without-signature'. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1025 Note that these functions use `mail-citation-hook' if that is non-nil." |
17493 | 1026 :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
|
1027 (function-item message-cite-original-without-signature) |
17493 | 1028 (function-item sc-cite-original) |
1029 (function :tag "Other")) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1030 :link '(custom-manual "(message)Insertion Variables") |
93386 | 1031 :version "23.1" ;; No Gnus (changed default) |
17493 | 1032 :group 'message-insertion) |
1033 | |
1034 (defcustom message-indent-citation-function 'message-indent-citation | |
1035 "*Function for modifying a citation just inserted in the mail buffer. | |
1036 This can also be a list of functions. Each function can find the | |
1037 citation between (point) and (mark t). And each function should leave | |
1038 point and mark around the citation text as modified." | |
1039 :type 'function | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1040 :link '(custom-manual "(message)Insertion Variables") |
17493 | 1041 :group 'message-insertion) |
1042 | |
1043 (defcustom message-signature t | |
1044 "*String to be inserted at the end of the message buffer. | |
1045 If t, the `message-signature-file' file will be inserted instead. | |
1046 If a function, the result from the function will be used instead. | |
1047 If a form, the result from the form will be used instead." | |
1048 :type 'sexp | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1049 :link '(custom-manual "(message)Insertion Variables") |
17493 | 1050 :group 'message-insertion) |
1051 | |
1052 (defcustom message-signature-file "~/.signature" | |
36036
dcbe0206da25
(message-signature-file): Fix doc, :type.
Dave Love <fx@gnu.org>
parents:
35957
diff
changeset
|
1053 "*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
|
1054 Ignored if the named file doesn't exist. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1055 If nil, don't insert a signature. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1056 If a path is specified, the value of `message-signature-directory' is ignored, |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1057 even if set." |
36036
dcbe0206da25
(message-signature-file): Fix doc, :type.
Dave Love <fx@gnu.org>
parents:
35957
diff
changeset
|
1058 :type '(choice file (const :tags "None" nil)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1059 :link '(custom-manual "(message)Insertion Variables") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1060 :group 'message-insertion) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1061 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1062 (defcustom message-signature-directory nil |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1063 "*Name of directory containing signature files. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1064 Comes in handy if you have many such files, handled via posting styles for |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1065 instance. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1066 If nil, `message-signature-file' is expected to specify the directory if |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1067 needed." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1068 :type '(choice string (const :tags "None" nil)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1069 :link '(custom-manual "(message)Insertion Variables") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1070 :group 'message-insertion) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1071 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1072 (defcustom message-signature-insert-empty-line t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1073 "*If non-nil, insert an empty line before the signature separator." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
1074 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1075 :type 'boolean |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1076 :link '(custom-manual "(message)Insertion Variables") |
17493 | 1077 :group 'message-insertion) |
1078 | |
1079 (defcustom message-distribution-function nil | |
1080 "*Function called to return a Distribution header." | |
1081 :group 'message-news | |
1082 :group 'message-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1083 :link '(custom-manual "(message)News Headers") |
35147 | 1084 :type '(choice function (const nil))) |
17493 | 1085 |
1086 (defcustom message-expires 14 | |
1087 "Number of days before your article expires." | |
1088 :group 'message-news | |
1089 :group 'message-headers | |
1090 :link '(custom-manual "(message)News Headers") | |
1091 :type 'integer) | |
1092 | |
1093 (defcustom message-user-path nil | |
1094 "If nil, use the NNTP server name in the Path header. | |
1095 If stringp, use this; if non-nil, use no host name (user name only)." | |
1096 :group 'message-news | |
1097 :group 'message-headers | |
1098 :link '(custom-manual "(message)News Headers") | |
1099 :type '(choice (const :tag "nntp" nil) | |
1100 (string :tag "name") | |
1101 (sexp :tag "none" :format "%t" t))) | |
1102 | |
1103 (defvar message-reply-buffer nil) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1104 (defvar message-reply-headers nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1105 "The headers of the current replied article. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1106 It is a vector of the following headers: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1107 \[number subject from date id references chars lines xref extra].") |
17493 | 1108 (defvar message-newsreader nil) |
1109 (defvar message-mailer nil) | |
1110 (defvar message-sent-message-via nil) | |
1111 (defvar message-checksum nil) | |
1112 (defvar message-send-actions nil | |
1113 "A list of actions to be performed upon successful sending of a message.") | |
1114 (defvar message-exit-actions nil | |
1115 "A list of actions to be performed upon exiting after sending a message.") | |
1116 (defvar message-kill-actions nil | |
1117 "A list of actions to be performed before killing a message buffer.") | |
1118 (defvar message-postpone-actions nil | |
1119 "A list of actions to be performed after postponing a message.") | |
1120 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1121 (define-widget 'message-header-lines 'text |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1122 "All header lines must be LFD terminated." |
33982
ff339ba39162
(message-header-lines): Fontify tag.
Miles Bader <miles@gnu.org>
parents:
33768
diff
changeset
|
1123 :format "%{%t%}:%n%v" |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1124 :valid-regexp "^\\'" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1125 :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
|
1126 |
17493 | 1127 (defcustom message-default-headers "" |
1128 "*A string containing header lines to be inserted in outgoing messages. | |
1129 It is inserted before you edit the message, so you can edit or delete | |
1130 these lines." | |
1131 :group 'message-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1132 :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
|
1133 :type 'message-header-lines) |
17493 | 1134 |
1135 (defcustom message-default-mail-headers "" | |
1136 "*A string of header lines to be inserted in outgoing mails." | |
1137 :group 'message-headers | |
1138 :group 'message-mail | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1139 :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
|
1140 :type 'message-header-lines) |
17493 | 1141 |
1142 (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
|
1143 "*A string of header lines to be inserted in outgoing news articles." |
17493 | 1144 :group 'message-headers |
1145 :group 'message-news | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1146 :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
|
1147 :type 'message-header-lines) |
17493 | 1148 |
1149 ;; Note: could use /usr/ucb/mail instead of sendmail; | |
1150 ;; options -t, and -v if not interactive. | |
1151 (defcustom message-mailer-swallows-blank-line | |
1152 (if (and (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)" | |
1153 system-configuration) | |
1154 (file-readable-p "/etc/sendmail.cf") | |
1155 (let ((buffer (get-buffer-create " *temp*"))) | |
1156 (unwind-protect | |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
1157 (with-current-buffer buffer |
17493 | 1158 (insert-file-contents "/etc/sendmail.cf") |
1159 (goto-char (point-min)) | |
1160 (let ((case-fold-search nil)) | |
1161 (re-search-forward "^OR\\>" nil t))) | |
1162 (kill-buffer buffer)))) | |
1163 ;; According to RFC822, "The field-name must be composed of printable | |
1164 ;; ASCII characters (i. e., characters that have decimal values between | |
1165 ;; 33 and 126, except colon)", i. e., any chars except ctl chars, | |
1166 ;; space, or colon. | |
1167 '(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
|
1168 "*Set this non-nil if the system's mailer runs the header and body together. |
17493 | 1169 \(This problem exists on Sunos 4 when sendmail is run in remote mode.) |
1170 The value should be an expression to test whether the problem will | |
1171 actually occur." | |
1172 :group 'message-sending | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1173 :link '(custom-manual "(message)Mail Variables") |
17493 | 1174 :type 'sexp) |
1175 | |
19481
4d492290e085
(message-user-agent): Add autoload cookie.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
1176 ;;;###autoload |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1177 (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
|
1178 '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
|
1179 'message-kill-buffer 'message-send-hook) |
17493 | 1180 |
1181 (defvar message-mh-deletable-headers '(Message-ID Date Lines Sender) | |
1182 "If non-nil, delete the deletable headers before feeding to mh.") | |
1183 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1184 (defvar message-send-method-alist |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1185 '((news message-news-p message-send-via-news) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1186 (mail message-mail-p message-send-via-mail)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1187 "Alist of ways to send outgoing messages. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1188 Each element has the form |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1189 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1190 \(TYPE PREDICATE FUNCTION) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1191 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1192 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
|
1193 called without any parameters to determine whether the message is |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1194 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
|
1195 PREDICATE returns non-nil. FUNCTION is called with one parameter -- |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1196 the prefix.") |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1197 |
34058
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1198 (defcustom message-mail-alias-type 'abbrev |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1199 "*What alias expansion type to use in Message buffers. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1200 The default is `abbrev', which uses mailabbrev. `ecomplete' uses |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1201 an electric completion mode. nil switches mail aliases off. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1202 This can also be a list of values." |
34058
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1203 :group 'message |
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1204 :link '(custom-manual "(message)Mail Aliases") |
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1205 :type '(choice (const :tag "Use Mailabbrev" abbrev) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1206 (const :tag "Use ecomplete" ecomplete) |
34058
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1207 (const :tag "No expansion" nil))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1208 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1209 (defcustom message-self-insert-commands '(self-insert-command) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1210 "List of `self-insert-command's used to trigger ecomplete. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1211 When one of those commands is invoked to enter a character in To or Cc |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1212 header, ecomplete will suggest the candidates of recipients (see also |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1213 `message-mail-alias-type'). If you use some tool to enter non-ASCII |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1214 text and it replaces `self-insert-command' with the other command, e.g. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1215 `egg-self-insert-command', you may want to add it to this list." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1216 :group 'message-various |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1217 :type '(repeat function)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1218 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1219 (defcustom message-auto-save-directory |
34057
98bd49d8cf7d
(message-auto-save-directory): Use
Dave Love <fx@gnu.org>
parents:
33982
diff
changeset
|
1220 (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
|
1221 "*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
|
1222 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
|
1223 :group 'message-buffers |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1224 :link '(custom-manual "(message)Various Message Variables") |
35147 | 1225 :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
|
1226 |
35147 | 1227 (defcustom message-default-charset |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1228 (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
|
1229 "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
|
1230 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
|
1231 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1232 :group 'message |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1233 :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
|
1234 :type 'symbol) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1235 |
35147 | 1236 (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
|
1237 (and (boundp 'rmail-dont-reply-to-names) rmail-dont-reply-to-names) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1238 "*Addresses to prune when doing wide replies. |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
1239 This can be a regexp or a list of regexps. Also, a value of nil means |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1240 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
|
1241 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1242 :group 'message |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1243 :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
|
1244 :type '(choice (const :tag "Yourself" nil) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1245 regexp |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1246 (repeat :tag "Regexp List" regexp))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1247 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1248 (defsubst message-dont-reply-to-names () |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1249 (gmm-regexp-concat 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
|
1250 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1251 (defvar message-shoot-gnksa-feet nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1252 "*A list of GNKSA feet you are allowed to shoot. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1253 Gnus gives you all the opportunity you could possibly want for |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1254 shooting yourself in the foot. Also, Gnus allows you to shoot the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1255 feet of Good Net-Keeping Seal of Approval. The following are foot |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1256 candidates: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1257 `empty-article' Allow you to post an empty article; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1258 `quoted-text-only' Allow you to post quoted text only; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1259 `multiple-copies' Allow you to post multiple copies; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1260 `cancel-messages' Allow you to cancel or supersede messages from |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1261 your other email addresses.") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1262 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1263 (defsubst message-gnksa-enable-p (feature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1264 (or (not (listp message-shoot-gnksa-feet)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1265 (memq feature message-shoot-gnksa-feet))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1266 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1267 (defcustom message-hidden-headers '("^References:" "^Face:" "^X-Face:" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1268 "^X-Draft-From:") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1269 "Regexp of headers to be hidden when composing new messages. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1270 This can also be a list of regexps to match headers. Or a list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1271 starting with `not' and followed by regexps." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
1272 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1273 :group 'message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1274 :link '(custom-manual "(message)Message Headers") |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1275 :type '(choice |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1276 :format "%{%t%}: %[Value Type%] %v" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1277 (regexp :menu-tag "regexp" :format "regexp\n%t: %v") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1278 (repeat :menu-tag "(regexp ...)" :format "(regexp ...)\n%v%i" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1279 (regexp :format "%t: %v")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1280 (cons :menu-tag "(not regexp ...)" :format "(not regexp ...)\n%v" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1281 (const not) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1282 (repeat :format "%v%i" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1283 (regexp :format "%t: %v"))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1284 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1285 (defcustom message-cite-articles-with-x-no-archive t |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1286 "If non-nil, cite text from articles that has X-No-Archive set." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1287 :group 'message |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1288 :type 'boolean) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1289 |
17493 | 1290 ;;; Internal variables. |
1291 ;;; Well, not really internal. | |
1292 | |
1293 (defvar message-mode-syntax-table | |
1294 (let ((table (copy-syntax-table text-mode-syntax-table))) | |
1295 (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
|
1296 (modify-syntax-entry ?> ". " table) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1297 (modify-syntax-entry ?< ". " table) |
17493 | 1298 table) |
1299 "Syntax table used while in Message mode.") | |
1300 | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1301 (defface message-header-to |
17493 | 1302 '((((class color) |
1303 (background dark)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1304 (:foreground "DarkOliveGreen1" :bold t)) |
17493 | 1305 (((class color) |
1306 (background light)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1307 (:foreground "MidnightBlue" :bold t)) |
17493 | 1308 (t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1309 (:bold t :italic t))) |
17493 | 1310 "Face used for displaying From headers." |
1311 :group 'message-faces) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1312 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1313 (put 'message-header-to-face 'face-alias 'message-header-to) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1314 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1315 (defface message-header-cc |
17493 | 1316 '((((class color) |
1317 (background dark)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1318 (:foreground "chartreuse1" :bold t)) |
17493 | 1319 (((class color) |
1320 (background light)) | |
1321 (:foreground "MidnightBlue")) | |
1322 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1323 (:bold t))) |
17493 | 1324 "Face used for displaying Cc headers." |
1325 :group 'message-faces) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1326 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1327 (put 'message-header-cc-face 'face-alias 'message-header-cc) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1328 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1329 (defface message-header-subject |
17493 | 1330 '((((class color) |
1331 (background dark)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1332 (:foreground "OliveDrab1")) |
17493 | 1333 (((class color) |
1334 (background light)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1335 (:foreground "navy blue" :bold t)) |
17493 | 1336 (t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1337 (:bold t))) |
17493 | 1338 "Face used for displaying subject headers." |
1339 :group 'message-faces) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1340 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1341 (put 'message-header-subject-face 'face-alias 'message-header-subject) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1342 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1343 (defface message-header-newsgroups |
17493 | 1344 '((((class color) |
1345 (background dark)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1346 (:foreground "yellow" :bold t :italic t)) |
17493 | 1347 (((class color) |
1348 (background light)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1349 (:foreground "blue4" :bold t :italic t)) |
17493 | 1350 (t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1351 (:bold t :italic t))) |
17493 | 1352 "Face used for displaying newsgroups headers." |
1353 :group 'message-faces) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1354 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1355 (put 'message-header-newsgroups-face 'face-alias 'message-header-newsgroups) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1356 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1357 (defface message-header-other |
17493 | 1358 '((((class color) |
1359 (background dark)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1360 (:foreground "VioletRed1")) |
17493 | 1361 (((class color) |
1362 (background light)) | |
1363 (:foreground "steel blue")) | |
1364 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1365 (:bold t :italic t))) |
17493 | 1366 "Face used for displaying newsgroups headers." |
1367 :group 'message-faces) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1368 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1369 (put 'message-header-other-face 'face-alias 'message-header-other) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1370 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1371 (defface message-header-name |
17493 | 1372 '((((class color) |
1373 (background dark)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1374 (:foreground "green")) |
17493 | 1375 (((class color) |
1376 (background light)) | |
1377 (:foreground "cornflower blue")) | |
1378 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1379 (:bold t))) |
17493 | 1380 "Face used for displaying header names." |
1381 :group 'message-faces) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1382 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1383 (put 'message-header-name-face 'face-alias 'message-header-name) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1384 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1385 (defface message-header-xheader |
17493 | 1386 '((((class color) |
1387 (background dark)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1388 (:foreground "DeepSkyBlue1")) |
17493 | 1389 (((class color) |
1390 (background light)) | |
1391 (:foreground "blue")) | |
1392 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1393 (:bold t))) |
17493 | 1394 "Face used for displaying X-Header headers." |
1395 :group 'message-faces) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1396 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1397 (put 'message-header-xheader-face 'face-alias 'message-header-xheader) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1398 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1399 (defface message-separator |
17493 | 1400 '((((class color) |
1401 (background dark)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1402 (:foreground "LightSkyBlue1")) |
17493 | 1403 (((class color) |
1404 (background light)) | |
1405 (:foreground "brown")) | |
1406 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1407 (:bold t))) |
17493 | 1408 "Face used for displaying the separator." |
1409 :group 'message-faces) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1410 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1411 (put 'message-separator-face 'face-alias 'message-separator) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1412 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1413 (defface message-cited-text |
17493 | 1414 '((((class color) |
1415 (background dark)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1416 (:foreground "LightPink1")) |
17493 | 1417 (((class color) |
1418 (background light)) | |
1419 (:foreground "red")) | |
1420 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1421 (:bold t))) |
17493 | 1422 "Face used for displaying cited text names." |
1423 :group 'message-faces) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1424 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1425 (put 'message-cited-text-face 'face-alias 'message-cited-text) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1426 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1427 (defface message-mml |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1428 '((((class color) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1429 (background dark)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1430 (:foreground "MediumSpringGreen")) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1431 (((class color) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1432 (background light)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1433 (:foreground "ForestGreen")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1434 (t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1435 (:bold t))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1436 "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
|
1437 :group 'message-faces) |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1438 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1439 (put 'message-mml-face 'face-alias 'message-mml) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1440 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1441 (defun message-font-lock-make-header-matcher (regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1442 (let ((form |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1443 `(lambda (limit) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1444 (let ((start (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1445 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1446 (widen) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1447 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1448 (if (re-search-forward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1449 (concat "^" (regexp-quote mail-header-separator) "$") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1450 nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1451 (setq limit (min limit (match-beginning 0)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1452 (goto-char start)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1453 (and (< start limit) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1454 (re-search-forward ,regexp limit t)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1455 (if (featurep 'bytecomp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1456 (byte-compile form) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1457 form))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1458 |
17493 | 1459 (defvar message-font-lock-keywords |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1460 (let ((content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)\n?")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1461 `((,(message-font-lock-make-header-matcher |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1462 (concat "^\\([Tt]o:\\)" content)) |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1463 (1 'message-header-name) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1464 (2 'message-header-to nil t)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1465 (,(message-font-lock-make-header-matcher |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1466 (concat "^\\(^[GBF]?[Cc][Cc]:\\|^[Rr]eply-[Tt]o:\\)" content)) |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1467 (1 'message-header-name) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1468 (2 'message-header-cc nil t)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1469 (,(message-font-lock-make-header-matcher |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1470 (concat "^\\([Ss]ubject:\\)" content)) |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1471 (1 'message-header-name) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1472 (2 'message-header-subject nil t)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1473 (,(message-font-lock-make-header-matcher |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1474 (concat "^\\([Nn]ewsgroups:\\|Followup-[Tt]o:\\)" content)) |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1475 (1 'message-header-name) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1476 (2 'message-header-newsgroups nil t)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1477 (,(message-font-lock-make-header-matcher |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1478 (concat "^\\(X-[A-Za-z0-9-]+:\\|In-Reply-To:\\)" content)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1479 (1 'message-header-name) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1480 (2 'message-header-xheader)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1481 (,(message-font-lock-make-header-matcher |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1482 (concat "^\\([A-Z][^: \n\t]+:\\)" content)) |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1483 (1 'message-header-name) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1484 (2 'message-header-other nil t)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1485 ,@(if (and mail-header-separator |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1486 (not (equal mail-header-separator ""))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1487 `((,(concat "^\\(" (regexp-quote mail-header-separator) "\\)$") |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1488 1 'message-separator)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1489 nil) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1490 ((lambda (limit) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1491 (re-search-forward (concat "^\\(" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1492 message-cite-prefix-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1493 "\\).*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1494 limit t)) |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1495 (0 'message-cited-text)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1496 ("<#/?\\(multipart\\|part\\|external\\|mml\\|secure\\)[^>]*>" |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1497 (0 'message-mml)))) |
17493 | 1498 "Additional expressions to highlight in Message mode.") |
1499 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1500 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1501 ;; 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
|
1502 ;; `font-lock-defaults' buffer-local variable. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1503 (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
|
1504 |
17493 | 1505 (defvar message-face-alist |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1506 '((bold . message-bold-region) |
17493 | 1507 (underline . underline-region) |
1508 (default . (lambda (b e) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1509 (message-unbold-region b e) |
17493 | 1510 (ununderline-region b e)))) |
1511 "Alist of mail and news faces for facemenu. | |
48588 | 1512 The cdr of each entry is a function for applying the face to a region.") |
17493 | 1513 |
1514 (defcustom message-send-hook nil | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1515 "Hook run before sending messages. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1516 This hook is run quite early when sending." |
17493 | 1517 :group 'message-various |
1518 :options '(ispell-message) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1519 :link '(custom-manual "(message)Various Message Variables") |
17493 | 1520 :type 'hook) |
1521 | |
1522 (defcustom message-send-mail-hook nil | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1523 "Hook run before sending mail messages. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1524 This hook is run very late -- just before the message is sent as |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1525 mail." |
17493 | 1526 :group 'message-various |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1527 :link '(custom-manual "(message)Various Message Variables") |
17493 | 1528 :type 'hook) |
1529 | |
1530 (defcustom message-send-news-hook nil | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1531 "Hook run before sending news messages. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1532 This hook is run very late -- just before the message is sent as |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1533 news." |
17493 | 1534 :group 'message-various |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1535 :link '(custom-manual "(message)Various Message Variables") |
17493 | 1536 :type 'hook) |
1537 | |
1538 (defcustom message-sent-hook nil | |
1539 "Hook run after sending messages." | |
1540 :group 'message-various | |
1541 :type 'hook) | |
1542 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1543 (defvar message-send-coding-system 'binary |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1544 "Coding system to encode outgoing mail.") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1545 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1546 (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
|
1547 mm-auto-save-coding-system |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1548 "*Coding system to compose mail. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1549 If you'd like to make it possible to share draft files between XEmacs |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1550 and Emacs, you may use `iso-2022-7bit' for this value at your own risk. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1551 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
|
1552 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1553 (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
|
1554 "The limitation of messages sent as message/partial. |
35147 | 1555 The lower bound of message size in characters, beyond which the message |
1556 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
|
1557 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1558 :group 'message-buffers |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1559 :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
|
1560 :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
|
1561 (integer 1000000))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1562 |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1563 (defcustom message-alternative-emails nil |
68521
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
1564 "*Regexp matching alternative email addresses. |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
1565 The first address in the To, Cc or From headers of the original |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
1566 article matching this variable is used as the From field of |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
1567 outgoing messages. |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
1568 |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
1569 This variable has precedence over posting styles and anything that runs |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
1570 off `message-setup-hook'." |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1571 :group 'message-headers |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1572 :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
|
1573 :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
|
1574 regexp)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1575 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1576 (defcustom message-hierarchical-addresses nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1577 "A list of hierarchical mail address definitions. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1578 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1579 Inside each entry, the first address is the \"top\" address, and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1580 subsequent addresses are subaddresses; this is used to indicate that |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1581 mail sent to the first address will automatically be delivered to the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1582 subaddresses. So if the first address appears in the recipient list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1583 for a message, the subaddresses will be removed (if present) before |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1584 the mail is sent. All addresses in this structure should be |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1585 downcased." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
1586 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1587 :group 'message-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1588 :type '(repeat (repeat string))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1589 |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1590 (defcustom message-mail-user-agent nil |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1591 "Like `mail-user-agent'. |
35147 | 1592 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
|
1593 `mail-user-agent'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
1594 :version "22.1" |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1595 :type '(radio (const :tag "Gnus native" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1596 :format "%t\n" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1597 nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1598 (const :tag "`mail-user-agent'" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1599 :format "%t\n" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1600 t) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1601 (function-item :tag "Default Emacs mail" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1602 :format "%t\n" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1603 sendmail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1604 (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
|
1605 :format "%t\n" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1606 mh-e-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1607 (function :tag "Other")) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1608 :version "21.1" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1609 :group 'message) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1610 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1611 (defcustom message-wide-reply-confirm-recipients nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1612 "Whether to confirm a wide reply to multiple email recipients. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1613 If this variable is nil, don't ask whether to reply to all recipients. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1614 If this variable is non-nil, pose the question \"Reply to all |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1615 recipients?\" before a wide reply to multiple recipients. If the user |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1616 answers yes, reply to all recipients as usual. If the user answers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1617 no, only reply back to the author." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
1618 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1619 :group 'message-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1620 :link '(custom-manual "(message)Wide Reply") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1621 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1622 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1623 (defcustom message-user-fqdn nil |
64780
4def766e2c3f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-515
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1624 "*Domain part of Message-Ids." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
1625 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1626 :group 'message-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1627 :link '(custom-manual "(message)News Headers") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1628 :type '(radio (const :format "%v " nil) |
58835
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
57856
diff
changeset
|
1629 (string :format "FQDN: %v"))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1630 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1631 (defcustom message-use-idna (and (condition-case nil (require 'idna) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1632 (file-error)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1633 (mm-coding-system-p 'utf-8) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1634 (executable-find idna-program) |
65742
8e46fef0174c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-566
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1635 (string= (idna-to-ascii "räksmörgås") |
8e46fef0174c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-566
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1636 "xn--rksmrgs-5wao1o") |
8e46fef0174c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-566
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1637 t) |
8e46fef0174c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-566
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1638 "Whether to encode non-ASCII in domain names into ASCII according to IDNA. |
8e46fef0174c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-566
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1639 GNU Libidn, and in particular the elisp package \"idna.el\" and |
8e46fef0174c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-566
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1640 the external program \"idn\", must be installed for this |
8e46fef0174c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-566
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1641 functionality to work." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
1642 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1643 :group 'message-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1644 :link '(custom-manual "(message)IDNA") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1645 :type '(choice (const :tag "Ask" ask) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1646 (const :tag "Never" nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1647 (const :tag "Always" t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1648 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1649 (defcustom message-generate-hashcash (if (executable-find "hashcash") t) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1650 "*Whether to generate X-Hashcash: headers. |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
1651 If t, always generate hashcash headers. If `opportunistic', |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1652 only generate hashcash headers if it can be done without the user |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1653 waiting (i.e., only asynchronously). |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1654 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1655 You must have the \"hashcash\" binary installed, see `hashcash-path'." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1656 :group 'message-headers |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1657 :link '(custom-manual "(message)Mail Headers") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1658 :type '(choice (const :tag "Always" t) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1659 (const :tag "Never" nil) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1660 (const :tag "Opportunistic" opportunistic))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1661 |
17493 | 1662 ;;; Internal variables. |
1663 | |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1664 (defvar message-sending-message "Sending...") |
17493 | 1665 (defvar message-buffer-list nil) |
1666 (defvar message-this-is-news nil) | |
1667 (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
|
1668 (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
|
1669 (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
|
1670 (defvar message-posting-charset nil) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1671 (defvar message-inserted-headers nil) |
17493 | 1672 |
1673 ;; Byte-compiler warning | |
86154 | 1674 (defvar gnus-active-hashtb) |
1675 (defvar gnus-read-active-file) | |
17493 | 1676 |
1677 ;;; 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
|
1678 ;;; (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
|
1679 ;;; of rmail.el's rmail-unix-mail-delimiter. |
17493 | 1680 (defvar message-unix-mail-delimiter |
1681 (let ((time-zone-regexp | |
1682 (concat "\\([A-Z]?[A-Z]?[A-Z][A-Z]\\( DST\\)?" | |
1683 "\\|[-+]?[0-9][0-9][0-9][0-9]" | |
1684 "\\|" | |
1685 "\\) *"))) | |
1686 (concat | |
1687 "From " | |
1688 | |
19762
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1689 ;; 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
|
1690 ;; 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
|
1691 ;; `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
|
1692 ;; `<@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
|
1693 ;; can be removed, e.g. |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1694 ;; From: joe@y.z (Joe K |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1695 ;; User) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1696 ;; 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
|
1697 ;; From: Joe User |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1698 ;; <joe@y.z> |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1699 ;; 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
|
1700 ;; 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
|
1701 ;; From: "Joe User"{space}{tab} |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1702 ;; <joe@y.z> |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1703 ;; 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
|
1704 ;; 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
|
1705 ;; 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
|
1706 ;; 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
|
1707 ;; obviously bogus, but after that anything goes. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1708 "\\([^\0-\b\n-\r\^?].*\\)?" |
17493 | 1709 |
1710 ;; 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
|
1711 "\\([^\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
|
1712 "\\([^\0-\r \^?]+\\) +" ; month |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1713 "\\([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
|
1714 "\\([0-2][0-9]:[0-5][0-9]\\(:[0-6][0-9]\\)?\\) *" ; time of day |
17493 | 1715 |
1716 ;; Perhaps a time zone, specified by an abbreviation, or by a | |
1717 ;; numeric offset. | |
1718 time-zone-regexp | |
1719 | |
1720 ;; The year. | |
19762
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1721 " \\([0-9][0-9]+\\) *" |
17493 | 1722 |
1723 ;; On some systems the time zone can appear after the year, too. | |
1724 time-zone-regexp | |
1725 | |
1726 ;; Old uucp cruft. | |
1727 "\\(remote from .*\\)?" | |
1728 | |
19762
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1729 "\n")) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1730 "Regexp matching the delimiter of messages in UNIX mail format.") |
17493 | 1731 |
1732 (defvar message-unsent-separator | |
1733 (concat "^ *---+ +Unsent message follows +---+ *$\\|" | |
1734 "^ *---+ +Returned message +---+ *$\\|" | |
1735 "^Start of returned message$\\|" | |
1736 "^ *---+ +Original message +---+ *$\\|" | |
1737 "^ *--+ +begin message +--+ *$\\|" | |
1738 "^ *---+ +Original message follows +---+ *$\\|" | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1739 "^ *---+ +Undelivered message follows +---+ *$\\|" |
92147 | 1740 "^------ This is a copy of the message, including all the headers. ------ *$\\|" |
17493 | 1741 "^|? *---+ +Message text follows: +---+ *|?$") |
1742 "A regexp that matches the separator before the text of a failed message.") | |
1743 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1744 (defvar message-field-fillers |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1745 '((To message-fill-field-address) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1746 (Cc message-fill-field-address) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1747 (From message-fill-field-address)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1748 "Alist of header names/filler functions.") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1749 |
17493 | 1750 (defvar message-header-format-alist |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1751 `((From) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1752 (Newsgroups) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1753 (To) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1754 (Cc) |
17493 | 1755 (Subject) |
1756 (In-Reply-To) | |
1757 (Fcc) | |
1758 (Bcc) | |
1759 (Date) | |
1760 (Organization) | |
1761 (Distribution) | |
1762 (Lines) | |
1763 (Expires) | |
1764 (Message-ID) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1765 (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
|
1766 (User-Agent)) |
17493 | 1767 "Alist used for formatting headers.") |
1768 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1769 (defvar message-options nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1770 "Some saved answers when sending message.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1771 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1772 (defvar message-send-mail-real-function nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1773 "Internal send mail function.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1774 |
74984 | 1775 (defvar message-bogus-system-names "^localhost\\.\\|\\.local$" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1776 "The regexp of bogus system names.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1777 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1778 (defcustom message-valid-fqdn-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1779 (concat "[a-z0-9][-.a-z0-9]+\\." ;; [hostname.subdomain.]domain. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1780 ;; valid TLDs: |
70245
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1781 "\\([a-z][a-z]\\|" ;; two letter country TDLs |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1782 "aero\\|arpa\\|bitnet\\|biz\\|bofh\\|" |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1783 "cat\\|com\\|coop\\|edu\\|gov\\|" |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1784 "info\\|int\\|jobs\\|" |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1785 "mil\\|mobi\\|museum\\|name\\|net\\|" |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1786 "org\\|pro\\|travel\\|uucp\\)") |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1787 ;; http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1788 ;; http://en.wikipedia.org/wiki/GTLD |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1789 ;; `in the process of being approved': .asia .post .tel .sex |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1790 ;; "dead" nato bitnet uucp |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1791 "Regular expression that matches a valid FQDN." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1792 ;; see also: gnus-button-valid-fqdn-regexp |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
1793 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1794 :group 'message-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1795 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1796 |
17493 | 1797 (eval-and-compile |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1798 (autoload 'gnus-alive-p "gnus-util") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1799 (autoload 'gnus-delay-article "gnus-delay") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1800 (autoload 'gnus-extract-address-components "gnus-util") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1801 (autoload 'gnus-find-method-for-group "gnus") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1802 (autoload 'gnus-group-decoded-name "gnus-group") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1803 (autoload 'gnus-group-name-charset "gnus-group") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1804 (autoload 'gnus-group-name-decode "gnus-group") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1805 (autoload 'gnus-groups-from-server "gnus") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1806 (autoload 'gnus-make-local-hook "gnus-util") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1807 (autoload 'gnus-open-server "gnus-int") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1808 (autoload 'gnus-output-to-mail "gnus-util") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1809 (autoload 'gnus-output-to-rmail "gnus-util") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1810 (autoload 'gnus-request-post "gnus-int") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1811 (autoload 'gnus-select-frame-set-input-focus "gnus-util") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1812 (autoload 'gnus-server-string "gnus") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1813 (autoload 'idna-to-ascii "idna") |
17493 | 1814 (autoload 'message-setup-toolbar "messagexmas") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1815 (autoload 'mh-new-draft-name "mh-comp") |
17493 | 1816 (autoload 'mh-send-letter "mh-comp") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1817 (autoload 'nndraft-request-associate-buffer "nndraft") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1818 (autoload 'nndraft-request-expire-articles "nndraft") |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1819 (autoload 'nnvirtual-find-group-art "nnvirtual") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1820 (autoload 'rmail-dont-reply-to "mail-utils") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1821 (autoload 'rmail-msg-is-pruned "rmail") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1822 (autoload 'rmail-msg-restore-non-pruned-header "rmail") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1823 (autoload 'rmail-output "rmailout")) |
17493 | 1824 |
1825 | |
1826 | |
1827 ;;; | |
1828 ;;; Utility functions. | |
1829 ;;; | |
1830 | |
1831 (defmacro message-y-or-n-p (question show &rest text) | |
35147 | 1832 "Ask QUESTION, displaying remaining args in a temporary buffer if SHOW." |
17493 | 1833 `(message-talkative-question 'y-or-n-p ,question ,show ,@text)) |
1834 | |
1835 (defmacro message-delete-line (&optional n) | |
35147 | 1836 "Delete the current line (and the next N lines)." |
17493 | 1837 `(delete-region (progn (beginning-of-line) (point)) |
1838 (progn (forward-line ,(or n 1)) (point)))) | |
1839 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1840 (defun message-mark-active-p () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1841 "Non-nil means the mark and region are currently active in this buffer." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1842 mark-active) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1843 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1844 (defun message-unquote-tokens (elems) |
35147 | 1845 "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
|
1846 (mapcar (lambda (item) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1847 (while (string-match "^\\(.*\\)\"\\(.*\\)$" item) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1848 (setq item (concat (match-string 1 item) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1849 (match-string 2 item)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1850 item) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1851 elems)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1852 |
17493 | 1853 (defun message-tokenize-header (header &optional separator) |
1854 "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
|
1855 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
|
1856 is used by default." |
17493 | 1857 (if (not header) |
1858 nil | |
1859 (let ((regexp (format "[%s]+" (or separator ","))) | |
1860 (first t) | |
57489
f7785a1e8cf8
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-615
Miles Bader <miles@gnu.org>
parents:
57363
diff
changeset
|
1861 beg quoted elems paren) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1862 (with-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1863 (mm-enable-multibyte) |
57489
f7785a1e8cf8
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-615
Miles Bader <miles@gnu.org>
parents:
57363
diff
changeset
|
1864 (setq beg (point-min)) |
17493 | 1865 (insert header) |
1866 (goto-char (point-min)) | |
1867 (while (not (eobp)) | |
1868 (if first | |
1869 (setq first nil) | |
1870 (forward-char 1)) | |
1871 (cond ((and (> (point) beg) | |
1872 (or (eobp) | |
1873 (and (looking-at regexp) | |
1874 (not quoted) | |
1875 (not paren)))) | |
1876 (push (buffer-substring beg (point)) elems) | |
1877 (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
|
1878 ((eq (char-after) ?\") |
17493 | 1879 (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
|
1880 ((and (eq (char-after) ?\() |
17493 | 1881 (not quoted)) |
1882 (setq paren t)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1883 ((and (eq (char-after) ?\)) |
17493 | 1884 (not quoted)) |
1885 (setq paren nil)))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1886 (nreverse elems))))) |
17493 | 1887 |
1888 (defun message-mail-file-mbox-p (file) | |
1889 "Say whether FILE looks like a Unix mbox file." | |
1890 (when (and (file-exists-p file) | |
1891 (file-readable-p file) | |
1892 (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
|
1893 (with-temp-buffer |
17493 | 1894 (nnheader-insert-file-contents file) |
1895 (goto-char (point-min)) | |
1896 (looking-at message-unix-mail-delimiter)))) | |
1897 | |
1898 (defun message-fetch-field (header &optional not-all) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1899 "The same as `mail-fetch-field', only remove all newlines. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1900 The buffer is expected to be narrowed to just the header of the message; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1901 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
|
1902 (let* ((inhibit-point-motion-hooks t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1903 (value (mail-fetch-field header nil (not not-all)))) |
17493 | 1904 (when value |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1905 (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
|
1906 (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
|
1907 value))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1908 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1909 (defun message-field-value (header &optional not-all) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1910 "The same as `message-fetch-field', only narrow to the headers first." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1911 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1912 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1913 (message-narrow-to-headers-or-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1914 (message-fetch-field header not-all)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1915 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1916 (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
|
1917 "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
|
1918 (beginning-of-line) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1919 (while (looking-at "[ \t]") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1920 (forward-line -1)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1921 (narrow-to-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1922 (point) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1923 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1924 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1925 (if (re-search-forward "^[^ \n\t]" nil t) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1926 (point-at-bol) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1927 (point-max)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1928 (goto-char (point-min))) |
17493 | 1929 |
1930 (defun message-add-header (&rest headers) | |
1931 "Add the HEADERS to the message header, skipping those already present." | |
1932 (while headers | |
1933 (let (hclean) | |
1934 (unless (string-match "^\\([^:]+\\):[ \t]*[^ \t]" (car headers)) | |
1935 (error "Invalid header `%s'" (car headers))) | |
1936 (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
|
1937 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1938 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1939 (unless (re-search-forward (concat "^" (regexp-quote hclean) ":") nil t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1940 (goto-char (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1941 (if (string-match "\n$" (car headers)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1942 (insert (car headers)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
1943 (insert (car headers) ?\n))))) |
17493 | 1944 (setq headers (cdr headers)))) |
1945 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1946 (defmacro message-with-reply-buffer (&rest forms) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1947 "Evaluate FORMS in the reply buffer, if it exists." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1948 `(when (and message-reply-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1949 (buffer-name message-reply-buffer)) |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
1950 (with-current-buffer message-reply-buffer |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1951 ,@forms))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1952 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1953 (put 'message-with-reply-buffer 'lisp-indent-function 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1954 (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
|
1955 |
17493 | 1956 (defun message-fetch-reply-field (header) |
35147 | 1957 "Fetch field HEADER from the message we're replying to." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1958 (message-with-reply-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1959 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1960 (mail-narrow-to-head) |
17493 | 1961 (message-fetch-field header)))) |
1962 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1963 (defun message-strip-list-identifiers (subject) |
35147 | 1964 "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
|
1965 (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
|
1966 (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
|
1967 gnus-list-identifiers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1968 (mapconcat 'identity gnus-list-identifiers " *\\|")))) |
35147 | 1969 (if (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1970 " *\\)\\)+\\(Re: +\\)?\\)") subject) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1971 (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
|
1972 (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
|
1973 (match-string 5 subject)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1974 (substring subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1975 (match-end 1))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1976 subject))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1977 |
17493 | 1978 (defun message-strip-subject-re (subject) |
35147 | 1979 "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
|
1980 (if (string-match message-subject-re-regexp subject) |
17493 | 1981 (substring subject (match-end 0)) |
1982 subject)) | |
1983 | |
74021 | 1984 (defcustom message-replacement-char "." |
1985 "Replacement character used instead of unprintable or not decodable chars." | |
1986 :group 'message-various | |
1987 :version "22.1" ;; Gnus 5.10.9 | |
1988 :type '(choice string | |
1989 (const ".") | |
1990 (const "?"))) | |
1991 | |
1992 ;; FIXME: We also should call `message-strip-subject-encoded-words' | |
1993 ;; when forwarding. Probably in `message-make-forward-subject' and | |
1994 ;; `message-forward-make-body'. | |
1995 | |
1996 (defun message-strip-subject-encoded-words (subject) | |
1997 "Fix non-decodable words in SUBJECT." | |
1998 ;; Cf. `gnus-simplify-subject-fully'. | |
1999 (let* ((case-fold-search t) | |
2000 (replacement-chars (format "[%s%s%s]" | |
2001 message-replacement-char | |
2002 message-replacement-char | |
2003 message-replacement-char)) | |
2004 (enc-word-re "=\\?\\([^?]+\\)\\?\\([QB]\\)\\?\\([^?]+\\)\\(\\?=\\)") | |
2005 cs-string | |
2006 (have-marker | |
2007 (with-temp-buffer | |
2008 (insert subject) | |
2009 (goto-char (point-min)) | |
2010 (when (re-search-forward enc-word-re nil t) | |
2011 (setq cs-string (match-string 1))))) | |
2012 cs-coding q-or-b word-beg word-end) | |
2013 (if (or (not have-marker) ;; No encoded word found... | |
2014 ;; ... or double encoding was correct: | |
2015 (and (stringp cs-string) | |
2016 (setq cs-string (downcase cs-string)) | |
2017 (mm-coding-system-p (intern cs-string)) | |
2018 (not (prog1 | |
2019 (y-or-n-p | |
2020 (format "\ | |
2021 Decoded Subject \"%s\" | |
2022 contains a valid encoded word. Decode again? " | |
2023 subject)) | |
2024 (setq cs-coding (intern cs-string)))))) | |
2025 subject | |
2026 (with-temp-buffer | |
2027 (insert subject) | |
2028 (goto-char (point-min)) | |
2029 (while (re-search-forward enc-word-re nil t) | |
2030 (setq cs-string (downcase (match-string 1)) | |
2031 q-or-b (match-string 2) | |
2032 word-beg (match-beginning 0) | |
2033 word-end (match-end 0)) | |
2034 (setq cs-coding | |
2035 (if (mm-coding-system-p (intern cs-string)) | |
2036 (setq cs-coding (intern cs-string)) | |
2037 nil)) | |
2038 ;; No double encoded subject? => bogus charset. | |
2039 (unless cs-coding | |
2040 (setq cs-coding | |
2041 (mm-read-coding-system | |
2042 (format "\ | |
2043 Decoded Subject \"%s\" | |
2044 contains an encoded word. The charset `%s' is unknown or invalid. | |
2045 Hit RET to replace non-decodable characters with \"%s\" or enter replacement | |
2046 charset: " | |
2047 subject cs-string message-replacement-char))) | |
2048 (if cs-coding | |
2049 (replace-match (concat "=?" (symbol-name cs-coding) | |
2050 "?\\2?\\3\\4\\5")) | |
2051 (save-excursion | |
2052 (goto-char word-beg) | |
2053 (re-search-forward "=\\?\\([^?]+\\)\\?\\([QB]\\)\\?" word-end t) | |
2054 (replace-match "") | |
2055 ;; QP or base64 | |
2056 (if (string-match "\\`Q\\'" q-or-b) | |
2057 ;; QP | |
2058 (progn | |
2059 (message "Replacing non-decodable characters with \"%s\"." | |
2060 message-replacement-char) | |
2061 (while (re-search-forward "\\(=[A-F0-9][A-F0-9]\\)+" | |
2062 word-end t) | |
2063 (replace-match message-replacement-char))) | |
2064 ;; base64 | |
2065 (message "Replacing non-decodable characters with \"%s\"." | |
2066 replacement-chars) | |
2067 (re-search-forward "[^?]+" word-end t) | |
2068 (replace-match replacement-chars)) | |
2069 (re-search-forward "\\?=") | |
2070 (replace-match ""))))) | |
2071 (rfc2047-decode-region (point-min) (point-max)) | |
2072 (buffer-string))))) | |
2073 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2074 ;;; Start of functions adopted from `message-utils.el'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2075 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2076 (defun message-strip-subject-trailing-was (subject) |
60390
d8ddb2b48062
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-155
Miles Bader <miles@gnu.org>
parents:
60356
diff
changeset
|
2077 "Remove trailing \"(was: <old subject>)\" from SUBJECT lines. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2078 Leading \"Re: \" is not stripped by this function. Use the function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2079 `message-strip-subject-re' for this." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2080 (let* ((query message-subject-trailing-was-query) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2081 (new) (found)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2082 (setq found |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2083 (string-match |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2084 (if (eq query 'ask) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2085 message-subject-trailing-was-ask-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2086 message-subject-trailing-was-regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2087 subject)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2088 (if found |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2089 (setq new (substring subject 0 (match-beginning 0)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2090 (if (or (not found) (eq query nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2091 subject |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2092 (if (eq query 'ask) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2093 (if (message-y-or-n-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2094 "Strip `(was: <old subject>)' in subject? " t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2095 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2096 "Strip `(was: <old subject>)' in subject " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2097 "and use the new one instead?\n\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2098 "Current subject is: \"" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2099 subject "\"\n\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2100 "New subject would be: \"" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2101 new "\"\n\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2102 "See the variable `message-subject-trailing-was-query' " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2103 "to get rid of this query." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2104 )) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2105 new subject) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2106 new)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2107 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2108 ;;; Suggested by Jonas Steverud @ www.dtek.chalmers.se/~d4jonas/ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2109 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2110 (defun message-change-subject (new-subject) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2111 "Ask for NEW-SUBJECT header, append (was: <Old Subject>)." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2112 ;; <URL:http://www.landfield.com/usefor/drafts/draft-ietf-usefor-useage--1.02.unpaged> |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2113 (interactive |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2114 (list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2115 (read-from-minibuffer "New subject: "))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2116 (cond ((and (not (or (null new-subject) ; new subject not empty |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2117 (zerop (string-width new-subject)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2118 (string-match "^[ \t]*$" new-subject)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2119 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2120 (let ((old-subject |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2121 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2122 (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2123 (message-fetch-field "Subject")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2124 (cond ((not old-subject) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2125 (error "No current subject")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2126 ((not (string-match |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2127 (concat "^[ \t]*" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2128 (regexp-quote new-subject) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2129 " \t]*$") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2130 old-subject)) ; yes, it really is a new subject |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2131 ;; delete eventual Re: prefix |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2132 (setq old-subject |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2133 (message-strip-subject-re old-subject)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2134 (message-goto-subject) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2135 (message-delete-line) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2136 (insert (concat "Subject: " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2137 new-subject |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2138 " (was: " |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
2139 old-subject ")\n"))))))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2140 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2141 (defun message-mark-inserted-region (beg end &optional verbatim) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2142 "Mark some region in the current article with enclosing tags. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2143 See `message-mark-insert-begin' and `message-mark-insert-end'. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2144 If VERBATIM, use slrn style verbatim marks (\"#v+\" and \"#v-\")." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2145 (interactive "r\nP") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2146 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2147 ;; add to the end of the region first, otherwise end would be invalid |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2148 (goto-char end) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2149 (insert (if verbatim "#v-\n" message-mark-insert-end)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2150 (goto-char beg) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2151 (insert (if verbatim "#v+\n" message-mark-insert-begin)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2152 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2153 (defun message-mark-insert-file (file &optional verbatim) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2154 "Insert FILE at point, marking it with enclosing tags. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2155 See `message-mark-insert-begin' and `message-mark-insert-end'. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2156 If VERBATIM, use slrn style verbatim marks (\"#v+\" and \"#v-\")." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2157 (interactive "fFile to insert: \nP") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2158 ;; reverse insertion to get correct result. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2159 (let ((p (point))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2160 (insert (if verbatim "#v-\n" message-mark-insert-end)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2161 (goto-char p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2162 (insert-file-contents file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2163 (goto-char p) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2164 (insert (if verbatim "#v+\n" message-mark-insert-begin)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2165 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2166 (defun message-add-archive-header () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2167 "Insert \"X-No-Archive: Yes\" in the header and a note in the body. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2168 The note can be customized using `message-archive-note'. When called with a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2169 prefix argument, ask for a text to insert. If you don't want the note in the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2170 body, set `message-archive-note' to nil." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2171 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2172 (if current-prefix-arg |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2173 (setq message-archive-note |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2174 (read-from-minibuffer "Reason for No-Archive: " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2175 (cons message-archive-note 0)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2176 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2177 (if (message-goto-signature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2178 (re-search-backward message-signature-separator)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2179 (when message-archive-note |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2180 (insert message-archive-note) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2181 (newline)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2182 (message-add-header message-archive-header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2183 (message-sort-headers))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2184 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2185 (defun message-cross-post-followup-to-header (target-group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2186 "Mangles FollowUp-To and Newsgroups header to point to TARGET-GROUP. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2187 With prefix-argument just set Follow-Up, don't cross-post." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2188 (interactive |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2189 (list ; Completion based on Gnus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2190 (completing-read "Followup To: " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2191 (if (boundp 'gnus-newsrc-alist) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2192 gnus-newsrc-alist) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2193 nil nil '("poster" . 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2194 (if (boundp 'gnus-group-history) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2195 'gnus-group-history)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2196 (message-remove-header "Follow[Uu]p-[Tt]o" t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2197 (message-goto-newsgroups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2198 (beginning-of-line) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2199 ;; if we already did a crosspost before, kill old target |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2200 (if (and message-cross-post-old-target |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2201 (re-search-forward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2202 (regexp-quote (concat "," message-cross-post-old-target)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2203 nil t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2204 (replace-match "")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2205 ;; unless (followup is to poster or user explicitly asked not |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2206 ;; to cross-post, or target-group is already in Newsgroups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2207 ;; add target-group to Newsgroups line. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2208 (cond ((and (or |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2209 ;; def: cross-post, req:no |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2210 (and message-cross-post-default (not current-prefix-arg)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2211 ;; def: no-cross-post, req:yes |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2212 (and (not message-cross-post-default) current-prefix-arg)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2213 (not (string-match "poster" target-group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2214 (not (string-match (regexp-quote target-group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2215 (message-fetch-field "Newsgroups")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2216 (end-of-line) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2217 (insert (concat "," target-group)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2218 (end-of-line) ; ensure Followup: comes after Newsgroups: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2219 ;; unless new followup would be identical to Newsgroups line |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2220 ;; make a new Followup-To line |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2221 (if (not (string-match (concat "^[ \t]*" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2222 target-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2223 "[ \t]*$") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2224 (message-fetch-field "Newsgroups"))) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
2225 (insert (concat "\nFollowup-To: " target-group))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2226 (setq message-cross-post-old-target target-group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2227 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2228 (defun message-cross-post-insert-note (target-group cross-post in-old |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2229 old-groups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2230 "Insert a in message body note about a set Followup or Crosspost. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2231 If there have been previous notes, delete them. TARGET-GROUP specifies the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2232 group to Followup-To. When CROSS-POST is t, insert note about |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2233 crossposting. IN-OLD specifies whether TARGET-GROUP is a member of |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2234 OLD-GROUPS. OLD-GROUPS lists the old-groups the posting would have |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2235 been made to before the user asked for a Crosspost." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2236 ;; start scanning body for previous uses |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2237 (message-goto-signature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2238 (let ((head (re-search-backward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2239 (concat "^" mail-header-separator) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2240 nil t))) ; just search in body |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2241 (message-goto-signature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2242 (while (re-search-backward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2243 (concat "^" (regexp-quote message-cross-post-note) ".*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2244 head t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2245 (message-delete-line)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2246 (message-goto-signature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2247 (while (re-search-backward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2248 (concat "^" (regexp-quote message-followup-to-note) ".*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2249 head t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2250 (message-delete-line)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2251 ;; insert new note |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2252 (if (message-goto-signature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2253 (re-search-backward message-signature-separator)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2254 (if (or in-old |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2255 (not cross-post) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2256 (string-match "^[ \t]*poster[ \t]*$" target-group)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
2257 (insert (concat message-followup-to-note target-group "\n")) |
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
2258 (insert (concat message-cross-post-note target-group "\n"))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2259 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2260 (defun message-cross-post-followup-to (target-group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2261 "Crossposts message and set Followup-To to TARGET-GROUP. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2262 With prefix-argument just set Follow-Up, don't cross-post." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2263 (interactive |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2264 (list ; Completion based on Gnus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2265 (completing-read "Followup To: " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2266 (if (boundp 'gnus-newsrc-alist) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2267 gnus-newsrc-alist) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2268 nil nil '("poster" . 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2269 (if (boundp 'gnus-group-history) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2270 'gnus-group-history)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2271 (cond ((not (or (null target-group) ; new subject not empty |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2272 (zerop (string-width target-group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2273 (string-match "^[ \t]*$" target-group))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2274 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2275 (let* ((old-groups (message-fetch-field "Newsgroups")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2276 (in-old (string-match |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2277 (regexp-quote target-group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2278 (or old-groups "")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2279 ;; check whether target exactly matches old Newsgroups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2280 (cond ((not old-groups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2281 (error "No current newsgroup")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2282 ((or (not in-old) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2283 (not (string-match |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2284 (concat "^[ \t]*" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2285 (regexp-quote target-group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2286 "[ \t]*$") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2287 old-groups))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2288 ;; yes, Newsgroups line must change |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2289 (message-cross-post-followup-to-header target-group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2290 ;; insert note whether we do cross-post or followup-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2291 (funcall message-cross-post-note-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2292 target-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2293 (if (or (and message-cross-post-default |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2294 (not current-prefix-arg)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2295 (and (not message-cross-post-default) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2296 current-prefix-arg)) t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2297 in-old old-groups)))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2298 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2299 ;;; Reduce To: to Cc: or Bcc: header |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2300 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2301 (defun message-reduce-to-to-cc () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2302 "Replace contents of To: header with contents of Cc: or Bcc: header." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2303 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2304 (let ((cc-content |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2305 (save-restriction (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2306 (message-fetch-field "cc"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2307 (bcc nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2308 (if (and (not cc-content) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2309 (setq cc-content |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2310 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2311 (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2312 (message-fetch-field "bcc")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2313 (setq bcc t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2314 (cond (cc-content |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2315 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2316 (message-goto-to) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2317 (message-delete-line) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
2318 (insert (concat "To: " cc-content "\n")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2319 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2320 (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2321 (message-remove-header (if bcc |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2322 "bcc" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2323 "cc")))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2324 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2325 ;;; End of functions adopted from `message-utils.el'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2326 |
17493 | 2327 (defun message-remove-header (header &optional is-regexp first reverse) |
2328 "Remove HEADER in the narrowed buffer. | |
35147 | 2329 If IS-REGEXP, HEADER is a regular expression. |
17493 | 2330 If FIRST, only remove the first instance of the header. |
2331 Return the number of headers removed." | |
2332 (goto-char (point-min)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2333 (let ((regexp (if is-regexp header (concat "^" (regexp-quote header) ":"))) |
17493 | 2334 (number 0) |
2335 (case-fold-search t) | |
2336 last) | |
2337 (while (and (not (eobp)) | |
2338 (not last)) | |
2339 (if (if reverse | |
2340 (not (looking-at regexp)) | |
2341 (looking-at regexp)) | |
2342 (progn | |
2343 (incf number) | |
2344 (when first | |
2345 (setq last t)) | |
2346 (delete-region | |
2347 (point) | |
2348 ;; There might be a continuation header, so we have to search | |
2349 ;; until we find a new non-continuation line. | |
2350 (progn | |
2351 (forward-line 1) | |
2352 (if (re-search-forward "^[^ \t]" nil t) | |
2353 (goto-char (match-beginning 0)) | |
2354 (point-max))))) | |
2355 (forward-line 1) | |
2356 (if (re-search-forward "^[^ \t]" nil t) | |
2357 (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
|
2358 (goto-char (point-max))))) |
17493 | 2359 number)) |
2360 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2361 (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
|
2362 "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
|
2363 (let ((count 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2364 (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
|
2365 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2366 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2367 (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
|
2368 (incf count))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2369 (while (> count 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2370 (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
|
2371 (decf count)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2372 |
17493 | 2373 (defun message-narrow-to-headers () |
2374 "Narrow the buffer to the head of the message." | |
2375 (widen) | |
2376 (narrow-to-region | |
2377 (goto-char (point-min)) | |
2378 (if (re-search-forward | |
2379 (concat "^" (regexp-quote mail-header-separator) "\n") nil t) | |
2380 (match-beginning 0) | |
2381 (point-max))) | |
2382 (goto-char (point-min))) | |
2383 | |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2384 (defun message-narrow-to-head-1 () |
35147 | 2385 "Like `message-narrow-to-head'. Don't widen." |
17493 | 2386 (narrow-to-region |
2387 (goto-char (point-min)) | |
2388 (if (search-forward "\n\n" nil 1) | |
2389 (1- (point)) | |
2390 (point-max))) | |
2391 (goto-char (point-min))) | |
2392 | |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2393 (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
|
2394 "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
|
2395 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
|
2396 (widen) |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2397 (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
|
2398 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2399 (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
|
2400 "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
|
2401 (widen) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2402 (narrow-to-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2403 (goto-char (point-min)) |
77823
923182f9ab47
(message-narrow-to-headers-or-head): Ignore mail-header-separator in
Chong Yidong <cyd@stupidchicken.com>
parents:
77819
diff
changeset
|
2404 (if (re-search-forward (concat "\\(\n\\)\n\\|^\\(" |
923182f9ab47
(message-narrow-to-headers-or-head): Ignore mail-header-separator in
Chong Yidong <cyd@stupidchicken.com>
parents:
77819
diff
changeset
|
2405 (regexp-quote mail-header-separator) |
923182f9ab47
(message-narrow-to-headers-or-head): Ignore mail-header-separator in
Chong Yidong <cyd@stupidchicken.com>
parents:
77819
diff
changeset
|
2406 "\n\\)") |
923182f9ab47
(message-narrow-to-headers-or-head): Ignore mail-header-separator in
Chong Yidong <cyd@stupidchicken.com>
parents:
77819
diff
changeset
|
2407 nil t) |
923182f9ab47
(message-narrow-to-headers-or-head): Ignore mail-header-separator in
Chong Yidong <cyd@stupidchicken.com>
parents:
77819
diff
changeset
|
2408 (or (match-end 1) (match-beginning 2)) |
923182f9ab47
(message-narrow-to-headers-or-head): Ignore mail-header-separator in
Chong Yidong <cyd@stupidchicken.com>
parents:
77819
diff
changeset
|
2409 (point-max))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2410 (goto-char (point-min))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2411 |
17493 | 2412 (defun message-news-p () |
2413 "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
|
2414 (and (not message-this-is-mail) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2415 (or message-this-is-news |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2416 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2417 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2418 (message-narrow-to-headers) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2419 (and (message-fetch-field "newsgroups") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2420 (not (message-fetch-field "posted-to")))))))) |
17493 | 2421 |
2422 (defun message-mail-p () | |
2423 "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
|
2424 (and (not message-this-is-news) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2425 (or message-this-is-mail |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2426 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2427 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2428 (message-narrow-to-headers) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2429 (or (message-fetch-field "to") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2430 (message-fetch-field "cc") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2431 (message-fetch-field "bcc"))))))) |
17493 | 2432 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2433 (defun message-subscribed-p () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2434 "Say whether we need to insert a MFT header." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2435 (or message-subscribed-regexps |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2436 message-subscribed-addresses |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2437 message-subscribed-address-file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2438 message-subscribed-address-functions)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2439 |
17493 | 2440 (defun message-next-header () |
2441 "Go to the beginning of the next header." | |
2442 (beginning-of-line) | |
2443 (or (eobp) (forward-char 1)) | |
2444 (not (if (re-search-forward "^[^ \t]" nil t) | |
2445 (beginning-of-line) | |
2446 (goto-char (point-max))))) | |
2447 | |
2448 (defun message-sort-headers-1 () | |
2449 "Sort the buffer as headers using `message-rank' text props." | |
2450 (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
|
2451 (require 'sort) |
17493 | 2452 (sort-subr |
2453 nil 'message-next-header | |
2454 (lambda () | |
2455 (message-next-header) | |
2456 (unless (bobp) | |
2457 (forward-char -1))) | |
2458 (lambda () | |
2459 (or (get-text-property (point) 'message-rank) | |
2460 10000)))) | |
2461 | |
2462 (defun message-sort-headers () | |
2463 "Sort the headers of the current message according to `message-header-format-alist'." | |
2464 (interactive) | |
2465 (save-excursion | |
2466 (save-restriction | |
2467 (let ((max (1+ (length message-header-format-alist))) | |
2468 rank) | |
2469 (message-narrow-to-headers) | |
2470 (while (re-search-forward "^[^ \n]+:" nil t) | |
2471 (put-text-property | |
2472 (match-beginning 0) (1+ (match-beginning 0)) | |
2473 'message-rank | |
2474 (if (setq rank (length (memq (assq (intern (buffer-substring | |
2475 (match-beginning 0) | |
2476 (1- (match-end 0)))) | |
2477 message-header-format-alist) | |
2478 message-header-format-alist))) | |
2479 (- max rank) | |
2480 (1+ max))))) | |
2481 (message-sort-headers-1)))) | |
2482 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2483 (defun message-kill-address () |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2484 "Kill the address under point." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2485 (interactive) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2486 (let ((start (point))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2487 (message-skip-to-next-address) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2488 (kill-region start (point)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2489 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2490 |
87245
6207f5a83057
(Info-goto-node, format-spec): Autoload.
Glenn Morris <rgm@gnu.org>
parents:
87191
diff
changeset
|
2491 (autoload 'Info-goto-node "info") |
93451
06240ef0da8e
(mml2015-use): Declare for compiler.
Glenn Morris <rgm@gnu.org>
parents:
93394
diff
changeset
|
2492 (defvar mml2015-use) |
87245
6207f5a83057
(Info-goto-node, format-spec): Autoload.
Glenn Morris <rgm@gnu.org>
parents:
87191
diff
changeset
|
2493 |
68230
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
67032
diff
changeset
|
2494 (defun message-info (&optional arg) |
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
67032
diff
changeset
|
2495 "Display the Message manual. |
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
67032
diff
changeset
|
2496 |
93386 | 2497 Prefixed with one \\[universal-argument], display the Emacs MIME |
2498 manual. With two \\[universal-argument]'s, display the EasyPG or | |
2499 PGG manual, depending on the value of `mml2015-use'." | |
68230
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
67032
diff
changeset
|
2500 (interactive "p") |
93451
06240ef0da8e
(mml2015-use): Declare for compiler.
Glenn Morris <rgm@gnu.org>
parents:
93394
diff
changeset
|
2501 ;; Why not `info', which is in loaddefs.el? |
93386 | 2502 (Info-goto-node (format "(%s)Top" |
93451
06240ef0da8e
(mml2015-use): Declare for compiler.
Glenn Morris <rgm@gnu.org>
parents:
93394
diff
changeset
|
2503 (cond ((eq arg 16) |
06240ef0da8e
(mml2015-use): Declare for compiler.
Glenn Morris <rgm@gnu.org>
parents:
93394
diff
changeset
|
2504 (require 'mml2015) |
06240ef0da8e
(mml2015-use): Declare for compiler.
Glenn Morris <rgm@gnu.org>
parents:
93394
diff
changeset
|
2505 mml2015-use) |
93386 | 2506 ((eq arg 4) 'emacs-mime) |
2507 ;; `booleanp' only available in Emacs 22+ | |
2508 ((and (not (memq arg '(nil t))) | |
2509 (symbolp arg)) | |
2510 arg) | |
2511 (t | |
2512 'message))))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2513 |
17493 | 2514 |
2515 | |
2516 ;;; | |
2517 ;;; Message mode | |
2518 ;;; | |
2519 | |
2520 ;;; Set up keymap. | |
2521 | |
2522 (defvar message-mode-map nil) | |
2523 | |
2524 (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
|
2525 (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
|
2526 (set-keymap-parent message-mode-map text-mode-map) |
17493 | 2527 (define-key message-mode-map "\C-c?" 'describe-mode) |
2528 | |
2529 (define-key message-mode-map "\C-c\C-f\C-t" 'message-goto-to) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2530 (define-key message-mode-map "\C-c\C-f\C-o" 'message-goto-from) |
17493 | 2531 (define-key message-mode-map "\C-c\C-f\C-b" 'message-goto-bcc) |
2532 (define-key message-mode-map "\C-c\C-f\C-w" 'message-goto-fcc) | |
2533 (define-key message-mode-map "\C-c\C-f\C-c" 'message-goto-cc) | |
2534 (define-key message-mode-map "\C-c\C-f\C-s" 'message-goto-subject) | |
2535 (define-key message-mode-map "\C-c\C-f\C-r" 'message-goto-reply-to) | |
2536 (define-key message-mode-map "\C-c\C-f\C-n" 'message-goto-newsgroups) | |
2537 (define-key message-mode-map "\C-c\C-f\C-d" 'message-goto-distribution) | |
2538 (define-key message-mode-map "\C-c\C-f\C-f" 'message-goto-followup-to) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2539 (define-key message-mode-map "\C-c\C-f\C-m" 'message-goto-mail-followup-to) |
17493 | 2540 (define-key message-mode-map "\C-c\C-f\C-k" 'message-goto-keywords) |
2541 (define-key message-mode-map "\C-c\C-f\C-u" 'message-goto-summary) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2542 (define-key message-mode-map "\C-c\C-f\C-i" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2543 'message-insert-or-toggle-importance) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2544 (define-key message-mode-map "\C-c\C-f\C-a" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2545 'message-generate-unsubscribed-mail-followup-to) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2546 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2547 ;; modify headers (and insert notes in body) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2548 (define-key message-mode-map "\C-c\C-fs" 'message-change-subject) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2549 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2550 (define-key message-mode-map "\C-c\C-fx" 'message-cross-post-followup-to) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2551 ;; prefix+message-cross-post-followup-to = same w/o cross-post |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2552 (define-key message-mode-map "\C-c\C-ft" 'message-reduce-to-to-cc) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2553 (define-key message-mode-map "\C-c\C-fa" 'message-add-archive-header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2554 ;; mark inserted text |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2555 (define-key message-mode-map "\C-c\M-m" 'message-mark-inserted-region) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2556 (define-key message-mode-map "\C-c\M-f" 'message-mark-insert-file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2557 |
17493 | 2558 (define-key message-mode-map "\C-c\C-b" 'message-goto-body) |
2559 (define-key message-mode-map "\C-c\C-i" 'message-goto-signature) | |
2560 | |
2561 (define-key message-mode-map "\C-c\C-t" 'message-insert-to) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2562 (define-key message-mode-map "\C-c\C-fw" 'message-insert-wide-reply) |
17493 | 2563 (define-key message-mode-map "\C-c\C-n" 'message-insert-newsgroups) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2564 (define-key message-mode-map "\C-c\C-l" 'message-to-list-only) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2565 (define-key message-mode-map "\C-c\C-f\C-e" 'message-insert-expires) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2566 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2567 (define-key message-mode-map "\C-c\C-u" 'message-insert-or-toggle-importance) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2568 (define-key message-mode-map "\C-c\M-n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2569 'message-insert-disposition-notification-to) |
17493 | 2570 |
2571 (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
|
2572 (define-key message-mode-map "\C-c\M-\C-y" 'message-yank-buffer) |
17493 | 2573 (define-key message-mode-map "\C-c\C-q" 'message-fill-yanked-message) |
2574 (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
|
2575 (define-key message-mode-map "\C-c\M-h" 'message-insert-headers) |
17493 | 2576 (define-key message-mode-map "\C-c\C-r" 'message-caesar-buffer-body) |
2577 (define-key message-mode-map "\C-c\C-o" 'message-sort-headers) | |
2578 (define-key message-mode-map "\C-c\M-r" 'message-rename-buffer) | |
2579 | |
2580 (define-key message-mode-map "\C-c\C-c" 'message-send-and-exit) | |
2581 (define-key message-mode-map "\C-c\C-s" 'message-send) | |
2582 (define-key message-mode-map "\C-c\C-k" 'message-kill-buffer) | |
2583 (define-key message-mode-map "\C-c\C-d" 'message-dont-send) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2584 (define-key message-mode-map "\C-c\n" 'gnus-delay-article) |
17493 | 2585 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2586 (define-key message-mode-map "\C-c\M-k" 'message-kill-address) |
17493 | 2587 (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
|
2588 (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
|
2589 (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
|
2590 (define-key message-mode-map "\M-\r" 'message-newline-and-reformat) |
49034
b6e082e00b00
(message-split-line): New function.
Kim F. Storm <storm@cua.dk>
parents:
48588
diff
changeset
|
2591 (define-key message-mode-map [remap split-line] 'message-split-line) |
17493 | 2592 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2593 (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
|
2594 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2595 (define-key message-mode-map "\C-a" 'message-beginning-of-line) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2596 (define-key message-mode-map "\t" 'message-tab) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2597 (define-key message-mode-map "\M-;" 'comment-region) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2598 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2599 (define-key message-mode-map "\M-n" 'message-display-abbrev)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2600 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2601 (easy-menu-define |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2602 message-mode-menu message-mode-map "Message Menu." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2603 `("Message" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2604 ["Yank Original" message-yank-original message-reply-buffer] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2605 ["Fill Yanked Message" message-fill-yanked-message t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2606 ["Insert Signature" message-insert-signature t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2607 ["Caesar (rot13) Message" message-caesar-buffer-body t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2608 ["Caesar (rot13) Region" message-caesar-region (message-mark-active-p)] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2609 ["Elide Region" message-elide-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2610 :active (message-mark-active-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2611 ,@(if (featurep 'xemacs) nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2612 '(:help "Replace text in region with an ellipsis"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2613 ["Delete Outside Region" message-delete-not-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2614 :active (message-mark-active-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2615 ,@(if (featurep 'xemacs) nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2616 '(:help "Delete all quoted text outside region"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2617 ["Kill To Signature" message-kill-to-signature t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2618 ["Newline and Reformat" message-newline-and-reformat t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2619 ["Rename buffer" message-rename-buffer t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2620 ["Spellcheck" ispell-message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2621 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2622 '(:help "Spellcheck this message"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2623 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2624 ["Insert Region Marked" message-mark-inserted-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2625 :active (message-mark-active-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2626 ,@(if (featurep 'xemacs) nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2627 '(:help "Mark region with enclosing tags"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2628 ["Insert File Marked..." message-mark-insert-file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2629 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2630 '(:help "Insert file at point marked with enclosing tags"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2631 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2632 ["Send Message" message-send-and-exit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2633 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2634 '(:help "Send this message"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2635 ["Postpone Message" message-dont-send |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2636 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2637 '(:help "File this draft message and exit"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2638 ["Send at Specific Time..." gnus-delay-article |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2639 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2640 '(:help "Ask, then arrange to send message at that time"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2641 ["Kill Message" message-kill-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2642 ,@(if (featurep 'xemacs) '(t) |
68230
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
67032
diff
changeset
|
2643 '(:help "Delete this message without sending"))] |
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
67032
diff
changeset
|
2644 "----" |
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
67032
diff
changeset
|
2645 ["Message manual" message-info |
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
67032
diff
changeset
|
2646 ,@(if (featurep 'xemacs) '(t) |
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
67032
diff
changeset
|
2647 '(:help "Display the Message manual"))])) |
17493 | 2648 |
2649 (easy-menu-define | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2650 message-mode-field-menu message-mode-map "" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2651 `("Field" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2652 ["To" message-goto-to t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2653 ["From" message-goto-from t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2654 ["Subject" message-goto-subject t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2655 ["Change subject..." message-change-subject t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2656 ["Cc" message-goto-cc t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2657 ["Bcc" message-goto-bcc t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2658 ["Fcc" message-goto-fcc t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2659 ["Reply-To" message-goto-reply-to t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2660 ["Flag As Important" message-insert-importance-high |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2661 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2662 '(:help "Mark this message as important"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2663 ["Flag As Unimportant" message-insert-importance-low |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2664 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2665 '(:help "Mark this message as unimportant"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2666 ["Request Receipt" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2667 message-insert-disposition-notification-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2668 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2669 '(:help "Request a receipt notification"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2670 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2671 ;; (typical) news stuff |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2672 ["Summary" message-goto-summary t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2673 ["Keywords" message-goto-keywords t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2674 ["Newsgroups" message-goto-newsgroups t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2675 ["Fetch Newsgroups" message-insert-newsgroups t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2676 ["Followup-To" message-goto-followup-to t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2677 ;; ["Followup-To (with note in body)" message-cross-post-followup-to t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2678 ["Crosspost / Followup-To..." message-cross-post-followup-to t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2679 ["Distribution" message-goto-distribution t] |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2680 ["Expires" message-insert-expires t ] |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2681 ["X-No-Archive" message-add-archive-header t ] |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2682 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2683 ;; (typical) mailing-lists stuff |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2684 ["Fetch To" message-insert-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2685 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2686 '(:help "Insert a To header that points to the author."))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2687 ["Fetch To and Cc" message-insert-wide-reply |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2688 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2689 '(:help |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2690 "Insert To and Cc headers as if you were doing a wide reply."))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2691 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2692 ["Send to list only" message-to-list-only t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2693 ["Mail-Followup-To" message-goto-mail-followup-to t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2694 ["Unsubscribed list post" message-generate-unsubscribed-mail-followup-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2695 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2696 '(:help "Insert a reasonable `Mail-Followup-To:' header."))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2697 ["Reduce To: to Cc:" message-reduce-to-to-cc t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2698 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2699 ["Sort Headers" message-sort-headers t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2700 ["Encode non-ASCII domain names" message-idna-to-ascii-rhs t] |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2701 ;; We hide `message-hidden-headers' by narrowing the buffer. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2702 ["Show Hidden Headers" widen t] |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2703 ["Goto Body" message-goto-body t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2704 ["Goto Signature" message-goto-signature t])) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2705 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2706 (defvar message-tool-bar-map nil) |
17493 | 2707 |
86154 | 2708 (defvar facemenu-add-face-function) |
2709 (defvar facemenu-remove-face-function) | |
17493 | 2710 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2711 ;;; Forbidden properties |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2712 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2713 ;; We use `after-change-functions' to keep special text properties |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2714 ;; that interfer with the normal function of message mode out of the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2715 ;; buffer. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2716 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2717 (defcustom message-strip-special-text-properties t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2718 "Strip special properties from the message buffer. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2719 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2720 Emacs has a number of special text properties which can break message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2721 composing in various ways. If this option is set, message will strip |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2722 these properties from the message composition buffer. However, some |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2723 packages requires these properties to be present in order to work. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2724 If you use one of these packages, turn this option off, and hope the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2725 message composition doesn't break too bad." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
2726 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2727 :group 'message-various |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2728 :link '(custom-manual "(message)Various Message Variables") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2729 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2730 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2731 (defconst message-forbidden-properties |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2732 ;; No reason this should be clutter up customize. We make it a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2733 ;; property list (rather than a list of property symbols), to be |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2734 ;; directly useful for `remove-text-properties'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2735 '(field nil read-only nil invisible nil intangible nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2736 mouse-face nil modification-hooks nil insert-in-front-hooks nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2737 insert-behind-hooks nil point-entered nil point-left nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2738 ;; Other special properties: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2739 ;; category, face, display: probably doesn't do any harm. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2740 ;; fontified: is used by font-lock. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2741 ;; syntax-table, local-map: I dunno. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2742 ;; We need to add XEmacs names to the list. |
58835
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
57856
diff
changeset
|
2743 "Property list of with properties forbidden in message buffers. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2744 The values of the properties are ignored, only the property names are used.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2745 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2746 (defun message-tamago-not-in-use-p (pos) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2747 "Return t when tamago version 4 is not in use at the cursor position. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2748 Tamago version 4 is a popular input method for writing Japanese text. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2749 It uses the properties `intangible', `invisible', `modification-hooks' |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2750 and `read-only' when translating ascii or kana text to kanji text. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2751 These properties are essential to work, so we should never strip them." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2752 (not (and (boundp 'egg-modefull-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2753 (symbol-value 'egg-modefull-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2754 (or (memq (get-text-property pos 'intangible) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2755 '(its-part-1 its-part-2)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2756 (get-text-property pos 'egg-end) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2757 (get-text-property pos 'egg-lang) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2758 (get-text-property pos 'egg-start))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2759 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2760 (defsubst message-mail-alias-type-p (type) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2761 (if (atom message-mail-alias-type) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2762 (eq message-mail-alias-type type) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2763 (memq type message-mail-alias-type))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2764 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2765 (defun message-strip-forbidden-properties (begin end &optional old-length) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2766 "Strip forbidden properties between BEGIN and END, ignoring the third arg. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2767 This function is intended to be called from `after-change-functions'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2768 See also `message-forbidden-properties'." |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2769 (when (and (message-mail-alias-type-p 'ecomplete) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2770 (memq this-command message-self-insert-commands)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2771 (message-display-abbrev)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2772 (when (and message-strip-special-text-properties |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2773 (message-tamago-not-in-use-p begin)) |
58835
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
57856
diff
changeset
|
2774 (let ((buffer-read-only nil) |
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
57856
diff
changeset
|
2775 (inhibit-read-only t)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2776 (remove-text-properties begin end message-forbidden-properties)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2777 |
17493 | 2778 ;;;###autoload |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2779 (define-derived-mode message-mode text-mode "Message" |
17493 | 2780 "Major mode for editing mail and news to be sent. |
35147 | 2781 Like Text Mode but with these additional commands:\\<message-mode-map> |
2782 C-c C-s `message-send' (send the message) C-c C-c `message-send-and-exit' | |
2783 C-c C-d Postpone sending the message C-c C-k Kill the message | |
17493 | 2784 C-c C-f move to a header field (and create it if there isn't): |
2785 C-c C-f C-t move to To C-c C-f C-s move to Subject | |
2786 C-c C-f C-c move to Cc C-c C-f C-b move to Bcc | |
2787 C-c C-f C-w move to Fcc C-c C-f C-r move to Reply-To | |
2788 C-c C-f C-u move to Summary C-c C-f C-n move to Newsgroups | |
2789 C-c C-f C-k move to Keywords C-c C-f C-d move to Distribution | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2790 C-c C-f C-o move to From (\"Originator\") |
17493 | 2791 C-c C-f C-f move to Followup-To |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2792 C-c C-f C-m move to Mail-Followup-To |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2793 C-c C-f C-e move to Expires |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2794 C-c C-f C-i cycle through Importance values |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2795 C-c C-f s change subject and append \"(was: <Old Subject>)\" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2796 C-c C-f x crossposting with FollowUp-To header and note in body |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2797 C-c C-f t replace To: header with contents of Cc: or Bcc: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2798 C-c C-f a Insert X-No-Archive: header and a note in the body |
35147 | 2799 C-c C-t `message-insert-to' (add a To header to a news followup) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2800 C-c C-l `message-to-list-only' (removes all but list address in to/cc) |
35147 | 2801 C-c C-n `message-insert-newsgroups' (add a Newsgroup header to a news reply) |
2802 C-c C-b `message-goto-body' (move to beginning of message text). | |
2803 C-c C-i `message-goto-signature' (move to the beginning of the signature). | |
2804 C-c C-w `message-insert-signature' (insert `message-signature-file' file). | |
2805 C-c C-y `message-yank-original' (insert current message, if any). | |
2806 C-c C-q `message-fill-yanked-message' (fill what was yanked). | |
2807 C-c C-e `message-elide-region' (elide the text between point and mark). | |
2808 C-c C-v `message-delete-not-region' (remove the text outside the region). | |
2809 C-c C-z `message-kill-to-signature' (kill the text up to the signature). | |
2810 C-c C-r `message-caesar-buffer-body' (rot13 the message body). | |
2811 C-c C-a `mml-attach-file' (attach a file as MIME). | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2812 C-c C-u `message-insert-or-toggle-importance' (insert or cycle importance). |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2813 C-c M-n `message-insert-disposition-notification-to' (request receipt). |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2814 C-c M-m `message-mark-inserted-region' (mark region with enclosing tags). |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2815 C-c M-f `message-mark-insert-file' (insert file marked with enclosing tags). |
35147 | 2816 M-RET `message-newline-and-reformat' (break the line and reformat)." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2817 (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
|
2818 (set (make-local-variable 'message-reply-buffer) nil) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2819 (set (make-local-variable 'message-inserted-headers) nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2820 (set (make-local-variable 'message-send-actions) nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2821 (set (make-local-variable 'message-exit-actions) nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2822 (set (make-local-variable 'message-kill-actions) nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2823 (set (make-local-variable 'message-postpone-actions) nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2824 (set (make-local-variable 'message-draft-article) nil) |
17493 | 2825 (setq buffer-offer-save t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2826 (set (make-local-variable 'facemenu-add-face-function) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2827 (lambda (face end) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2828 (let ((face-fun (cdr (assq face message-face-alist)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2829 (if face-fun |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2830 (funcall face-fun (point) end) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2831 (error "Face %s not configured for %s mode" face mode-name))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2832 "")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2833 (set (make-local-variable 'facemenu-remove-face-function) t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2834 (set (make-local-variable 'message-reply-headers) nil) |
17493 | 2835 (make-local-variable 'message-newsreader) |
2836 (make-local-variable 'message-mailer) | |
2837 (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
|
2838 (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
|
2839 (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
|
2840 (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
|
2841 (message-setup-fill-variables) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2842 (when message-fill-column |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2843 (setq fill-column message-fill-column) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2844 (turn-on-auto-fill)) |
34766 | 2845 ;; Allow using comment commands to add/remove quoting. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2846 ;; (set (make-local-variable 'comment-start) message-yank-prefix) |
54287
5284e720208b
(message-mode): Fix last change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54277
diff
changeset
|
2847 (when message-yank-prefix |
5284e720208b
(message-mode): Fix last change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54277
diff
changeset
|
2848 (set (make-local-variable 'comment-start) message-yank-prefix) |
5284e720208b
(message-mode): Fix last change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54277
diff
changeset
|
2849 (set (make-local-variable 'comment-start-skip) |
5284e720208b
(message-mode): Fix last change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54277
diff
changeset
|
2850 (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
|
2851 (if (featurep 'xemacs) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2852 (message-setup-toolbar) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2853 (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
|
2854 '(message-font-lock-keywords t)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2855 (if (boundp 'tool-bar-map) |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
2856 (set (make-local-variable 'tool-bar-map) (message-make-tool-bar)))) |
17493 | 2857 (easy-menu-add message-mode-menu message-mode-map) |
2858 (easy-menu-add message-mode-field-menu message-mode-map) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2859 (gnus-make-local-hook 'after-change-functions) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2860 ;; Mmmm... Forbidden properties... |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2861 (add-hook 'after-change-functions 'message-strip-forbidden-properties |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2862 nil 'local) |
17493 | 2863 ;; Allow mail alias things. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2864 (cond |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2865 ((message-mail-alias-type-p 'abbrev) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
2866 (if (fboundp 'mail-abbrevs-setup) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
2867 (mail-abbrevs-setup) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2868 (if (fboundp 'mail-aliases-setup) ; warning avoidance |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2869 (mail-aliases-setup)))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2870 ((message-mail-alias-type-p 'ecomplete) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2871 (ecomplete-setup))) |
44075
7782e54757bb
* mail-source.el (make-source-make-complex-temp-name): Use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
43075
diff
changeset
|
2872 (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
|
2873 (message-set-auto-save-file-name)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2874 (unless (buffer-base-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2875 ;; Don't enable multibyte on an indirect buffer. Maybe enabling |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2876 ;; multibyte is not necessary at all. -- zsh |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2877 (mm-enable-multibyte)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2878 (set (make-local-variable 'indent-tabs-mode) nil) ;No tabs for indentation. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2879 (mml-mode)) |
17493 | 2880 |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2881 (defun message-setup-fill-variables () |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2882 "Setup message fill variables." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2883 (set (make-local-variable 'fill-paragraph-function) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2884 'message-fill-paragraph) |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2885 (make-local-variable 'paragraph-separate) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2886 (make-local-variable 'paragraph-start) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2887 (make-local-variable 'adaptive-fill-regexp) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2888 (unless (boundp 'adaptive-fill-first-line-regexp) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2889 (setq adaptive-fill-first-line-regexp nil)) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2890 (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
|
2891 (let ((quote-prefix-regexp |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2892 ;; User should change message-cite-prefix-regexp if |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2893 ;; message-yank-prefix is set to an abnormal value. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2894 (concat "\\(" message-cite-prefix-regexp "\\)[ \t]*"))) |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2895 (setq paragraph-start |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2896 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2897 (regexp-quote mail-header-separator) "$\\|" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2898 "[ \t]*$\\|" ; blank lines |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2899 "-- $\\|" ; signature delimiter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2900 "---+$\\|" ; delimiters for forwarded messages |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2901 page-delimiter "$\\|" ; spoiler warnings |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2902 ".*wrote:$\\|" ; attribution lines |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2903 quote-prefix-regexp "$\\|" ; empty lines in quoted text |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2904 ; mml tags |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2905 "<#!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\)")) |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2906 (setq paragraph-separate paragraph-start) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2907 (setq adaptive-fill-regexp |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2908 (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
|
2909 (setq adaptive-fill-first-line-regexp |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2910 (concat quote-prefix-regexp "\\|" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2911 adaptive-fill-first-line-regexp))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2912 (make-local-variable 'auto-fill-inhibit-regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2913 ;;(setq auto-fill-inhibit-regexp "^[A-Z][^: \n\t]+:") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2914 (setq auto-fill-inhibit-regexp nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2915 (make-local-variable 'normal-auto-fill-function) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2916 (setq normal-auto-fill-function 'message-do-auto-fill) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2917 ;; KLUDGE: auto fill might already be turned on in `text-mode-hook'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2918 ;; In that case, ensure that it uses the right function. The real |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2919 ;; solution would be not to use `define-derived-mode', and run |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2920 ;; `text-mode-hook' ourself at the end of the mode. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2921 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> Date: 2001-10-19. |
85766
68503cda7180
(message-check-news-body-syntax): Avoid mm-string-as-multibyte.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
85712
diff
changeset
|
2922 ;; This kludge is unneeded in Emacs>=21 since define-derived-mode is |
68503cda7180
(message-check-news-body-syntax): Avoid mm-string-as-multibyte.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
85712
diff
changeset
|
2923 ;; now careful to run parent hooks after the body. --Stef |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2924 (when auto-fill-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2925 (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
|
2926 |
17493 | 2927 |
2928 | |
2929 ;;; | |
2930 ;;; Message mode commands | |
2931 ;;; | |
2932 | |
2933 ;;; Movement commands | |
2934 | |
2935 (defun message-goto-to () | |
2936 "Move point to the To header." | |
2937 (interactive) | |
2938 (message-position-on-field "To")) | |
2939 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2940 (defun message-goto-from () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2941 "Move point to the From header." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2942 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2943 (message-position-on-field "From")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2944 |
17493 | 2945 (defun message-goto-subject () |
2946 "Move point to the Subject header." | |
2947 (interactive) | |
2948 (message-position-on-field "Subject")) | |
2949 | |
2950 (defun message-goto-cc () | |
2951 "Move point to the Cc header." | |
2952 (interactive) | |
2953 (message-position-on-field "Cc" "To")) | |
2954 | |
2955 (defun message-goto-bcc () | |
2956 "Move point to the Bcc header." | |
2957 (interactive) | |
2958 (message-position-on-field "Bcc" "Cc" "To")) | |
2959 | |
2960 (defun message-goto-fcc () | |
2961 "Move point to the Fcc header." | |
2962 (interactive) | |
2963 (message-position-on-field "Fcc" "To" "Newsgroups")) | |
2964 | |
2965 (defun message-goto-reply-to () | |
2966 "Move point to the Reply-To header." | |
2967 (interactive) | |
2968 (message-position-on-field "Reply-To" "Subject")) | |
2969 | |
2970 (defun message-goto-newsgroups () | |
2971 "Move point to the Newsgroups header." | |
2972 (interactive) | |
2973 (message-position-on-field "Newsgroups")) | |
2974 | |
2975 (defun message-goto-distribution () | |
2976 "Move point to the Distribution header." | |
2977 (interactive) | |
2978 (message-position-on-field "Distribution")) | |
2979 | |
2980 (defun message-goto-followup-to () | |
2981 "Move point to the Followup-To header." | |
2982 (interactive) | |
2983 (message-position-on-field "Followup-To" "Newsgroups")) | |
2984 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2985 (defun message-goto-mail-followup-to () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2986 "Move point to the Mail-Followup-To header." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2987 (interactive) |
57581
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57561
diff
changeset
|
2988 (message-position-on-field "Mail-Followup-To" "To")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2989 |
17493 | 2990 (defun message-goto-keywords () |
2991 "Move point to the Keywords header." | |
2992 (interactive) | |
2993 (message-position-on-field "Keywords" "Subject")) | |
2994 | |
2995 (defun message-goto-summary () | |
2996 "Move point to the Summary header." | |
2997 (interactive) | |
2998 (message-position-on-field "Summary" "Subject")) | |
2999 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3000 (defun message-goto-body (&optional interactivep) |
17493 | 3001 "Move point to the beginning of the message body." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3002 (interactive (list t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3003 (when (and interactivep |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3004 (looking-at "[ \t]*\n")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3005 (expand-abbrev)) |
17493 | 3006 (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
|
3007 (or (search-forward (concat "\n" mail-header-separator "\n") nil t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3008 (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t))) |
17493 | 3009 |
70245
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
3010 (defun message-in-body-p () |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
3011 "Return t if point is in the message body." |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
3012 (let ((body (save-excursion (message-goto-body) (point)))) |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
3013 (>= (point) body))) |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
3014 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3015 (defun message-goto-eoh () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3016 "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
|
3017 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3018 (message-goto-body) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3019 (forward-line -1)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3020 |
17493 | 3021 (defun message-goto-signature () |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3022 "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
|
3023 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
|
3024 return nil." |
17493 | 3025 (interactive) |
3026 (goto-char (point-min)) | |
3027 (if (re-search-forward message-signature-separator nil t) | |
3028 (forward-line 1) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3029 (goto-char (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3030 nil)) |
17493 | 3031 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3032 (defun message-generate-unsubscribed-mail-followup-to (&optional include-cc) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3033 "Insert a reasonable MFT header in a post to an unsubscribed list. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3034 When making original posts to a mailing list you are not subscribed to, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3035 you have to type in a MFT header by hand. The contents, usually, are |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3036 the addresses of the list and your own address. This function inserts |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3037 such a header automatically. It fetches the contents of the To: header |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3038 in the current mail buffer, and appends the current `user-mail-address'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3039 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3040 If the optional argument INCLUDE-CC is non-nil, the addresses in the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3041 Cc: header are also put into the MFT." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3042 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3043 (interactive "P") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3044 (let* (cc tos) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3045 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3046 (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3047 (message-remove-header "Mail-Followup-To") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3048 (setq cc (and include-cc (message-fetch-field "Cc"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3049 (setq tos (if cc |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3050 (concat (message-fetch-field "To") "," cc) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3051 (message-fetch-field "To")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3052 (message-goto-mail-followup-to) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3053 (insert (concat tos ", " user-mail-address)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3054 |
17493 | 3055 |
3056 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3057 (defun message-insert-to (&optional force) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3058 "Insert a To header that points to the author of the article being replied to. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3059 If the original author requested not to be sent mail, don't insert unless the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3060 prefix FORCE is given." |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3061 (interactive "P") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3062 (let* ((mct (message-fetch-reply-field "mail-copies-to")) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3063 (dont (and mct (or (equal (downcase mct) "never") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3064 (equal (downcase mct) "nobody")))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3065 (to (or (message-fetch-reply-field "mail-reply-to") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3066 (message-fetch-reply-field "reply-to") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3067 (message-fetch-reply-field "from")))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3068 (when (and dont to) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3069 (message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3070 (if force |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3071 "Ignoring the user request not to have copies sent via mail" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3072 "Complying with the user request not to have copies sent via mail"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3073 (when (and force (not to)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3074 (error "No mail address in the article")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3075 (when (and to (or force (not dont))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3076 (message-carefully-insert-headers (list (cons 'To to)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3077 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3078 (defun message-insert-wide-reply () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3079 "Insert To and Cc headers as if you were doing a wide reply." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3080 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3081 (let ((headers (message-with-reply-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3082 (message-get-reply-headers t)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3083 (message-carefully-insert-headers headers))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3084 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3085 (defcustom message-header-synonyms |
69944
a87e26272828
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-210
Miles Bader <miles@gnu.org>
parents:
69572
diff
changeset
|
3086 '((To Cc Bcc) |
a87e26272828
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-210
Miles Bader <miles@gnu.org>
parents:
69572
diff
changeset
|
3087 (Original-To)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3088 "List of lists of header synonyms. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3089 E.g., if this list contains a member list with elements `Cc' and `To', |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3090 then `message-carefully-insert-headers' will not insert a `To' header |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3091 when the message is already `Cc'ed to the recipient." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
3092 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3093 :group 'message-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3094 :link '(custom-manual "(message)Message Headers") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3095 :type '(repeat sexp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3096 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3097 (defun message-carefully-insert-headers (headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3098 "Insert the HEADERS, an alist, into the message buffer. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3099 Does not insert the headers when they are already present there |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3100 or in the synonym headers, defined by `message-header-synonyms'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3101 ;; FIXME: Should compare only the address and not the full name. Comparison |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3102 ;; should be done case-folded (and with `string=' rather than |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3103 ;; `string-match'). |
57581
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57561
diff
changeset
|
3104 ;; (mail-strip-quoted-names "Foo Bar <foo@bar>, bla@fasel (Bla Fasel)") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3105 (dolist (header headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3106 (let* ((header-name (symbol-name (car header))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3107 (new-header (cdr header)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3108 (synonyms (loop for synonym in message-header-synonyms |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3109 when (memq (car header) synonym) return synonym)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3110 (old-header |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3111 (loop for synonym in synonyms |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3112 for old-header = (mail-fetch-field (symbol-name synonym)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3113 when (and old-header (string-match new-header old-header)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3114 return synonym))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3115 (if old-header |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3116 (message "already have `%s' in `%s'" new-header old-header) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3117 (when (and (message-position-on-field header-name) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3118 (setq old-header (mail-fetch-field header-name)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3119 (not (string-match "\\` *\\'" old-header))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3120 (insert ", ")) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3121 (insert new-header))))) |
17493 | 3122 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3123 (defun message-widen-reply () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3124 "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
|
3125 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3126 (let ((follow-to |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3127 (and message-reply-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3128 (buffer-name message-reply-buffer) |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
3129 (with-current-buffer message-reply-buffer |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3130 (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
|
3131 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3132 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3133 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3134 (dolist (elem follow-to) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3135 (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
|
3136 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3137 (insert (symbol-name (car elem)) ": " |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3138 (cdr elem) "\n")))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3139 |
17493 | 3140 (defun message-insert-newsgroups () |
3141 "Insert the Newsgroups header from the article being replied to." | |
3142 (interactive) | |
3143 (when (and (message-position-on-field "Newsgroups") | |
3144 (mail-fetch-field "newsgroups") | |
3145 (not (string-match "\\` *\\'" (mail-fetch-field "newsgroups")))) | |
3146 (insert ",")) | |
3147 (insert (or (message-fetch-reply-field "newsgroups") ""))) | |
3148 | |
3149 | |
3150 | |
3151 ;;; Various commands | |
3152 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3153 (defun message-delete-not-region (beg end) |
35147 | 3154 "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
|
3155 (interactive "r") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3156 (let (citeprefix) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3157 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3158 (goto-char beg) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3159 ;; snarf citation prefix, if appropriate |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3160 (unless (eq (point) (progn (beginning-of-line) (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3161 (when (looking-at message-cite-prefix-regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3162 (setq citeprefix (match-string 0)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3163 (goto-char end) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3164 (delete-region (point) (if (not (message-goto-signature)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3165 (point) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3166 (forward-line -2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3167 (point))) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3168 (insert "\n") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3169 (goto-char beg) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3170 (delete-region beg (progn (message-goto-body) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3171 (forward-line 2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3172 (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3173 (when citeprefix |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3174 (insert citeprefix)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3175 (when (message-goto-signature) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3176 (forward-line -2))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3177 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3178 (defun message-kill-to-signature (&optional arg) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3179 "Kill all text up to the signature. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3180 If a numberic argument or prefix arg is given, leave that number |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3181 of lines before the signature intact." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3182 (interactive "P") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3183 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3184 (save-restriction |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3185 (let ((point (point))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3186 (narrow-to-region point (point-max)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3187 (message-goto-signature) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3188 (unless (eobp) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3189 (if (and arg (numberp arg)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3190 (forward-line (- -1 arg)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3191 (end-of-line -1))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3192 (unless (= point (point)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3193 (kill-region point (point)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3194 (unless (bolp) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3195 (insert "\n"))))))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3196 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3197 (defun message-newline-and-reformat (&optional arg not-break) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3198 "Insert four newlines, and then reformat if inside quoted text. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3199 Prefix arg means justify as well." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3200 (interactive (list (if current-prefix-arg 'full))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3201 (let (quoted point beg end leading-space bolp fill-paragraph-function) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3202 (setq point (point)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3203 (beginning-of-line) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3204 (setq beg (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3205 (setq bolp (= beg point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3206 ;; Find first line of the paragraph. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3207 (if not-break |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3208 (while (and (not (eobp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3209 (not (looking-at message-cite-prefix-regexp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3210 (looking-at paragraph-start)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3211 (forward-line 1))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3212 ;; Find the prefix |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3213 (when (looking-at message-cite-prefix-regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3214 (setq quoted (match-string 0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3215 (goto-char (match-end 0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3216 (looking-at "[ \t]*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3217 (setq leading-space (match-string 0))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3218 (if (and quoted |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3219 (not not-break) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3220 (not bolp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3221 (< (- point beg) (length quoted))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3222 ;; break inside the cite prefix. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3223 (setq quoted nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3224 end nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3225 (if quoted |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3226 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3227 (forward-line 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3228 (while (and (not (eobp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3229 (not (looking-at paragraph-separate)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3230 (looking-at message-cite-prefix-regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3231 (equal quoted (match-string 0))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3232 (goto-char (match-end 0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3233 (looking-at "[ \t]*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3234 (if (> (length leading-space) (length (match-string 0))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3235 (setq leading-space (match-string 0))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3236 (forward-line 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3237 (setq end (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3238 (goto-char beg) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3239 (while (and (if (bobp) nil (forward-line -1) t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3240 (not (looking-at paragraph-start)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3241 (looking-at message-cite-prefix-regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3242 (equal quoted (match-string 0))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3243 (setq beg (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3244 (goto-char (match-end 0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3245 (looking-at "[ \t]*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3246 (if (> (length leading-space) (length (match-string 0))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3247 (setq leading-space (match-string 0))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3248 (while (and (not (eobp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3249 (not (looking-at paragraph-separate)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3250 (not (looking-at message-cite-prefix-regexp))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3251 (forward-line 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3252 (setq end (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3253 (goto-char beg) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3254 (while (and (if (bobp) nil (forward-line -1) t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3255 (not (looking-at paragraph-start)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3256 (not (looking-at message-cite-prefix-regexp))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3257 (setq beg (point)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3258 (goto-char point) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3259 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3260 (narrow-to-region beg end) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3261 (if not-break |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3262 (setq point nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3263 (if bolp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3264 (newline) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3265 (newline) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3266 (newline)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3267 (setq point (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3268 ;; (newline 2) doesn't mark both newline's as hard, so call |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3269 ;; newline twice. -jas |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3270 (newline) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3271 (newline) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3272 (delete-region (point) (re-search-forward "[ \t]*")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3273 (when (and quoted (not bolp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3274 (insert quoted leading-space))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3275 (undo-boundary) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3276 (if quoted |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3277 (let* ((adaptive-fill-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3278 (regexp-quote (concat quoted leading-space))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3279 (adaptive-fill-first-line-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3280 adaptive-fill-regexp )) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3281 (fill-paragraph arg)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3282 (fill-paragraph arg)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3283 (if point (goto-char point))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3284 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3285 (defun message-fill-paragraph (&optional arg) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3286 "Message specific function to fill a paragraph. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3287 This function is used as the value of `fill-paragraph-function' in |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3288 Message buffers and is not meant to be called directly." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3289 (interactive (list (if current-prefix-arg 'full))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3290 (if (if (boundp 'filladapt-mode) filladapt-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3291 nil |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3292 (if (message-point-in-header-p) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3293 (message-fill-field) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3294 (message-newline-and-reformat arg t)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3295 t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3296 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3297 (defun message-point-in-header-p () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3298 "Return t if point is in the header." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3299 (save-excursion |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3300 (not (re-search-backward |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3301 (concat "^" (regexp-quote mail-header-separator) "\n") nil t)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3302 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3303 (defun message-do-auto-fill () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3304 "Like `do-auto-fill', but don't fill in message header." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3305 (unless (message-point-in-header-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3306 (do-auto-fill))) |
49034
b6e082e00b00
(message-split-line): New function.
Kim F. Storm <storm@cua.dk>
parents:
48588
diff
changeset
|
3307 |
17493 | 3308 (defun message-insert-signature (&optional force) |
35147 | 3309 "Insert a signature. See documentation for variable `message-signature'." |
17493 | 3310 (interactive (list 0)) |
3311 (let* ((signature | |
3312 (cond | |
3313 ((and (null message-signature) | |
3314 (eq force 0)) | |
3315 (save-excursion | |
3316 (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
|
3317 (not (re-search-backward message-signature-separator nil t)))) |
17493 | 3318 ((and (null message-signature) |
3319 force) | |
3320 t) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3321 ((functionp message-signature) |
17493 | 3322 (funcall message-signature)) |
3323 ((listp message-signature) | |
3324 (eval message-signature)) | |
3325 (t message-signature))) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3326 signature-file) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3327 (setq signature |
17493 | 3328 (cond ((stringp signature) |
3329 signature) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3330 ((and (eq t signature) message-signature-file) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3331 (setq signature-file |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3332 (if (and message-signature-directory |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3333 ;; don't actually use the signature directory |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3334 ;; if message-signature-file contains a path. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3335 (not (file-name-directory |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3336 message-signature-file))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3337 (nnheader-concat message-signature-directory |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3338 message-signature-file) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3339 message-signature-file)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3340 (file-exists-p signature-file)))) |
17493 | 3341 (when signature |
3342 (goto-char (point-max)) | |
3343 ;; Insert the signature. | |
3344 (unless (bolp) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3345 (insert "\n")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3346 (when message-signature-insert-empty-line |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3347 (insert "\n")) |
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3348 (insert "-- \n") |
17493 | 3349 (if (eq signature t) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3350 (insert-file-contents signature-file) |
17493 | 3351 (insert signature)) |
3352 (goto-char (point-max)) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3353 (or (bolp) (insert "\n"))))) |
17493 | 3354 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3355 (defun message-insert-importance-high () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3356 "Insert header to mark message as important." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3357 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3358 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3359 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3360 (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3361 (message-remove-header "Importance")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3362 (message-goto-eoh) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3363 (insert "Importance: high\n"))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3364 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3365 (defun message-insert-importance-low () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3366 "Insert header to mark message as unimportant." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3367 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3368 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3369 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3370 (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3371 (message-remove-header "Importance")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3372 (message-goto-eoh) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3373 (insert "Importance: low\n"))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3374 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3375 (defun message-insert-or-toggle-importance () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3376 "Insert a \"Importance: high\" header, or cycle through the header values. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3377 The three allowed values according to RFC 1327 are `high', `normal' |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3378 and `low'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3379 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3380 (save-excursion |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
3381 (let ((new "high") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3382 cur) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3383 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3384 (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3385 (when (setq cur (message-fetch-field "Importance")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3386 (message-remove-header "Importance") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3387 (setq new (cond ((string= cur "high") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3388 "low") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3389 ((string= cur "low") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3390 "normal") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3391 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3392 "high"))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3393 (message-goto-eoh) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3394 (insert (format "Importance: %s\n" new))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3395 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3396 (defun message-insert-disposition-notification-to () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3397 "Request a disposition notification (return receipt) to this message. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3398 Note that this should not be used in newsgroups." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3399 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3400 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3401 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3402 (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3403 (message-remove-header "Disposition-Notification-To")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3404 (message-goto-eoh) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3405 (insert (format "Disposition-Notification-To: %s\n" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3406 (or (message-field-value "Reply-to") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3407 (message-field-value "From") |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3408 (message-make-from)))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3409 |
17493 | 3410 (defun message-elide-region (b e) |
35147 | 3411 "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
|
3412 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
|
3413 text was killed." |
17493 | 3414 (interactive "r") |
3415 (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
|
3416 (insert message-elide-ellipsis)) |
17493 | 3417 |
3418 (defvar message-caesar-translation-table nil) | |
3419 | |
3420 (defun message-caesar-region (b e &optional n) | |
35147 | 3421 "Caesar rotate region B to E by N, default 13, for decrypting netnews." |
17493 | 3422 (interactive |
3423 (list | |
3424 (min (point) (or (mark t) (point))) | |
3425 (max (point) (or (mark t) (point))) | |
3426 (when current-prefix-arg | |
3427 (prefix-numeric-value current-prefix-arg)))) | |
3428 | |
3429 (setq n (if (numberp n) (mod n 26) 13)) ;canonize N | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3430 (unless (or (zerop n) ; no action needed for a rot of 0 |
17493 | 3431 (= b e)) ; no region to rotate |
3432 ;; We build the table, if necessary. | |
3433 (when (or (not message-caesar-translation-table) | |
3434 (/= (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
|
3435 (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
|
3436 (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
|
3437 (translate-region b e message-caesar-translation-table))) |
17493 | 3438 |
3439 (defun message-make-caesar-translation-table (n) | |
3440 "Create a rot table with offset N." | |
3441 (let ((i -1) | |
3442 (table (make-string 256 0))) | |
3443 (while (< (incf i) 256) | |
3444 (aset table i i)) | |
3445 (concat | |
3446 (substring table 0 ?A) | |
3447 (substring table (+ ?A n) (+ ?A n (- 26 n))) | |
3448 (substring table ?A (+ ?A n)) | |
3449 (substring table (+ ?A 26) ?a) | |
3450 (substring table (+ ?a n) (+ ?a n (- 26 n))) | |
3451 (substring table ?a (+ ?a n)) | |
3452 (substring table (+ ?a 26) 255)))) | |
3453 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3454 (defun message-caesar-buffer-body (&optional rotnum wide) |
35147 | 3455 "Caesar rotate all letters in the current buffer by 13 places. |
3456 Used to encode/decode possibly offensive messages (commonly in rec.humor). | |
17493 | 3457 With prefix arg, specifies the number of places to rotate each letter forward. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3458 Mail and USENET news headers are not rotated unless WIDE is non-nil." |
17493 | 3459 (interactive (if current-prefix-arg |
3460 (list (prefix-numeric-value current-prefix-arg)) | |
3461 (list nil))) | |
3462 (save-excursion | |
3463 (save-restriction | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3464 (when (and (not wide) (message-goto-body)) |
17493 | 3465 (narrow-to-region (point) (point-max))) |
3466 (message-caesar-region (point-min) (point-max) rotnum)))) | |
3467 | |
3468 (defun message-pipe-buffer-body (program) | |
3469 "Pipe the message body in the current buffer through PROGRAM." | |
3470 (save-excursion | |
3471 (save-restriction | |
3472 (when (message-goto-body) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3473 (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
|
3474 (shell-command-on-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3475 (point-min) (point-max) program nil t)))) |
17493 | 3476 |
3477 (defun message-rename-buffer (&optional enter-string) | |
3478 "Rename the *message* buffer to \"*message* RECIPIENT\". | |
3479 If the function is run with a prefix, it will ask for a new buffer | |
3480 name, rather than giving an automatic name." | |
3481 (interactive "Pbuffer name: ") | |
3482 (save-excursion | |
3483 (save-restriction | |
3484 (goto-char (point-min)) | |
3485 (narrow-to-region (point) | |
3486 (search-forward mail-header-separator nil 'end)) | |
3487 (let* ((mail-to (or | |
3488 (if (message-news-p) (message-fetch-field "Newsgroups") | |
3489 (message-fetch-field "To")) | |
3490 "")) | |
3491 (mail-trimmed-to | |
3492 (if (string-match "," mail-to) | |
3493 (concat (substring mail-to 0 (match-beginning 0)) ", ...") | |
3494 mail-to)) | |
3495 (name-default (concat "*message* " mail-trimmed-to)) | |
3496 (name (if enter-string | |
3497 (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
|
3498 name-default))) |
17493 | 3499 (rename-buffer name t))))) |
3500 | |
3501 (defun message-fill-yanked-message (&optional justifyp) | |
3502 "Fill the paragraphs of a message yanked into this one. | |
3503 Numeric argument means justify as well." | |
3504 (interactive "P") | |
3505 (save-excursion | |
3506 (goto-char (point-min)) | |
3507 (search-forward (concat "\n" mail-header-separator "\n") nil t) | |
3508 (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
|
3509 (fill-individual-paragraphs (point) (point-max) justifyp)))) |
17493 | 3510 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3511 (defun message-indent-citation (&optional start end yank-only) |
17493 | 3512 "Modify text just inserted from a message to be cited. |
3513 The inserted text should be the region. | |
3514 When this function returns, the region is again around the modified text. | |
3515 | |
3516 Normally, indent each nonblank line `message-indentation-spaces' spaces. | |
3517 However, if `message-yank-prefix' is non-nil, insert that prefix on each line." | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3518 (unless start (setq start (point))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3519 (unless yank-only |
17493 | 3520 ;; Remove unwanted headers. |
3521 (when message-ignored-cited-headers | |
3522 (let (all-removed) | |
3523 (save-restriction | |
3524 (narrow-to-region | |
3525 (goto-char start) | |
3526 (if (search-forward "\n\n" nil t) | |
3527 (1- (point)) | |
3528 (point))) | |
3529 (message-remove-header message-ignored-cited-headers t) | |
3530 (when (= (point-min) (point-max)) | |
3531 (setq all-removed t)) | |
3532 (goto-char (point-max))) | |
3533 (if all-removed | |
3534 (goto-char start) | |
3535 (forward-line 1)))) | |
3536 ;; Delete blank lines at the start of the buffer. | |
3537 (while (and (point-min) | |
3538 (eolp) | |
3539 (not (eobp))) | |
3540 (message-delete-line)) | |
3541 ;; Delete blank lines at the end of the buffer. | |
3542 (goto-char (point-max)) | |
3543 (unless (eolp) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3544 (insert "\n")) |
17493 | 3545 (while (and (zerop (forward-line -1)) |
3546 (looking-at "$")) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3547 (message-delete-line))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3548 ;; Do the indentation. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3549 (if (null message-yank-prefix) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3550 (indent-rigidly start (or end (mark t)) message-indentation-spaces) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3551 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3552 (goto-char start) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3553 (while (< (point) (or end (mark t))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3554 (cond ((looking-at ">") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3555 (insert message-yank-cited-prefix)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3556 ((looking-at "^$") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3557 (insert message-yank-empty-prefix)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3558 (t |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3559 (insert message-yank-prefix))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3560 (forward-line 1)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3561 (goto-char start)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3562 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3563 (defun message-remove-blank-cited-lines (&optional remove) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3564 "Remove cited lines containing only blanks. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3565 If REMOVE is non-nil, remove newlines, too. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3566 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3567 To use this automatically, you may add this function to |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3568 `gnus-message-setup-hook'." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3569 (interactive "P") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3570 (let ((citexp |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3571 (concat |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3572 "^\\(" |
85809 | 3573 (when (boundp 'message-yank-cited-prefix) |
3574 (concat message-yank-cited-prefix "\\|")) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3575 message-yank-prefix |
85809 | 3576 "\\)+ *\n" |
3577 ))) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3578 (gnus-message 8 "removing `%s'" citexp) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3579 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3580 (message-goto-body) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3581 (while (re-search-forward citexp nil t) |
85809 | 3582 (replace-match (if remove "" "\n")))))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3583 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3584 (defvar message-cite-reply-above nil |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3585 "If non-nil, start own text above the quote. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3586 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3587 Note: Top posting is bad netiquette. Don't use it unless you |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3588 really must. You probably want to set variable only for specific |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3589 groups, e.g. using `gnus-posting-styles': |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3590 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3591 (eval (set (make-local-variable 'message-cite-reply-above) t)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3592 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3593 This variable has no effect in news postings.") |
17493 | 3594 |
3595 (defun message-yank-original (&optional arg) | |
3596 "Insert the message being replied to, if any. | |
3597 Puts point before the text and mark after. | |
3598 Normally indents each nonblank line ARG spaces (default 3). However, | |
3599 if `message-yank-prefix' is non-nil, insert that prefix on each line. | |
3600 | |
3601 This function uses `message-cite-function' to do the actual citing. | |
3602 | |
3603 Just \\[universal-argument] as argument means don't indent, insert no | |
3604 prefix, and don't delete any headers." | |
3605 (interactive "P") | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3606 (let ((modified (buffer-modified-p)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3607 body-text) |
17493 | 3608 (when (and message-reply-buffer |
3609 message-cite-function) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3610 (when message-cite-reply-above |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3611 (if (and (not (message-news-p)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3612 (or (eq message-cite-reply-above 'is-evil) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3613 (y-or-n-p "\ |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3614 Top posting is bad netiquette. Please don't top post unless you really must. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3615 Really top post? "))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3616 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3617 (setq body-text |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3618 (buffer-substring (message-goto-body) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3619 (point-max))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3620 (delete-region (message-goto-body) (point-max))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3621 (set (make-local-variable 'message-cite-reply-above) nil))) |
17493 | 3622 (delete-windows-on message-reply-buffer t) |
64712
4db92b217e85
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-507
Miles Bader <miles@gnu.org>
parents:
64085
diff
changeset
|
3623 (push-mark (save-excursion |
4db92b217e85
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-507
Miles Bader <miles@gnu.org>
parents:
64085
diff
changeset
|
3624 (insert-buffer-substring message-reply-buffer) |
77114 | 3625 (unless (bolp) |
3626 (insert ?\n)) | |
64712
4db92b217e85
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-507
Miles Bader <miles@gnu.org>
parents:
64085
diff
changeset
|
3627 (point))) |
35453
26726eff41ca
2001-01-21 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35147
diff
changeset
|
3628 (unless arg |
77114 | 3629 (funcall message-cite-function) |
3630 (unless (eq (char-before (mark t)) ?\n) | |
3631 (let ((pt (point))) | |
3632 (goto-char (mark t)) | |
3633 (insert-before-markers ?\n) | |
3634 (goto-char pt)))) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3635 (when message-cite-reply-above |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3636 (message-goto-body) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3637 (insert body-text) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3638 (insert (if (bolp) "\n" "\n\n")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3639 (message-goto-body)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3640 ;; Add a `message-setup-very-last-hook' here? |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3641 ;; Add `gnus-article-highlight-citation' here? |
17493 | 3642 (unless modified |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3643 (setq message-checksum (message-checksum)))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3644 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3645 (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
|
3646 "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
|
3647 (interactive "bYank buffer: ") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3648 (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
|
3649 (save-window-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3650 (message-yank-original)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3651 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3652 (defun message-buffers () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3653 "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
|
3654 (let (buffers) |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
3655 (save-current-buffer |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3656 (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
|
3657 (set-buffer buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3658 (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
|
3659 (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
|
3660 (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
|
3661 (nreverse buffers))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3662 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3663 (defun message-cite-original-1 (strip-signature) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3664 "Cite an original message. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3665 If STRIP-SIGNATURE is non-nil, strips off the signature from the |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3666 original message. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3667 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3668 This function uses `mail-citation-hook' if that is non-nil." |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
3669 (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
|
3670 mail-citation-hook) |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
3671 (run-hooks 'mail-citation-hook) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3672 (let* ((start (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3673 (end (mark t)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3674 (x-no-archive nil) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3675 (functions |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3676 (when message-indent-citation-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3677 (if (listp message-indent-citation-function) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3678 message-indent-citation-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3679 (list message-indent-citation-function)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3680 ;; This function may be called by `gnus-summary-yank-message' and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3681 ;; may insert a different article from the original. So, we will |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3682 ;; modify the value of `message-reply-headers' with that article. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3683 (message-reply-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3684 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3685 (narrow-to-region start end) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3686 (message-narrow-to-head-1) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3687 (setq x-no-archive (message-fetch-field "x-no-archive")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3688 (vector 0 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3689 (or (message-fetch-field "subject") "none") |
73007 | 3690 (or (message-fetch-field "from") "nobody") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3691 (message-fetch-field "date") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3692 (message-fetch-field "message-id" t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3693 (message-fetch-field "references") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3694 0 0 "")))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3695 (mml-quote-region start end) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3696 (when strip-signature |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3697 ;; Allow undoing. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3698 (undo-boundary) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3699 (goto-char end) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3700 (when (re-search-backward message-signature-separator start t) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3701 ;; Also peel off any blank lines before the signature. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3702 (forward-line -1) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3703 (while (looking-at "^[ \t]*$") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3704 (forward-line -1)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3705 (forward-line 1) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3706 (delete-region (point) end) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3707 (unless (search-backward "\n\n" start t) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3708 ;; Insert a blank line if it is peeled off. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3709 (insert "\n")))) |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
3710 (goto-char start) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3711 (mapc 'funcall functions) |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
3712 (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
|
3713 (unless (bolp) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3714 (insert "\n")) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3715 (funcall message-citation-line-function)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3716 (when (and x-no-archive |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3717 (not message-cite-articles-with-x-no-archive) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3718 (string-match "yes" x-no-archive)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3719 (undo-boundary) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3720 (delete-region (point) (mark t)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3721 (insert "> [Quoted text removed due to X-No-Archive]\n") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3722 (push-mark) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3723 (forward-line -1))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3724 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3725 (defun message-cite-original () |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3726 "Cite function in the standard Message manner." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3727 (message-cite-original-1 nil)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3728 |
87026
9a6b88cec251
(gnus-extract-address-components): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents:
86393
diff
changeset
|
3729 (defvar gnus-extract-address-components) |
9a6b88cec251
(gnus-extract-address-components): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents:
86393
diff
changeset
|
3730 |
87245
6207f5a83057
(Info-goto-node, format-spec): Autoload.
Glenn Morris <rgm@gnu.org>
parents:
87191
diff
changeset
|
3731 (autoload 'format-spec "format-spec") |
6207f5a83057
(Info-goto-node, format-spec): Autoload.
Glenn Morris <rgm@gnu.org>
parents:
87191
diff
changeset
|
3732 |
85974 | 3733 (defun message-insert-formatted-citation-line (&optional from date) |
3734 "Function that inserts a formatted citation line. | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3735 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3736 See `message-citation-line-format'." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3737 ;; The optional args are for testing/debugging. They will disappear later. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3738 ;; Example: |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3739 ;; (with-temp-buffer |
85974 | 3740 ;; (message-insert-formatted-citation-line |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3741 ;; "John Doe <john.doe@example.invalid>" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3742 ;; (current-time)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3743 ;; (buffer-string)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3744 (when (or message-reply-headers (and from date)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3745 (unless from |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3746 (setq from (mail-header-from message-reply-headers))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3747 (let* ((data (condition-case () |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3748 (funcall (if (boundp gnus-extract-address-components) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3749 gnus-extract-address-components |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3750 'mail-extract-address-components) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3751 from) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3752 (error nil))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3753 (name (car data)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3754 (fname name) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3755 (lname name) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3756 (net (car (cdr data))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3757 (name-or-net (or (car data) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3758 (car (cdr data)) from)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3759 (replydate |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3760 (or |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3761 date |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3762 ;; We need Gnus functionality if the user wants date or time from |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3763 ;; the original article: |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3764 (when (string-match "%[^fnNFL]" message-citation-line-format) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3765 (autoload 'gnus-date-get-time "gnus-util") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3766 (gnus-date-get-time (mail-header-date message-reply-headers))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3767 (flist |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3768 (let ((i ?A) lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3769 (when (stringp name) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3770 ;; Guess first name and last name: |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3771 (cond ((string-match |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3772 "\\`\\(\\w\\|[-.]\\)+ \\(\\w\\|[-.]\\)+\\'" name) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3773 (setq fname (nth 0 (split-string name "[ \t]+")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3774 lname (nth 1 (split-string name "[ \t]+")))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3775 ((string-match |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3776 "\\`\\(\\w\\|[-.]\\)+, \\(\\w\\|[-.]\\)+\\'" name) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3777 (setq fname (nth 1 (split-string name "[ \t,]+")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3778 lname (nth 0 (split-string name "[ \t,]+")))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3779 ((string-match |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3780 "\\`\\(\\w\\|[-.]\\)+\\'" name) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3781 (setq fname name |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3782 lname "")))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3783 ;; The following letters are not used in `format-time-string': |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3784 (push ?E lst) (push "<E>" lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3785 (push ?F lst) (push fname lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3786 ;; We might want to use "" instead of "<X>" later. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3787 (push ?J lst) (push "<J>" lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3788 (push ?K lst) (push "<K>" lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3789 (push ?L lst) (push lname lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3790 (push ?N lst) (push name-or-net lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3791 (push ?O lst) (push "<O>" lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3792 (push ?P lst) (push "<P>" lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3793 (push ?Q lst) (push "<Q>" lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3794 (push ?f lst) (push from lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3795 (push ?i lst) (push "<i>" lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3796 (push ?n lst) (push net lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3797 (push ?o lst) (push "<o>" lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3798 (push ?q lst) (push "<q>" lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3799 (push ?t lst) (push "<t>" lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3800 (push ?v lst) (push "<v>" lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3801 ;; Delegate the rest to `format-time-string': |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3802 (while (<= i ?z) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3803 (when (and (not (memq i lst)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3804 ;; Skip (Z,a) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3805 (or (<= i ?Z) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3806 (>= i ?a))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3807 (push i lst) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3808 (push (condition-case nil |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3809 (progn (format-time-string (format "%%%c" i) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3810 replydate)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3811 (format ">%c<" i)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3812 lst)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3813 (setq i (1+ i))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3814 (reverse lst))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3815 (spec (apply 'format-spec-make flist))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3816 (insert (format-spec message-citation-line-format spec))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3817 (newline))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3818 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3819 (defun message-cite-original-without-signature () |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3820 "Cite function in the standard Message manner. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3821 This function strips off the signature from the original message." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3822 (message-cite-original-1 t)) |
17493 | 3823 |
3824 (defun message-insert-citation-line () | |
35147 | 3825 "Insert a simple citation line." |
17493 | 3826 (when message-reply-headers |
67032
ebf472d3ae22
(message-insert-citation-line): Use newlines.
Chong Yidong <cyd@stupidchicken.com>
parents:
67030
diff
changeset
|
3827 (insert (mail-header-from message-reply-headers) " writes:") |
ebf472d3ae22
(message-insert-citation-line): Use newlines.
Chong Yidong <cyd@stupidchicken.com>
parents:
67030
diff
changeset
|
3828 (newline) |
ebf472d3ae22
(message-insert-citation-line): Use newlines.
Chong Yidong <cyd@stupidchicken.com>
parents:
67030
diff
changeset
|
3829 (newline))) |
17493 | 3830 |
3831 (defun message-position-on-field (header &rest afters) | |
3832 (let ((case-fold-search t)) | |
3833 (save-restriction | |
3834 (narrow-to-region | |
3835 (goto-char (point-min)) | |
3836 (progn | |
3837 (re-search-forward | |
3838 (concat "^" (regexp-quote mail-header-separator) "$")) | |
3839 (match-beginning 0))) | |
3840 (goto-char (point-min)) | |
3841 (if (re-search-forward (concat "^" (regexp-quote header) ":") nil t) | |
3842 (progn | |
3843 (re-search-forward "^[^ \t]" nil 'move) | |
3844 (beginning-of-line) | |
3845 (skip-chars-backward "\n") | |
3846 t) | |
3847 (while (and afters | |
3848 (not (re-search-forward | |
3849 (concat "^" (regexp-quote (car afters)) ":") | |
3850 nil t))) | |
3851 (pop afters)) | |
3852 (when afters | |
3853 (re-search-forward "^[^ \t]" nil 'move) | |
3854 (beginning-of-line)) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3855 (insert header ": \n") |
17493 | 3856 (forward-char -1) |
3857 nil)))) | |
3858 | |
3859 (defun message-remove-signature () | |
3860 "Remove the signature from the text between point and mark. | |
3861 The text will also be indented the normal way." | |
3862 (save-excursion | |
3863 (let ((start (point)) | |
3864 mark) | |
3865 (if (not (re-search-forward message-signature-separator (mark t) t)) | |
3866 ;; No signature here, so we just indent the cited text. | |
3867 (message-indent-citation) | |
3868 ;; Find the last non-empty line. | |
3869 (forward-line -1) | |
3870 (while (looking-at "[ \t]*$") | |
3871 (forward-line -1)) | |
3872 (forward-line 1) | |
3873 (setq mark (set-marker (make-marker) (point))) | |
3874 (goto-char start) | |
3875 (message-indent-citation) | |
3876 ;; Enable undoing the deletion. | |
3877 (undo-boundary) | |
3878 (delete-region mark (mark t)) | |
3879 (set-marker mark nil))))) | |
3880 | |
3881 | |
3882 | |
3883 ;;; | |
3884 ;;; Sending messages | |
3885 ;;; | |
3886 | |
3887 (defun message-send-and-exit (&optional arg) | |
3888 "Send message like `message-send', then, if no errors, exit from mail buffer." | |
3889 (interactive "P") | |
3890 (let ((buf (current-buffer)) | |
3891 (actions message-exit-actions)) | |
3892 (when (and (message-send arg) | |
3893 (buffer-name buf)) | |
3894 (if message-kill-buffer-on-exit | |
3895 (kill-buffer buf) | |
3896 (bury-buffer buf) | |
3897 (when (eq buf (current-buffer)) | |
3898 (message-bury buf))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3899 (message-do-actions actions) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3900 t))) |
17493 | 3901 |
3902 (defun message-dont-send () | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3903 "Don't send the message you have been editing. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3904 Instead, just auto-save the buffer and then bury it." |
17493 | 3905 (interactive) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3906 (set-buffer-modified-p t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3907 (save-buffer) |
17493 | 3908 (let ((actions message-postpone-actions)) |
3909 (message-bury (current-buffer)) | |
3910 (message-do-actions actions))) | |
3911 | |
3912 (defun message-kill-buffer () | |
3913 "Kill the current buffer." | |
3914 (interactive) | |
3915 (when (or (not (buffer-modified-p)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3916 (not message-kill-buffer-query) |
17493 | 3917 (yes-or-no-p "Message modified; kill anyway? ")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3918 (let ((actions message-kill-actions) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3919 (draft-article message-draft-article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3920 (auto-save-file-name buffer-auto-save-file-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3921 (file-name buffer-file-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3922 (modified (buffer-modified-p))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3923 (setq buffer-file-name nil) |
17493 | 3924 (kill-buffer (current-buffer)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3925 (when (and (or (and auto-save-file-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3926 (file-exists-p auto-save-file-name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3927 (and file-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3928 (file-exists-p file-name))) |
64735
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
3929 (progn |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
3930 ;; If the message buffer has lived in a dedicated window, |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
3931 ;; `kill-buffer' has killed the frame. Thus the |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
3932 ;; `yes-or-no-p' may show up in a lowered frame. Make sure |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
3933 ;; that the user can see the question by raising the |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
3934 ;; current frame: |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
3935 (raise-frame) |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
3936 (yes-or-no-p (format "Remove the backup file%s? " |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
3937 (if modified " too" ""))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3938 (ignore-errors |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3939 (delete-file auto-save-file-name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3940 (let ((message-draft-article draft-article)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3941 (message-disassociate-draft))) |
17493 | 3942 (message-do-actions actions)))) |
3943 | |
3944 (defun message-bury (buffer) | |
35147 | 3945 "Bury this mail BUFFER." |
17493 | 3946 (let ((newbuf (other-buffer buffer))) |
3947 (bury-buffer buffer) | |
64735
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
3948 (if (and (window-dedicated-p (selected-window)) |
17493 | 3949 (not (null (delq (selected-frame) (visible-frame-list))))) |
3950 (delete-frame (selected-frame)) | |
3951 (switch-to-buffer newbuf)))) | |
3952 | |
3953 (defun message-send (&optional arg) | |
3954 "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
|
3955 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
|
3956 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
|
3957 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
|
3958 the mailer. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3959 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
|
3960 It should typically alter the sending method in some way or other." |
17493 | 3961 (interactive "P") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3962 ;; 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
|
3963 (undo-boundary) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3964 (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
|
3965 (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
|
3966 (message-fix-before-sending) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3967 (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
|
3968 (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
|
3969 (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
|
3970 (success t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3971 elem sent dont-barf-on-no-method |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3972 (message-options message-options)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3973 (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
|
3974 (while (and success |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3975 (setq elem (pop alist))) |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3976 (when (funcall (cadr elem)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
3977 (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
|
3978 message-sent-message-via)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3979 (message-fetch-field "supersedes") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3980 (if (or (message-gnksa-enable-p 'multiple-copies) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3981 (not (eq (car elem) 'news))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3982 (y-or-n-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3983 (format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3984 "Already sent message via %s; resend? " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3985 (car elem))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3986 (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
|
3987 (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
|
3988 (setq sent t)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3989 (unless (or sent |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3990 (not success) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3991 (let ((fcc (message-fetch-field "Fcc")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3992 (gcc (message-fetch-field "Gcc"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3993 (when (or fcc gcc) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3994 (or (eq message-allow-no-recipients 'always) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3995 (and (not (eq message-allow-no-recipients 'never)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3996 (setq dont-barf-on-no-method |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3997 (gnus-y-or-n-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3998 (format "No receiver, perform %s anyway? " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3999 (cond ((and fcc gcc) "Fcc and Gcc") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4000 (fcc "Fcc") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4001 (t "Gcc")))))))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4002 (error "No methods specified to send by")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4003 (when (or dont-barf-on-no-method |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4004 (and success sent)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4005 (message-do-fcc) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4006 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4007 (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
|
4008 (message "Sending...done") |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4009 ;; Do ecomplete address snarfing. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4010 (when (message-mail-alias-type-p 'ecomplete) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4011 (message-put-addresses-in-ecomplete)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4012 ;; 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
|
4013 (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
|
4014 (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
|
4015 (message-disassociate-draft) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4016 ;; 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
|
4017 (message-do-send-housekeeping) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4018 (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
|
4019 ;; Return success. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4020 t))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4021 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4022 (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
|
4023 "Send the current message via mail." |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4024 (message-send-mail arg)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4025 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4026 (defun message-send-via-news (arg) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4027 "Send the current message via news." |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4028 (funcall message-send-news-function arg)) |
17493 | 4029 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4030 (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
|
4031 "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
|
4032 `(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
|
4033 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4034 ,@forms))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4035 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4036 (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
|
4037 (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
|
4038 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4039 (defun message-text-with-property (prop &optional start end reverse) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4040 "Return a list of start and end positions where the text has PROP. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4041 START and END bound the search, they default to `point-min' and |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4042 `point-max' respectively. If REVERSE is non-nil, find text which does |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4043 not have PROP." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4044 (unless start |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4045 (setq start (point-min))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4046 (unless end |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4047 (setq end (point-max))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4048 (let (next regions) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4049 (if reverse |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4050 (while (and start |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4051 (setq start (text-property-any start end prop nil))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4052 (setq next (next-single-property-change start prop nil end)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4053 (push (cons start (or next end)) regions) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4054 (setq start next)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4055 (while (and start |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4056 (or (get-text-property start prop) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4057 (and (setq start (next-single-property-change |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4058 start prop nil end)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4059 (get-text-property start prop)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4060 (setq next (text-property-any start end prop nil)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4061 (push (cons start (or next end)) regions) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4062 (setq start next))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4063 (nreverse regions))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4064 |
85809 | 4065 (defcustom message-bogus-address-regexp nil ;; "noreply\\|nospam\\|invalid" |
4066 "Regexp of potentially bogus mail addresses." | |
92336
5f827896103e
Change defcustom :version from 23.0 to 23.1.
Glenn Morris <rgm@gnu.org>
parents:
92147
diff
changeset
|
4067 :version "23.1" ;; No Gnus |
85809 | 4068 :group 'message-headers |
4069 :type 'regexp) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4070 |
17493 | 4071 (defun message-fix-before-sending () |
4072 "Do various things to make the message nice before sending it." | |
4073 ;; Make sure there's a newline at the end of the message. | |
4074 (goto-char (point-max)) | |
4075 (unless (bolp) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4076 (insert "\n")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4077 ;; Make the hidden headers visible. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4078 (widen) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4079 ;; Sort headers before sending the message. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4080 (message-sort-headers) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4081 ;; Make invisible text visible. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4082 ;; It doesn't seem as if this is useful, since the invisible property |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4083 ;; 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
|
4084 (message-check 'invisible-text |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4085 (let ((regions (message-text-with-property 'invisible)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4086 from to) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4087 (when regions |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4088 (while regions |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4089 (setq from (caar regions) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4090 to (cdar regions) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4091 regions (cdr regions)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4092 (put-text-property from to 'invisible nil) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4093 (message-overlay-put (message-make-overlay from to) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4094 'face 'highlight)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4095 (unless (yes-or-no-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4096 "Invisible text found and made visible; continue sending? ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4097 (error "Invisible text found and made visible"))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4098 (message-check 'illegible-text |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4099 (let (char found choice) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4100 (message-goto-body) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4101 (while (progn |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4102 (skip-chars-forward mm-7bit-chars) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4103 (when (get-text-property (point) 'no-illegible-text) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4104 ;; There is a signed or encrypted raw message part |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4105 ;; that is considered to be safe. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4106 (goto-char (or (next-single-property-change |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4107 (point) 'no-illegible-text) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4108 (point-max)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4109 (setq char (char-after))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4110 (when (or (< (mm-char-int char) 128) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4111 (and (mm-multibyte-p) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4112 (memq (char-charset char) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4113 '(eight-bit-control eight-bit-graphic |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4114 control-1)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4115 (not (get-text-property |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4116 (point) 'untranslated-utf-8)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4117 (message-overlay-put (message-make-overlay (point) (1+ (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4118 'face 'highlight) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4119 (setq found t)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4120 (forward-char)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4121 (when found |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4122 (setq choice |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4123 (gnus-multiple-choice |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4124 "Non-printable characters found. Continue sending?" |
74021 | 4125 `((?d "Remove non-printable characters and send") |
4126 (?r ,(format | |
4127 "Replace non-printable characters with \"%s\" and send" | |
4128 message-replacement-char)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4129 (?i "Ignore non-printable characters and send") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4130 (?e "Continue editing")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4131 (if (eq choice ?e) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4132 (error "Non-printable characters")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4133 (message-goto-body) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4134 (skip-chars-forward mm-7bit-chars) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4135 (while (not (eobp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4136 (when (let ((char (char-after))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4137 (or (< (mm-char-int char) 128) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4138 (and (mm-multibyte-p) |
69135
12d289b6e5de
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-118
Miles Bader <miles@gnu.org>
parents:
68521
diff
changeset
|
4139 ;; FIXME: Wrong for Emacs 23 (unicode) and for |
12d289b6e5de
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-118
Miles Bader <miles@gnu.org>
parents:
68521
diff
changeset
|
4140 ;; things like undecable utf-8. Should at least |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4141 ;; use find-coding-systems-region. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4142 (memq (char-charset char) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4143 '(eight-bit-control eight-bit-graphic |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4144 control-1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4145 (not (get-text-property |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4146 (point) 'untranslated-utf-8))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4147 (if (eq choice ?i) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4148 (message-kill-all-overlays) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4149 (delete-char 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4150 (when (eq choice ?r) |
74021 | 4151 (insert message-replacement-char)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4152 (forward-char) |
85809 | 4153 (skip-chars-forward mm-7bit-chars))))) |
4154 (message-check 'bogus-recipient | |
4155 ;; Warn before composing or sending a mail to an invalid address. | |
4156 (message-check-recipients))) | |
4157 | |
4158 (defun message-bogus-recipient-p (recipients) | |
4159 "Check if a mail address in RECIPIENTS looks bogus. | |
4160 | |
4161 RECIPIENTS is a mail header. Return a list of potentially bogus | |
4162 addresses. If none is found, return nil. | |
4163 | |
4164 An addresses might be bogus if the domain part is not fully | |
4165 qualified, see `message-valid-fqdn-regexp', or if it matches | |
4166 `message-bogus-address-regexp'." | |
4167 ;; FIXME: How about "foo@subdomain", when the MTA adds ".domain.tld"? | |
4168 (let (found) | |
4169 (mapc (lambda (address) | |
4170 (setq address (cadr address)) | |
4171 (when | |
4172 (or (not | |
4173 (or | |
4174 (not (string-match "@" address)) | |
4175 (string-match | |
4176 (concat ".@.*\\(" | |
4177 message-valid-fqdn-regexp "\\)\\'") address))) | |
4178 (and (stringp message-bogus-address-regexp) | |
4179 (string-match message-bogus-address-regexp address))) | |
4180 (push address found))) | |
4181 ;; | |
4182 (mail-extract-address-components recipients t)) | |
4183 found)) | |
4184 | |
4185 (defun message-check-recipients () | |
4186 "Warn before composing or sending a mail to an invalid address. | |
4187 | |
4188 This function could be useful in `message-setup-hook'." | |
4189 (interactive) | |
4190 (save-restriction | |
4191 (message-narrow-to-headers) | |
4192 (dolist (hdr '("To" "Cc" "Bcc")) | |
4193 (let ((addr (message-fetch-field hdr))) | |
4194 (when (stringp addr) | |
4195 (dolist (bog (message-bogus-recipient-p addr)) | |
4196 (and bog | |
4197 (not (y-or-n-p | |
4198 (format | |
4199 "Address `%s' might be bogus. Continue? " bog))) | |
4200 (error "Bogus address.")))))))) | |
17493 | 4201 |
4202 (defun message-add-action (action &rest types) | |
4203 "Add ACTION to be performed when doing an exit of type TYPES." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4204 (while types |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4205 (add-to-list (intern (format "message-%s-actions" (pop types))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4206 action))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4207 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4208 (defun message-delete-action (action &rest types) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4209 "Delete ACTION from lists of actions performed when doing an exit of type TYPES." |
17493 | 4210 (let (var) |
4211 (while types | |
4212 (set (setq var (intern (format "message-%s-actions" (pop types)))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4213 (delq action (symbol-value var)))))) |
17493 | 4214 |
4215 (defun message-do-actions (actions) | |
4216 "Perform all actions in ACTIONS." | |
4217 ;; Now perform actions on successful sending. | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4218 (dolist (action actions) |
17493 | 4219 (ignore-errors |
4220 (cond | |
4221 ;; A simple function. | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4222 ((functionp action) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4223 (funcall action)) |
17493 | 4224 ;; Something to be evaled. |
4225 (t | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4226 (eval action)))))) |
17493 | 4227 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4228 (defun message-send-mail-partially () |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4229 "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
|
4230 ;; 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
|
4231 (goto-char (point-min)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
4232 (re-search-forward |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
4233 (concat "^" (regexp-quote mail-header-separator) "\n")) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4234 (replace-match "\n") |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
4235 (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
|
4236 (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
|
4237 (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
|
4238 (curbuf (current-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4239 (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
|
4240 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
|
4241 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4242 (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
|
4243 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4244 (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
|
4245 (beginning-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4246 (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
|
4247 (push p plist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4248 (setq p (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4249 (setq total (length plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4250 (push (point-max) plist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4251 (setq plist (nreverse plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4252 (unwind-protect |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4253 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4254 (setq p (pop plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4255 (while plist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4256 (set-buffer curbuf) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4257 (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
|
4258 (set-buffer tembuf) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4259 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4260 (if header |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4261 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4262 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4263 (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
|
4264 (insert header)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4265 (message-goto-eoh) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4266 (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
|
4267 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4268 (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
|
4269 (insert header) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4270 (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
|
4271 (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
|
4272 (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
|
4273 (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
|
4274 (message-remove-header "Lines") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4275 (goto-char (point-max)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4276 (insert "Mime-Version: 1.0\n") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4277 (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
|
4278 (goto-char (point-max)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4279 (insert (format "Content-Type: message/partial; id=\"%s\"; number=%d; total=%d\n\n" |
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4280 id n total)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4281 (forward-char -1) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4282 (let ((mail-header-separator "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4283 (when (memq 'Message-ID message-required-mail-headers) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4284 (insert "Message-ID: " (message-make-message-id) "\n")) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4285 (when (memq 'Lines message-required-mail-headers) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4286 (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
|
4287 (message-goto-subject) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4288 (end-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4289 (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
|
4290 (widen) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4291 (mm-with-unibyte-current-buffer |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4292 (funcall (or message-send-mail-real-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4293 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
|
4294 (setq n (+ n 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4295 (setq p (pop plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4296 (erase-buffer))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4297 (kill-buffer tembuf)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4298 |
17493 | 4299 (defun message-send-mail (&optional arg) |
4300 (require 'mail-utils) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4301 (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
|
4302 (case-fold-search nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4303 (news (message-news-p)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4304 (mailbuf (current-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4305 (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
|
4306 (message-posting-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4307 (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
|
4308 (gnus-setup-posting-charset nil) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4309 message-posting-charset)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4310 (headers message-required-mail-headers)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4311 (when (and message-generate-hashcash |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4312 (not (eq message-generate-hashcash 'opportunistic))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4313 (message "Generating hashcash...") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4314 ;; Wait for calculations already started to finish... |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4315 (hashcash-wait-async) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4316 ;; ...and do calculations not already done. mail-add-payment |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4317 ;; will leave existing X-Hashcash headers alone. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4318 (mail-add-payment) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4319 (message "Generating hashcash...done")) |
17493 | 4320 (save-restriction |
4321 (message-narrow-to-headers) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4322 ;; Generate the Mail-Followup-To header if the header is not there... |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4323 (if (and (message-subscribed-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4324 (not (mail-fetch-field "mail-followup-to"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4325 (setq headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4326 (cons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4327 (cons "Mail-Followup-To" (message-make-mail-followup-to)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4328 message-required-mail-headers)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4329 ;; otherwise, delete the MFT header if the field is empty |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4330 (when (equal "" (mail-fetch-field "mail-followup-to")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4331 (message-remove-header "^Mail-Followup-To:"))) |
17493 | 4332 ;; Insert some headers. |
4333 (let ((message-deletable-headers | |
4334 (if news nil message-deletable-headers))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4335 (message-generate-headers headers)) |
71379 | 4336 ;; Check continuation headers. |
4337 (message-check 'continuation-headers | |
4338 (goto-char (point-min)) | |
4339 (while (re-search-forward "^[^ \t\n][^ \t\n:]*[ \t\n]" nil t) | |
4340 (goto-char (match-beginning 0)) | |
4341 (if (y-or-n-p "Fix continuation lines? ") | |
4342 (insert " ") | |
4343 (forward-line 1) | |
4344 (unless (y-or-n-p "Send anyway? ") | |
4345 (error "Failed to send the message"))))) | |
17493 | 4346 ;; Let the user do all of the above. |
4347 (run-hooks 'message-header-hook)) | |
4348 (unwind-protect | |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
4349 (with-current-buffer tembuf |
17493 | 4350 (erase-buffer) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4351 ;; 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
|
4352 (insert (with-current-buffer mailbuf |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4353 (mml-buffer-substring-no-properties-except-hard-newlines |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4354 (point-min) (point-max)))) |
17493 | 4355 ;; Remove some headers. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4356 (message-encode-message-body) |
17493 | 4357 (save-restriction |
4358 (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
|
4359 ;; 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
|
4360 (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
|
4361 (message-generate-headers '(Lines))) |
17493 | 4362 ;; Remove some headers. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4363 (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
|
4364 (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
|
4365 (mail-encode-encoded-word-buffer))) |
17493 | 4366 (goto-char (point-max)) |
4367 ;; require one newline at the end. | |
4368 (or (= (preceding-char) ?\n) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4369 (insert ?\n)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4370 (message-cleanup-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4371 ;; FIXME: we're inserting the courtesy copy after encoding. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4372 ;; This is wrong if the courtesy copy string contains |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4373 ;; non-ASCII characters. -- jh |
35147 | 4374 (when |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4375 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4376 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4377 (and news |
17493 | 4378 (or (message-fetch-field "cc") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4379 (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
|
4380 (message-fetch-field "to")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4381 (let ((content-type (message-fetch-field |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4382 "content-type"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4383 (and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4384 (or |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4385 (not content-type) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4386 (string= "text/plain" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4387 (car |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4388 (mail-header-parse-content-type |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4389 content-type)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4390 (not |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4391 (string= "base64" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4392 (message-fetch-field |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4393 "content-transfer-encoding"))))))) |
17493 | 4394 (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
|
4395 (if (or (not message-send-mail-partially-limit) |
56947
a1a3a7ab3bad
(message-tokenize-header, message-send-mail-with-qmail):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56927
diff
changeset
|
4396 (< (buffer-size) message-send-mail-partially-limit) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4397 (not (message-y-or-n-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4398 "The message size is too large, split? " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4399 t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4400 "\ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4401 The message size, " |
56947
a1a3a7ab3bad
(message-tokenize-header, message-send-mail-with-qmail):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56927
diff
changeset
|
4402 (/ (buffer-size) 1000) "KB, is too large. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4403 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4404 Some mail gateways (MTA's) bounce large messages. To avoid the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4405 problem, answer `y', and the message will be split into several |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4406 smaller pieces, the size of each is about " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4407 (/ message-send-mail-partially-limit 1000) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4408 "KB except the last |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4409 one. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4410 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4411 However, some mail readers (MUA's) can't read split messages, i.e., |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4412 mails in message/partially format. Answer `n', and the message will be |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4413 sent in one piece. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4414 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4415 The size limit is controlled by `message-send-mail-partially-limit'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4416 If you always want Gnus to send messages in one piece, set |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4417 `message-send-mail-partially-limit' to nil. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4418 "))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4419 (mm-with-unibyte-current-buffer |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4420 (message "Sending via mail...") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4421 (funcall (or message-send-mail-real-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4422 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
|
4423 (message-send-mail-partially))) |
17493 | 4424 (kill-buffer tembuf)) |
4425 (set-buffer mailbuf) | |
4426 (push 'mail message-sent-message-via))) | |
4427 | |
4428 (defun message-send-mail-with-sendmail () | |
4429 "Send off the prepared buffer with sendmail." | |
4430 (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
|
4431 (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
|
4432 " sendmail errors") |
17493 | 4433 0)) |
4434 resend-to-addresses delimline) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4435 (unwind-protect |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4436 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4437 (let ((case-fold-search t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4438 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4439 (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4440 (setq resend-to-addresses (message-fetch-field "resent-to"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4441 ;; Change header-delimiter to be what sendmail expects. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4442 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4443 (re-search-forward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4444 (concat "^" (regexp-quote mail-header-separator) "\n")) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4445 (replace-match "\n") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4446 (backward-char 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4447 (setq delimline (point-marker)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4448 (run-hooks 'message-send-mail-hook) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4449 ;; Insert an extra newline if we need it to work around |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4450 ;; Sun's bug that swallows newlines. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4451 (goto-char (1+ delimline)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4452 (when (eval message-mailer-swallows-blank-line) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4453 (newline)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4454 (when message-interactive |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4455 (with-current-buffer errbuf |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4456 (erase-buffer)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4457 (let* ((default-directory "/") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4458 (coding-system-for-write message-send-coding-system) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4459 (cpr (apply |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4460 'call-process-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4461 (append |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4462 (list (point-min) (point-max) |
72636
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4463 (cond ((boundp 'sendmail-program) |
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4464 sendmail-program) |
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4465 ((file-exists-p "/usr/sbin/sendmail") |
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4466 "/usr/sbin/sendmail") |
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4467 ((file-exists-p "/usr/lib/sendmail") |
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4468 "/usr/lib/sendmail") |
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4469 ((file-exists-p "/usr/ucblib/sendmail") |
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4470 "/usr/ucblib/sendmail") |
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4471 (t "fakemail")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4472 nil errbuf nil "-oi") |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4473 message-sendmail-extra-arguments |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4474 ;; Always specify who from, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4475 ;; since some systems have broken sendmails. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4476 ;; But some systems are more broken with -f, so |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4477 ;; we'll let users override this. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4478 (if (null message-sendmail-f-is-evil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4479 (list "-f" (message-sendmail-envelope-from))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4480 ;; These mean "report errors by mail" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4481 ;; and "deliver in background". |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4482 (if (null message-interactive) '("-oem" "-odb")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4483 ;; Get the addresses from the message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4484 ;; unless this is a resend. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4485 ;; We must not do that for a resend |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4486 ;; because we would find the original addresses. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4487 ;; For a resend, include the specific addresses. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4488 (if resend-to-addresses |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4489 (list resend-to-addresses) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4490 '("-t")))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4491 (unless (or (null cpr) (and (numberp cpr) (zerop cpr))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4492 (error "Sending...failed with exit value %d" cpr))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4493 (when message-interactive |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
4494 (with-current-buffer errbuf |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4495 (goto-char (point-min)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4496 (while (re-search-forward "\n+ *" nil t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4497 (replace-match "; ")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4498 (if (not (zerop (buffer-size))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4499 (error "Sending...failed to %s" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4500 (buffer-string)))))) |
17493 | 4501 (when (bufferp errbuf) |
4502 (kill-buffer errbuf))))) | |
4503 | |
4504 (defun message-send-mail-with-qmail () | |
4505 "Pass the prepared message buffer to qmail-inject. | |
4506 Refer to the documentation for the variable `message-send-mail-function' | |
4507 to find out how to use this." | |
4508 ;; replace the header delimiter with a blank line | |
4509 (goto-char (point-min)) | |
4510 (re-search-forward | |
4511 (concat "^" (regexp-quote mail-header-separator) "\n")) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4512 (replace-match "\n") |
17493 | 4513 (run-hooks 'message-send-mail-hook) |
4514 ;; send the message | |
4515 (case | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4516 (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
|
4517 (apply |
56947
a1a3a7ab3bad
(message-tokenize-header, message-send-mail-with-qmail):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56927
diff
changeset
|
4518 'call-process-region (point-min) (point-max) |
a1a3a7ab3bad
(message-tokenize-header, message-send-mail-with-qmail):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56927
diff
changeset
|
4519 message-qmail-inject-program nil nil nil |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4520 ;; 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
|
4521 ;; 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
|
4522 ;; 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
|
4523 ;; |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4524 ;; 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
|
4525 ;; 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
|
4526 ;; message from stdin. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4527 ;; |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4528 ;; 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
|
4529 ;; 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
|
4530 ;; 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
|
4531 ;; for sendmail's lost innocence. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4532 ;; |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4533 ;; 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
|
4534 ;; 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
|
4535 ;; 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
|
4536 ;; gets full control (no gestapo'ish -f's, for instance). --sj |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4537 (if (functionp message-qmail-inject-args) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4538 (funcall message-qmail-inject-args) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4539 message-qmail-inject-args))) |
17493 | 4540 ;; qmail-inject doesn't say anything on it's stdout/stderr, |
4541 ;; we have to look at the retval instead | |
4542 (0 nil) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4543 (100 (error "qmail-inject reported permanent failure")) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4544 (111 (error "qmail-inject reported transient failure")) |
17493 | 4545 ;; should never happen |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4546 (t (error "qmail-inject reported unknown failure")))) |
17493 | 4547 |
4548 (defun message-send-mail-with-mh () | |
4549 "Send the prepared message buffer with mh." | |
4550 (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
|
4551 (name (mh-new-draft-name))) |
17493 | 4552 (setq buffer-file-name name) |
4553 ;; MH wants to generate these headers itself. | |
4554 (when message-mh-deletable-headers | |
4555 (let ((headers message-mh-deletable-headers)) | |
4556 (while headers | |
4557 (goto-char (point-min)) | |
4558 (and (re-search-forward | |
4559 (concat "^" (symbol-name (car headers)) ": *") nil t) | |
4560 (message-delete-line)) | |
4561 (pop headers)))) | |
4562 (run-hooks 'message-send-mail-hook) | |
4563 ;; Pass it on to mh. | |
4564 (mh-send-letter))) | |
4565 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4566 (defun message-smtpmail-send-it () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4567 "Send the prepared message buffer with `smtpmail-send-it'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4568 This only differs from `smtpmail-send-it' that this command evaluates |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4569 `message-send-mail-hook' just before sending a message. It is useful |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4570 if your ISP requires the POP-before-SMTP authentication. See the Gnus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4571 manual for details." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4572 (run-hooks 'message-send-mail-hook) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4573 (smtpmail-send-it)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4574 |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
4575 (defun message-send-mail-with-mailclient () |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
4576 "Send the prepared message buffer with `mailclient-send-it'. |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
4577 This only differs from `smtpmail-send-it' that this command evaluates |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
4578 `message-send-mail-hook' just before sending a message." |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
4579 (run-hooks 'message-send-mail-hook) |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
4580 (mailclient-send-it)) |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
4581 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4582 (defun message-canlock-generate () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4583 "Return a string that is non-trivial to guess. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4584 Do not use this for anything important, it is cryptographically weak." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4585 (require 'sha1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4586 (let (sha1-maximum-internal-length) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4587 (sha1 (concat (message-unique-id) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4588 (format "%x%x%x" (random) (random t) (random)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4589 (prin1-to-string (recent-keys)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4590 (prin1-to-string (garbage-collect)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4591 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4592 (defun message-canlock-password () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4593 "The password used by message for cancel locks. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4594 This is the value of `canlock-password', if that option is non-nil. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4595 Otherwise, generate and save a value for `canlock-password' first." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4596 (unless canlock-password |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4597 (customize-save-variable 'canlock-password (message-canlock-generate)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4598 (setq canlock-password-for-verify canlock-password)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4599 canlock-password) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4600 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4601 (defun message-insert-canlock () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4602 (when message-insert-canlock |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4603 (message-canlock-password) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4604 (canlock-insert-header))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4605 |
17493 | 4606 (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
|
4607 (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
|
4608 (case-fold-search nil) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4609 (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
|
4610 (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
|
4611 message-post-method)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4612 (newsgroups-field (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4613 (message-narrow-to-headers-or-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4614 (message-fetch-field "Newsgroups"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4615 (followup-field (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4616 (message-narrow-to-headers-or-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4617 (message-fetch-field "Followup-To"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4618 ;; BUG: We really need to get the charset for each name in the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4619 ;; Newsgroups and Followup-To lines to allow crossposting |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4620 ;; between group namess with incompatible character sets. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4621 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2001-10-08. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4622 (group-field-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4623 (gnus-group-name-charset method newsgroups-field)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4624 (followup-field-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4625 (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
|
4626 (rfc2047-header-encoding-alist |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4627 (append (when group-field-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4628 (list (cons "Newsgroups" group-field-charset))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4629 (when followup-field-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4630 (list (cons "Followup-To" followup-field-charset))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4631 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
|
4632 (messbuf (current-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4633 (message-syntax-checks |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4634 (if (and arg |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4635 (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
|
4636 (cons '(existing-newsgroups . disabled) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4637 message-syntax-checks) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4638 message-syntax-checks)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4639 (message-this-is-news t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4640 (message-posting-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4641 (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
|
4642 result) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4643 (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
|
4644 nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4645 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4646 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4647 ;; Insert some headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4648 (message-generate-headers message-required-news-headers) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4649 (message-insert-canlock) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4650 ;; 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
|
4651 (run-hooks 'message-header-hook)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4652 ;; Note: This check will be disabled by the ".*" default value for |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4653 ;; gnus-group-name-charset-group-alist. -- Pa 2001-10-07. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4654 (when (and group-field-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4655 (listp message-syntax-checks)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4656 (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
|
4657 (cons '(valid-newsgroups . disabled) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4658 message-syntax-checks))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4659 (message-cleanup-headers) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4660 (if (not (let ((message-post-method method)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4661 (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
|
4662 nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4663 (unwind-protect |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
4664 (with-current-buffer tembuf |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4665 (buffer-disable-undo) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4666 (erase-buffer) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4667 ;; Avoid copying text props (except hard newlines). |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4668 (insert |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4669 (with-current-buffer messbuf |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4670 (mml-buffer-substring-no-properties-except-hard-newlines |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4671 (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
|
4672 (message-encode-message-body) |
17493 | 4673 ;; Remove some headers. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4674 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4675 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4676 ;; 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
|
4677 (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
|
4678 (message-generate-headers '(Lines))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4679 ;; Remove some headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4680 (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
|
4681 (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
|
4682 (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
|
4683 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4684 ;; 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
|
4685 (or (= (preceding-char) ?\n) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4686 (insert ?\n)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4687 (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
|
4688 ;; Remove the delimiter. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4689 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4690 (re-search-forward |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4691 (concat "^" (regexp-quote mail-header-separator) "\n")) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4692 (replace-match "\n") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4693 (backward-char 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4694 (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
|
4695 (gnus-open-server method) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4696 (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
|
4697 (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
|
4698 (gnus-request-post method)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4699 (kill-buffer tembuf)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4700 (set-buffer messbuf) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4701 (if result |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4702 (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
|
4703 (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
|
4704 (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
|
4705 nil))))) |
17493 | 4706 |
4707 ;;; | |
4708 ;;; Header generation & syntax checking. | |
4709 ;;; | |
4710 | |
4711 (defun message-check-element (type) | |
35147 | 4712 "Return non-nil if this TYPE is not to be checked." |
17493 | 4713 (if (eq message-syntax-checks 'dont-check-for-anything-just-trust-me) |
4714 t | |
4715 (let ((able (assq type message-syntax-checks))) | |
4716 (and (consp able) | |
4717 (eq (cdr able) 'disabled))))) | |
4718 | |
4719 (defun message-check-news-syntax () | |
4720 "Check the syntax of the message." | |
4721 (save-excursion | |
4722 (save-restriction | |
4723 (widen) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4724 ;; 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
|
4725 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4726 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4727 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4728 (message-check-news-header-syntax)))))) |
17493 | 4729 |
4730 (defun message-check-news-header-syntax () | |
4731 (and | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4732 ;; Check Newsgroups header. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4733 (message-check 'newsgroups |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4734 (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
|
4735 (or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4736 (and group |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4737 (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
|
4738 (ignore |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4739 (message |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4740 "The newsgroups field is empty or missing. Posting is denied."))))) |
17493 | 4741 ;; Check the Subject header. |
4742 (message-check 'subject | |
4743 (let* ((case-fold-search t) | |
4744 (subject (message-fetch-field "subject"))) | |
4745 (or | |
4746 (and subject | |
4747 (not (string-match "\\`[ \t]*\\'" subject))) | |
4748 (ignore | |
4749 (message | |
4750 "The subject field is empty or missing. Posting is denied."))))) | |
4751 ;; Check for commands in Subject. | |
4752 (message-check 'subject-cmsg | |
4753 (if (string-match "^cmsg " (message-fetch-field "subject")) | |
4754 (y-or-n-p | |
4755 "The control code \"cmsg\" is in the subject. Really post? ") | |
4756 t)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4757 ;; Check long header lines. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4758 (message-check 'long-header-lines |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4759 (let ((start (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4760 (header nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4761 (length 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4762 found) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4763 (while (and (not found) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4764 (re-search-forward "^\\([^ \t:]+\\): " nil t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4765 (if (> (- (point) (match-beginning 0)) 998) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4766 (setq found t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4767 length (- (point) (match-beginning 0))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4768 (setq header (match-string-no-properties 1))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4769 (setq start (match-beginning 0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4770 (forward-line 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4771 (if found |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4772 (y-or-n-p (format "Your %s header is too long (%d). Really post? " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4773 header length)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4774 t))) |
17493 | 4775 ;; Check for multiple identical headers. |
4776 (message-check 'multiple-headers | |
4777 (let (found) | |
4778 (while (and (not found) | |
4779 (re-search-forward "^[^ \t:]+: " nil t)) | |
4780 (save-excursion | |
4781 (or (re-search-forward | |
4782 (concat "^" | |
4783 (regexp-quote | |
4784 (setq found | |
4785 (buffer-substring | |
4786 (match-beginning 0) (- (match-end 0) 2)))) | |
4787 ":") | |
4788 nil t) | |
4789 (setq found nil)))) | |
4790 (if found | |
4791 (y-or-n-p (format "Multiple %s headers. Really post? " found)) | |
4792 t))) | |
4793 ;; Check for Version and Sendsys. | |
4794 (message-check 'sendsys | |
4795 (if (re-search-forward "^Sendsys:\\|^Version:" nil t) | |
4796 (y-or-n-p | |
4797 (format "The article contains a %s command. Really post? " | |
4798 (buffer-substring (match-beginning 0) | |
4799 (1- (match-end 0))))) | |
4800 t)) | |
4801 ;; See whether we can shorten Followup-To. | |
4802 (message-check 'shorten-followup-to | |
4803 (let ((newsgroups (message-fetch-field "newsgroups")) | |
4804 (followup-to (message-fetch-field "followup-to")) | |
4805 to) | |
4806 (when (and newsgroups | |
4807 (string-match "," newsgroups) | |
4808 (not followup-to) | |
4809 (not | |
4810 (zerop | |
4811 (length | |
4812 (setq to (completing-read | |
65682
c16795de963a
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65342
diff
changeset
|
4813 "Followups to (default no Followup-To header): " |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4814 (mapcar #'list |
17493 | 4815 (cons "poster" |
4816 (message-tokenize-header | |
4817 newsgroups))))))))) | |
4818 (goto-char (point-min)) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4819 (insert "Followup-To: " to "\n")) |
17493 | 4820 t)) |
4821 ;; Check "Shoot me". | |
4822 (message-check 'shoot | |
4823 (if (re-search-forward | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4824 "Message-ID.*.i-did-not-set--mail-host-address--so-tickle-me" nil t) |
17493 | 4825 (y-or-n-p "You appear to have a misconfigured system. Really post? ") |
4826 t)) | |
4827 ;; Check for Approved. | |
4828 (message-check 'approved | |
4829 (if (re-search-forward "^Approved:" nil t) | |
4830 (y-or-n-p "The article contains an Approved header. Really post? ") | |
4831 t)) | |
4832 ;; Check the Message-ID header. | |
4833 (message-check 'message-id | |
4834 (let* ((case-fold-search t) | |
4835 (message-id (message-fetch-field "message-id" t))) | |
4836 (or (not message-id) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4837 ;; Is there an @ in the ID? |
17493 | 4838 (and (string-match "@" message-id) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4839 ;; 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
|
4840 (string-match "@[^.]*\\." message-id) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4841 ;; 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
|
4842 (not (string-match "\\.>" message-id))) |
17493 | 4843 (y-or-n-p |
4844 (format "The Message-ID looks strange: \"%s\". Really post? " | |
4845 message-id))))) | |
4846 ;; Check the Newsgroups & Followup-To headers. | |
4847 (message-check 'existing-newsgroups | |
4848 (let* ((case-fold-search t) | |
4849 (newsgroups (message-fetch-field "newsgroups")) | |
4850 (followup-to (message-fetch-field "followup-to")) | |
4851 (groups (message-tokenize-header | |
4852 (if followup-to | |
4853 (concat newsgroups "," followup-to) | |
4854 newsgroups))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4855 (post-method (if (functionp message-post-method) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4856 (funcall message-post-method) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4857 message-post-method)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4858 ;; KLUDGE to handle nnvirtual groups. Doing this right |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4859 ;; would probably involve a new nnoo function. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4860 ;; -- Per Abrahamsen <abraham@dina.kvl.dk>, 2001-10-17. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4861 (method (if (and (consp post-method) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4862 (eq (car post-method) 'nnvirtual) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4863 gnus-message-group-art) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4864 (let ((group (car (nnvirtual-find-group-art |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4865 (car gnus-message-group-art) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4866 (cdr gnus-message-group-art))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4867 (gnus-find-method-for-group group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4868 post-method)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4869 (known-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4870 (mapcar (lambda (n) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4871 (gnus-group-name-decode |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4872 (gnus-group-real-name n) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4873 (gnus-group-name-charset method n))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4874 (gnus-groups-from-server method))) |
17493 | 4875 errors) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4876 (while groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4877 (when (and (not (equal (car groups) "poster")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4878 (not (member (car groups) known-groups)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4879 (not (member (car groups) errors))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4880 (push (car groups) errors)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4881 (pop groups)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4882 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4883 ;; Gnus is not running. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4884 ((or (not (and (boundp 'gnus-active-hashtb) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4885 gnus-active-hashtb)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4886 (not (boundp 'gnus-read-active-file))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4887 t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4888 ;; We don't have all the group names. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4889 ((and (or (not gnus-read-active-file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4890 (eq gnus-read-active-file 'some)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4891 errors) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4892 (y-or-n-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4893 (format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4894 "Really use %s possibly unknown group%s: %s? " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4895 (if (= (length errors) 1) "this" "these") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4896 (if (= (length errors) 1) "" "s") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4897 (mapconcat 'identity errors ", ")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4898 ;; There were no errors. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4899 ((not errors) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4900 t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4901 ;; There are unknown groups. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4902 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4903 (y-or-n-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4904 (format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4905 "Really post to %s unknown group%s: %s? " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4906 (if (= (length errors) 1) "this" "these") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4907 (if (= (length errors) 1) "" "s") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4908 (mapconcat 'identity errors ", "))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4909 ;; Check continuation headers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4910 (message-check 'continuation-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4911 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4912 (let ((do-posting t)) |
71379 | 4913 (while (re-search-forward "^[^ \t\n][^ \t\n:]*[ \t\n]" nil t) |
4914 (goto-char (match-beginning 0)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4915 (if (y-or-n-p "Fix continuation lines? ") |
71379 | 4916 (insert " ") |
4917 (forward-line 1) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4918 (unless (y-or-n-p "Send anyway? ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4919 (setq do-posting nil)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4920 do-posting)) |
17493 | 4921 ;; Check the Newsgroups & Followup-To headers for syntax errors. |
4922 (message-check 'valid-newsgroups | |
4923 (let ((case-fold-search t) | |
4924 (headers '("Newsgroups" "Followup-To")) | |
4925 header error) | |
4926 (while (and headers (not error)) | |
4927 (when (setq header (mail-fetch-field (car headers))) | |
4928 (if (or | |
4929 (not | |
4930 (string-match | |
4931 "\\`\\([-+_&.a-zA-Z0-9]+\\)?\\(,[-+_&.a-zA-Z0-9]+\\)*\\'" | |
4932 header)) | |
4933 (memq | |
4934 nil (mapcar | |
4935 (lambda (g) | |
4936 (not (string-match "\\.\\'\\|\\.\\." g))) | |
4937 (message-tokenize-header header ",")))) | |
4938 (setq error t))) | |
4939 (unless error | |
4940 (pop headers))) | |
4941 (if (not error) | |
4942 t | |
4943 (y-or-n-p | |
4944 (format "The %s header looks odd: \"%s\". Really post? " | |
4945 (car headers) header))))) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4946 (message-check 'repeated-newsgroups |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4947 (let ((case-fold-search t) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4948 (headers '("Newsgroups" "Followup-To")) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4949 header error groups group) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4950 (while (and headers |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4951 (not error)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4952 (when (setq header (mail-fetch-field (pop headers))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4953 (setq groups (message-tokenize-header header ",")) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4954 (while (setq group (pop groups)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4955 (when (member group groups) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4956 (setq error group |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4957 groups nil))))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4958 (if (not error) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4959 t |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4960 (y-or-n-p |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4961 (format "Group %s is repeated in headers. Really post? " error))))) |
17493 | 4962 ;; Check the From header. |
4963 (message-check 'from | |
4964 (let* ((case-fold-search t) | |
4965 (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
|
4966 ad) |
17493 | 4967 (cond |
4968 ((not from) | |
4969 (message "There is no From line. Posting is denied.") | |
4970 nil) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4971 ((or (not (string-match |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4972 "@[^\\.]*\\." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4973 (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
|
4974 from))))) ;larsi@ifi |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4975 (string-match "\\.\\." ad) ;larsi@ifi..uio |
17493 | 4976 (string-match "@\\." ad) ;larsi@.ifi.uio |
4977 (string-match "\\.$" ad) ;larsi@ifi.uio. | |
4978 (not (string-match "^[^@]+@[^@]+$" ad)) ;larsi.ifi.uio | |
4979 (string-match "(.*).*(.*)" from)) ;(lars) (lars) | |
4980 (message | |
4981 "Denied posting -- the From looks strange: \"%s\"." from) | |
4982 nil) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4983 ((let ((addresses (rfc822-addresses from))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4984 (while (and addresses |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4985 (not (eq (string-to-char (car addresses)) ?\())) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4986 (setq addresses (cdr addresses))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4987 addresses) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4988 (message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4989 "Denied posting -- bad From address: \"%s\"." from) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4990 nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4991 (t t)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4992 ;; Check the Reply-To header. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4993 (message-check 'reply-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4994 (let* ((case-fold-search t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4995 (reply-to (message-fetch-field "reply-to")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4996 ad) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4997 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4998 ((not reply-to) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4999 t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5000 ((string-match "," reply-to) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5001 (y-or-n-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5002 (format "Multiple Reply-To addresses: \"%s\". Really post? " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5003 reply-to))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5004 ((or (not (string-match |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5005 "@[^\\.]*\\." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5006 (setq ad (nth 1 (mail-extract-address-components |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5007 reply-to))))) ;larsi@ifi |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5008 (string-match "\\.\\." ad) ;larsi@ifi..uio |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5009 (string-match "@\\." ad) ;larsi@.ifi.uio |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5010 (string-match "\\.$" ad) ;larsi@ifi.uio. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5011 (not (string-match "^[^@]+@[^@]+$" ad)) ;larsi.ifi.uio |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5012 (string-match "(.*).*(.*)" reply-to)) ;(lars) (lars) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5013 (y-or-n-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5014 (format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5015 "The Reply-To looks strange: \"%s\". Really post? " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5016 reply-to))) |
17493 | 5017 (t t)))))) |
5018 | |
5019 (defun message-check-news-body-syntax () | |
5020 (and | |
5021 ;; Check for long lines. | |
5022 (message-check 'long-lines | |
5023 (goto-char (point-min)) | |
5024 (re-search-forward | |
5025 (concat "^" (regexp-quote mail-header-separator) "$")) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5026 (forward-line 1) |
17493 | 5027 (while (and |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5028 (or (looking-at |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5029 "<#\\(/\\)?\\(multipart\\|part\\|external\\|mml\\)") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5030 (let ((p (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5031 (end-of-line) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5032 (< (- (point) p) 80))) |
17493 | 5033 (zerop (forward-line 1)))) |
5034 (or (bolp) | |
5035 (eobp) | |
5036 (y-or-n-p | |
5037 "You have lines longer than 79 characters. Really post? "))) | |
5038 ;; Check whether the article is empty. | |
5039 (message-check 'empty | |
5040 (goto-char (point-min)) | |
5041 (re-search-forward | |
5042 (concat "^" (regexp-quote mail-header-separator) "$")) | |
5043 (forward-line 1) | |
5044 (let ((b (point))) | |
5045 (goto-char (point-max)) | |
5046 (re-search-backward message-signature-separator nil t) | |
5047 (beginning-of-line) | |
5048 (or (re-search-backward "[^ \n\t]" b t) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5049 (if (message-gnksa-enable-p 'empty-article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5050 (y-or-n-p "Empty article. Really post? ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5051 (message "Denied posting -- Empty article.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5052 nil)))) |
17493 | 5053 ;; Check for control characters. |
5054 (message-check 'control-chars | |
57321
3381cb76bac3
* gnus-group.el (gnus-update-group-mark-positions):
Juri Linkov <juri@jurta.org>
parents:
57243
diff
changeset
|
5055 (if (re-search-forward |
85766
68503cda7180
(message-check-news-body-syntax): Avoid mm-string-as-multibyte.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
85712
diff
changeset
|
5056 (mm-string-to-multibyte "[\000-\007\013\015-\032\034-\037\200-\237]") |
57321
3381cb76bac3
* gnus-group.el (gnus-update-group-mark-positions):
Juri Linkov <juri@jurta.org>
parents:
57243
diff
changeset
|
5057 nil t) |
17493 | 5058 (y-or-n-p |
5059 "The article contains control characters. Really post? ") | |
5060 t)) | |
5061 ;; Check excessive size. | |
5062 (message-check 'size | |
5063 (if (> (buffer-size) 60000) | |
5064 (y-or-n-p | |
5065 (format "The article is %d octets long. Really post? " | |
5066 (buffer-size))) | |
5067 t)) | |
5068 ;; Check whether any new text has been added. | |
5069 (message-check 'new-text | |
5070 (or | |
5071 (not message-checksum) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5072 (not (eq (message-checksum) message-checksum)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5073 (if (message-gnksa-enable-p 'quoted-text-only) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5074 (y-or-n-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5075 "It looks like no new text has been added. Really post? ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5076 (message "Denied posting -- no new text has been added.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5077 nil))) |
17493 | 5078 ;; Check the length of the signature. |
5079 (message-check 'signature | |
5080 (goto-char (point-max)) | |
93386 | 5081 (if (not (re-search-backward message-signature-separator nil t)) |
5082 t | |
5083 (if (>= (count-lines (1+ (point-at-eol)) (point-max)) 5) | |
5084 (if (message-gnksa-enable-p 'signature) | |
5085 (y-or-n-p | |
5086 (format "Signature is excessively long (%d lines). Really post? " | |
5087 (count-lines (1+ (point-at-eol)) (point-max)))) | |
5088 (message "Denied posting -- Excessive signature.") | |
5089 nil) | |
5090 t))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5091 ;; 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
|
5092 (message-check 'quoting-style |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5093 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5094 (let ((no-problem t)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5095 (when (search-backward-regexp "^>[^\n]*\n" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5096 (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
|
5097 (if no-problem |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5098 t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5099 (if (message-gnksa-enable-p 'quoted-text-only) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5100 (y-or-n-p "Your text should follow quoted text. Really post? ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5101 ;; Ensure that |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5102 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5103 (re-search-forward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5104 (concat "^" (regexp-quote mail-header-separator) "$")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5105 (if (search-forward-regexp "^[ \t]*[^>\n]" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5106 (y-or-n-p "Your text should follow quoted text. Really post? ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5107 (message "Denied posting -- only quoted text.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5108 nil))))))) |
17493 | 5109 |
5110 (defun message-checksum () | |
5111 "Return a \"checksum\" for the current buffer." | |
5112 (let ((sum 0)) | |
5113 (save-excursion | |
5114 (goto-char (point-min)) | |
5115 (re-search-forward | |
5116 (concat "^" (regexp-quote mail-header-separator) "$")) | |
5117 (while (not (eobp)) | |
5118 (when (not (looking-at "[ \t\n]")) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5119 (setq sum (logxor (ash sum 1) (if (natnump sum) 0 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5120 (char-after)))) |
17493 | 5121 (forward-char 1))) |
5122 sum)) | |
5123 | |
5124 (defun message-do-fcc () | |
5125 "Process Fcc headers in the current buffer." | |
5126 (let ((case-fold-search t) | |
5127 (buf (current-buffer)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5128 list file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5129 (mml-externalize-attachments message-fcc-externalize-attachments)) |
17493 | 5130 (save-excursion |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5131 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5132 (message-narrow-to-headers) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5133 (setq file (message-fetch-field "fcc" t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5134 (when file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5135 (set-buffer (get-buffer-create " *message temp*")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5136 (erase-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5137 (insert-buffer-substring buf) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5138 (message-encode-message-body) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5139 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5140 (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5141 (while (setq file (message-fetch-field "fcc" t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5142 (push file list) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5143 (message-remove-header "fcc" nil t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5144 (let ((mail-parse-charset message-default-charset) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5145 (rfc2047-header-encoding-alist |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5146 (cons '("Newsgroups" . default) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5147 rfc2047-header-encoding-alist))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5148 (mail-encode-encoded-word-buffer))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5149 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5150 (when (re-search-forward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5151 (concat "^" (regexp-quote mail-header-separator) "$") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5152 nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5153 (replace-match "" t t )) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5154 ;; Process FCC operations. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5155 (while list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5156 (setq file (pop list)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5157 (if (string-match "^[ \t]*|[ \t]*\\(.*\\)[ \t]*$" file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5158 ;; Pipe the article to the program in question. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5159 (call-process-region (point-min) (point-max) shell-file-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5160 nil nil nil shell-command-switch |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5161 (match-string 1 file)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5162 ;; Save the article. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5163 (setq file (expand-file-name file)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5164 (unless (file-exists-p (file-name-directory file)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5165 (make-directory (file-name-directory file) t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5166 (if (and message-fcc-handler-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5167 (not (eq message-fcc-handler-function 'rmail-output))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5168 (funcall message-fcc-handler-function file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5169 (if (and (file-readable-p file) (mail-file-babyl-p file)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5170 (rmail-output file 1 nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5171 (let ((mail-use-rfc822 t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5172 (rmail-output file 1 t t)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5173 (kill-buffer (current-buffer)))))) |
17493 | 5174 |
5175 (defun message-output (filename) | |
35147 | 5176 "Append this article to Unix/babyl mail file FILENAME." |
17493 | 5177 (if (and (file-readable-p filename) |
5178 (mail-file-babyl-p filename)) | |
5179 (gnus-output-to-rmail filename t) | |
5180 (gnus-output-to-mail filename t))) | |
5181 | |
5182 (defun message-cleanup-headers () | |
5183 "Do various automatic cleanups of the headers." | |
5184 ;; Remove empty lines in the header. | |
5185 (save-restriction | |
5186 (message-narrow-to-headers) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5187 ;; Remove blank lines. |
17493 | 5188 (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
|
5189 (replace-match "" t t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5190 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5191 ;; 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
|
5192 ;; 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
|
5193 ;; embedded line breaks. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5194 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5195 (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
|
5196 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5197 (narrow-to-region |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5198 (point) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5199 (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
|
5200 (match-beginning 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5201 (forward-line 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5202 (point))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5203 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5204 (while (re-search-forward "\n[ \t]+" nil t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5205 (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
|
5206 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5207 (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
|
5208 (replace-match "," t t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5209 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5210 ;; Remove trailing commas. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5211 (when (re-search-forward ",+$" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5212 (replace-match "" t t)))))) |
17493 | 5213 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5214 (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
|
5215 "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
|
5216 If NOW, use that time instead." |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5217 (let ((system-time-locale "C")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5218 (format-time-string "%a, %d %b %Y %T %z" now))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5219 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5220 (defun message-insert-expires (days) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5221 "Insert the Expires header. Expiry in DAYS days." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5222 (interactive "NExpire article in how many days? ") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5223 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5224 (message-position-on-field "Expires" "X-Draft-From") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5225 (insert (message-make-expires-date days)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5226 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5227 (defun message-make-expires-date (days) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5228 "Make date string for the Expires header. Expiry in DAYS days. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5229 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5230 In posting styles use `(\"Expires\" (make-expires-date 30))'." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5231 (let* ((cur (decode-time (current-time))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5232 (nday (+ days (nth 3 cur)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5233 (setf (nth 3 cur) nday) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5234 (message-make-date (apply 'encode-time cur)))) |
17493 | 5235 |
5236 (defun message-make-message-id () | |
5237 "Make a unique Message-ID." | |
5238 (concat "<" (message-unique-id) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5239 (let ((psubject (save-excursion (message-fetch-field "subject"))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5240 (psupersedes |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5241 (save-excursion (message-fetch-field "supersedes")))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5242 (if (or |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5243 (and message-reply-headers |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5244 (mail-header-references message-reply-headers) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5245 (mail-header-subject message-reply-headers) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5246 psubject |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5247 (not (string= |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5248 (message-strip-subject-re |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5249 (mail-header-subject message-reply-headers)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5250 (message-strip-subject-re psubject)))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5251 (and psupersedes |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5252 (string-match "_-_@" psupersedes))) |
17493 | 5253 "_-_" "")) |
5254 "@" (message-make-fqdn) ">")) | |
5255 | |
5256 (defvar message-unique-id-char nil) | |
5257 | |
5258 ;; If you ever change this function, make sure the new version | |
5259 ;; cannot generate IDs that the old version could. | |
5260 ;; You might for example insert a "." somewhere (not next to another dot | |
5261 ;; or string boundary), or modify the "fsf" string. | |
5262 (defun message-unique-id () | |
5263 ;; Don't use microseconds from (current-time), they may be unsupported. | |
5264 ;; Instead we use this randomly inited counter. | |
5265 (setq message-unique-id-char | |
5266 (% (1+ (or message-unique-id-char (logand (random t) (1- (lsh 1 20))))) | |
5267 ;; (current-time) returns 16-bit ints, | |
5268 ;; and 2^16*25 just fits into 4 digits i base 36. | |
5269 (* 25 25))) | |
5270 (let ((tm (current-time))) | |
5271 (concat | |
69572
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
69135
diff
changeset
|
5272 (if (or (memq system-type '(ms-dos emx vax-vms)) |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
69135
diff
changeset
|
5273 ;; message-number-base36 doesn't handle bigints. |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
69135
diff
changeset
|
5274 (floatp (user-uid))) |
17493 | 5275 (let ((user (downcase (user-login-name)))) |
5276 (while (string-match "[^a-z0-9_]" user) | |
5277 (aset user (match-beginning 0) ?_)) | |
5278 user) | |
5279 (message-number-base36 (user-uid) -1)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5280 (message-number-base36 (+ (car tm) |
17493 | 5281 (lsh (% message-unique-id-char 25) 16)) 4) |
5282 (message-number-base36 (+ (nth 1 tm) | |
5283 (lsh (/ message-unique-id-char 25) 16)) 4) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5284 ;; Append a given name, because while the generated ID is unique |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5285 ;; to this newsreader, other newsreaders might otherwise generate |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5286 ;; the same ID via another algorithm. |
17493 | 5287 ".fsf"))) |
5288 | |
5289 (defun message-number-base36 (num len) | |
5290 (if (if (< len 0) | |
5291 (<= num 0) | |
5292 (= len 0)) | |
5293 "" | |
5294 (concat (message-number-base36 (/ num 36) (1- len)) | |
5295 (char-to-string (aref "zyxwvutsrqponmlkjihgfedcba9876543210" | |
5296 (% num 36)))))) | |
5297 | |
5298 (defun message-make-organization () | |
5299 "Make an Organization header." | |
5300 (let* ((organization | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5301 (when message-user-organization |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5302 (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
|
5303 (funcall message-user-organization) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5304 message-user-organization)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5305 (with-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5306 (mm-enable-multibyte) |
17493 | 5307 (cond ((stringp organization) |
5308 (insert organization)) | |
5309 ((and (eq t organization) | |
5310 message-user-organization-file | |
5311 (file-exists-p message-user-organization-file)) | |
5312 (insert-file-contents message-user-organization-file))) | |
5313 (goto-char (point-min)) | |
5314 (while (re-search-forward "[\t\n]+" nil t) | |
5315 (replace-match "" t t)) | |
5316 (unless (zerop (buffer-size)) | |
5317 (buffer-string))))) | |
5318 | |
5319 (defun message-make-lines () | |
5320 "Count the number of lines and return numeric string." | |
5321 (save-excursion | |
5322 (save-restriction | |
5323 (widen) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5324 (message-goto-body) |
17493 | 5325 (int-to-string (count-lines (point) (point-max)))))) |
5326 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5327 (defun message-make-references () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5328 "Return the References header for this message." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5329 (when message-reply-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5330 (let ((message-id (mail-header-message-id message-reply-headers)) |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
5331 (references (mail-header-references message-reply-headers))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5332 (if (or references message-id) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5333 (concat (or references "") (and references " ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5334 (or message-id "")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5335 nil)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5336 |
17493 | 5337 (defun message-make-in-reply-to () |
5338 "Return the In-Reply-To header for this message." | |
5339 (when message-reply-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5340 (let ((from (mail-header-from message-reply-headers)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5341 (date (mail-header-date message-reply-headers)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5342 (msg-id (mail-header-message-id message-reply-headers))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5343 (when from |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5344 (let ((name (mail-extract-address-components from))) |
76267 | 5345 (concat |
5346 msg-id (if msg-id " (") | |
5347 (if (car name) | |
5348 (if (string-match "[^\000-\177]" (car name)) | |
5349 ;; Quote a string containing non-ASCII characters. | |
5350 ;; It will make the RFC2047 encoder cause an error | |
5351 ;; if there are special characters. | |
93394
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5352 (mm-with-multibyte-buffer |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5353 (insert (car name)) |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5354 (goto-char (point-min)) |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5355 (while (search-forward "\"" nil t) |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5356 (when (prog2 |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5357 (backward-char) |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5358 (zerop (% (skip-chars-backward "\\\\") 2)) |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5359 (goto-char (match-beginning 0))) |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5360 (insert "\\")) |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5361 (forward-char)) |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5362 ;; Those quotes will be removed by the RFC2047 encoder. |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5363 (concat "\"" (buffer-string) "\"")) |
76267 | 5364 (car name)) |
5365 (nth 1 name)) | |
5366 "'s message of \"" | |
5367 (if (or (not date) (string= date "")) | |
5368 "(unknown date)" date) | |
5369 "\"" (if msg-id ")"))))))) | |
17493 | 5370 |
5371 (defun message-make-distribution () | |
5372 "Make a Distribution header." | |
5373 (let ((orig-distribution (message-fetch-reply-field "distribution"))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5374 (cond ((functionp message-distribution-function) |
17493 | 5375 (funcall message-distribution-function)) |
5376 (t orig-distribution)))) | |
5377 | |
5378 (defun message-make-expires () | |
5379 "Return an Expires header based on `message-expires'." | |
5380 (let ((current (current-time)) | |
5381 (future (* 1.0 message-expires 60 60 24))) | |
5382 ;; Add the future to current. | |
5383 (setcar current (+ (car current) (round (/ future (expt 2 16))))) | |
5384 (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
|
5385 (message-make-date current))) |
17493 | 5386 |
5387 (defun message-make-path () | |
5388 "Return uucp path." | |
5389 (let ((login-name (user-login-name))) | |
5390 (cond ((null message-user-path) | |
5391 (concat (system-name) "!" login-name)) | |
5392 ((stringp message-user-path) | |
5393 ;; Support GENERICPATH. Suggested by vixie@decwrl.dec.com. | |
5394 (concat message-user-path "!" login-name)) | |
5395 (t login-name)))) | |
5396 | |
85888 | 5397 (defun message-make-from (&optional name address) |
17493 | 5398 "Make a From header." |
5399 (let* ((style message-from-style) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5400 (login (or address (message-make-address))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5401 (fullname (or name |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5402 (and (boundp 'user-full-name) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5403 user-full-name) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5404 (user-full-name)))) |
17493 | 5405 (when (string= fullname "&") |
5406 (setq fullname (user-login-name))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5407 (with-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5408 (mm-enable-multibyte) |
17493 | 5409 (cond |
5410 ((or (null style) | |
5411 (equal fullname "")) | |
5412 (insert login)) | |
5413 ((or (eq style 'angles) | |
5414 (and (not (eq style 'parens)) | |
5415 ;; Use angles if no quoting is needed, or if parens would | |
5416 ;; need quoting too. | |
5417 (or (not (string-match "[^- !#-'*+/-9=?A-Z^-~]" fullname)) | |
5418 (let ((tmp (concat fullname nil))) | |
5419 (while (string-match "([^()]*)" tmp) | |
5420 (aset tmp (match-beginning 0) ?-) | |
5421 (aset tmp (1- (match-end 0)) ?-)) | |
5422 (string-match "[\\()]" tmp))))) | |
5423 (insert fullname) | |
5424 (goto-char (point-min)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5425 ;; Look for a character that cannot appear unquoted |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5426 ;; according to RFC 822. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5427 (when (re-search-forward "[^- !#-'*+/-9=?A-Z^-~]" nil 1) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5428 ;; Quote fullname, escaping specials. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5429 (goto-char (point-min)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5430 (insert "\"") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5431 (while (re-search-forward "[\"\\]" nil 1) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5432 (replace-match "\\\\\\&" t)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5433 (insert "\"")) |
17493 | 5434 (insert " <" login ">")) |
5435 (t ; 'parens or default | |
5436 (insert login " (") | |
5437 (let ((fullname-start (point))) | |
5438 (insert fullname) | |
5439 (goto-char fullname-start) | |
5440 ;; RFC 822 says \ and nonmatching parentheses | |
5441 ;; must be escaped in comments. | |
5442 ;; Escape every instance of ()\ ... | |
5443 (while (re-search-forward "[()\\]" nil 1) | |
5444 (replace-match "\\\\\\&" t)) | |
5445 ;; ... then undo escaping of matching parentheses, | |
5446 ;; including matching nested parentheses. | |
5447 (goto-char fullname-start) | |
5448 (while (re-search-forward | |
5449 "\\(\\=\\|[^\\]\\(\\\\\\\\\\)*\\)\\\\(\\(\\([^\\]\\|\\\\\\\\\\)*\\)\\\\)" | |
5450 nil 1) | |
5451 (replace-match "\\1(\\3)" t) | |
5452 (goto-char fullname-start))) | |
5453 (insert ")"))) | |
5454 (buffer-string)))) | |
5455 | |
5456 (defun message-make-sender () | |
5457 "Return the \"real\" user address. | |
5458 This function tries to ignore all user modifications, and | |
5459 give as trustworthy answer as possible." | |
5460 (concat (user-login-name) "@" (system-name))) | |
5461 | |
5462 (defun message-make-address () | |
5463 "Make the address of the user." | |
5464 (or (message-user-mail-address) | |
5465 (concat (user-login-name) "@" (message-make-domain)))) | |
5466 | |
5467 (defun message-user-mail-address () | |
5468 "Return the pertinent part of `user-mail-address'." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5469 (when (and user-mail-address |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5470 (string-match "@.*\\." user-mail-address)) |
17493 | 5471 (if (string-match " " user-mail-address) |
5472 (nth 1 (mail-extract-address-components user-mail-address)) | |
5473 user-mail-address))) | |
5474 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5475 (defun message-sendmail-envelope-from () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5476 "Return the envelope from." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5477 (cond ((eq message-sendmail-envelope-from 'header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5478 (nth 1 (mail-extract-address-components |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5479 (message-fetch-field "from")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5480 ((stringp message-sendmail-envelope-from) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5481 message-sendmail-envelope-from) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5482 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5483 (message-make-address)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5484 |
17493 | 5485 (defun message-make-fqdn () |
5486 "Return user's fully qualified domain name." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5487 (let* ((system-name (system-name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5488 (user-mail (message-user-mail-address)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5489 (user-domain |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5490 (if (and user-mail |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5491 (string-match "@\\(.*\\)\\'" user-mail)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5492 (match-string 1 user-mail))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5493 (case-fold-search t)) |
17493 | 5494 (cond |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5495 ((and message-user-fqdn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5496 (stringp message-user-fqdn) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5497 (string-match message-valid-fqdn-regexp message-user-fqdn) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5498 (not (string-match message-bogus-system-names message-user-fqdn))) |
74984 | 5499 ;; `message-user-fqdn' seems to be valid |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5500 message-user-fqdn) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5501 ((and (string-match message-valid-fqdn-regexp system-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5502 (not (string-match message-bogus-system-names system-name))) |
17493 | 5503 ;; `system-name' returned the right result. |
5504 system-name) | |
5505 ;; Try `mail-host-address'. | |
5506 ((and (boundp 'mail-host-address) | |
5507 (stringp mail-host-address) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5508 (string-match message-valid-fqdn-regexp mail-host-address) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5509 (not (string-match message-bogus-system-names mail-host-address))) |
17493 | 5510 mail-host-address) |
5511 ;; We try `user-mail-address' as a backup. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5512 ((and user-domain |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5513 (stringp user-domain) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5514 (string-match message-valid-fqdn-regexp user-domain) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5515 (not (string-match message-bogus-system-names user-domain))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5516 user-domain) |
17493 | 5517 ;; Default to this bogus thing. |
5518 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5519 (concat system-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5520 ".i-did-not-set--mail-host-address--so-tickle-me"))))) |
17493 | 5521 |
5522 (defun message-make-host-name () | |
5523 "Return the name of the host." | |
5524 (let ((fqdn (message-make-fqdn))) | |
5525 (string-match "^[^.]+\\." fqdn) | |
5526 (substring fqdn 0 (1- (match-end 0))))) | |
5527 | |
5528 (defun message-make-domain () | |
5529 "Return the domain name." | |
5530 (or mail-host-address | |
5531 (message-make-fqdn))) | |
5532 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5533 (defun message-to-list-only () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5534 "Send a message to the list only. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5535 Remove all addresses but the list address from To and Cc headers." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5536 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5537 (let ((listaddr (message-make-mail-followup-to t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5538 (when listaddr |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5539 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5540 (message-remove-header "to") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5541 (message-remove-header "cc") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5542 (message-position-on-field "To" "X-Draft-From") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5543 (insert listaddr))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5544 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5545 (defun message-make-mail-followup-to (&optional only-show-subscribed) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5546 "Return the Mail-Followup-To header. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5547 If passed the optional argument ONLY-SHOW-SUBSCRIBED only return the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5548 subscribed address (and not the additional To and Cc header contents)." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5549 (let* ((case-fold-search t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5550 (to (message-fetch-field "To")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5551 (cc (message-fetch-field "cc")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5552 (msg-recipients (concat to (and to cc ", ") cc)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5553 (recipients |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5554 (mapcar 'mail-strip-quoted-names |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5555 (message-tokenize-header msg-recipients))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5556 (file-regexps |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5557 (if message-subscribed-address-file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5558 (let (begin end item re) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5559 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5560 (with-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5561 (insert-file-contents message-subscribed-address-file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5562 (while (not (eobp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5563 (setq begin (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5564 (forward-line 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5565 (setq end (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5566 (if (bolp) (setq end (1- end))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5567 (setq item (regexp-quote (buffer-substring begin end))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5568 (if re (setq re (concat re "\\|" item)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5569 (setq re (concat "\\`\\(" item)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5570 (and re (list (concat re "\\)\\'")))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5571 (mft-regexps (apply 'append message-subscribed-regexps |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5572 (mapcar 'regexp-quote |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5573 message-subscribed-addresses) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5574 file-regexps |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5575 (mapcar 'funcall |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5576 message-subscribed-address-functions)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5577 (save-match-data |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
5578 (let ((list |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5579 (loop for recipient in recipients |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5580 when (loop for regexp in mft-regexps |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5581 when (string-match regexp recipient) return t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5582 return recipient))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5583 (when list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5584 (if only-show-subscribed |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5585 list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5586 msg-recipients)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5587 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5588 (defun message-idna-to-ascii-rhs-1 (header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5589 "Interactively potentially IDNA encode domain names in HEADER." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5590 (let ((field (message-fetch-field header)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5591 rhs ace address) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5592 (when field |
65719
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
5593 (dolist (rhs |
65846
a4e8d78ae3fb
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-574
Miles Bader <miles@gnu.org>
parents:
65742
diff
changeset
|
5594 (mm-delete-duplicates |
65719
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
5595 (mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) "")) |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
5596 (mapcar 'downcase |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
5597 (mapcar |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
5598 'car (mail-header-parse-addresses field)))))) |
87097 | 5599 (setq ace (if (string-match "\\`[[:ascii:]]+\\'" rhs) |
5600 rhs | |
5601 (downcase (idna-to-ascii rhs)))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5602 (when (and (not (equal rhs ace)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5603 (or (not (eq message-use-idna 'ask)) |
65719
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
5604 (y-or-n-p (format "Replace %s with %s in %s:? " |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
5605 rhs ace header)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5606 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5607 (while (re-search-forward (concat "^" header ":") nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5608 (message-narrow-to-field) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5609 (while (search-forward (concat "@" rhs) nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5610 (replace-match (concat "@" ace) t t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5611 (goto-char (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5612 (widen))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5613 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5614 (defun message-idna-to-ascii-rhs () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5615 "Possibly IDNA encode non-ASCII domain names in From:, To: and Cc: headers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5616 See `message-idna-encode'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5617 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5618 (when message-use-idna |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5619 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5620 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5621 (message-narrow-to-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5622 (message-idna-to-ascii-rhs-1 "From") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5623 (message-idna-to-ascii-rhs-1 "To") |
65719
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
5624 (message-idna-to-ascii-rhs-1 "Reply-To") |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
5625 (message-idna-to-ascii-rhs-1 "Mail-Reply-To") |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
5626 (message-idna-to-ascii-rhs-1 "Mail-Followup-To") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5627 (message-idna-to-ascii-rhs-1 "Cc"))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5628 |
17493 | 5629 (defun message-generate-headers (headers) |
5630 "Prepare article HEADERS. | |
5631 Headers already prepared in the buffer are not modified." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5632 (setq headers (append headers message-required-headers)) |
17493 | 5633 (save-restriction |
5634 (message-narrow-to-headers) | |
5635 (let* ((Date (message-make-date)) | |
5636 (Message-ID (message-make-message-id)) | |
5637 (Organization (message-make-organization)) | |
5638 (From (message-make-from)) | |
5639 (Path (message-make-path)) | |
5640 (Subject nil) | |
5641 (Newsgroups nil) | |
5642 (In-Reply-To (message-make-in-reply-to)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5643 (References (message-make-references)) |
17493 | 5644 (To nil) |
5645 (Distribution (message-make-distribution)) | |
5646 (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
|
5647 (User-Agent message-newsreader) |
17493 | 5648 (Expires (message-make-expires)) |
5649 (case-fold-search t) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5650 (optionalp nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5651 header value elem header-string) |
17493 | 5652 ;; First we remove any old generated headers. |
5653 (let ((headers message-deletable-headers)) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5654 (unless (buffer-modified-p) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5655 (setq headers (delq 'Message-ID (copy-sequence headers)))) |
17493 | 5656 (while headers |
5657 (goto-char (point-min)) | |
5658 (and (re-search-forward | |
5659 (concat "^" (symbol-name (car headers)) ": *") nil t) | |
5660 (get-text-property (1+ (match-beginning 0)) 'message-deletable) | |
5661 (message-delete-line)) | |
5662 (pop headers))) | |
5663 ;; Go through all the required headers and see if they are in the | |
5664 ;; articles already. If they are not, or are empty, they are | |
5665 ;; inserted automatically - except for Subject, Newsgroups and | |
5666 ;; Distribution. | |
5667 (while headers | |
5668 (goto-char (point-min)) | |
5669 (setq elem (pop headers)) | |
5670 (if (consp elem) | |
5671 (if (eq (car elem) 'optional) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5672 (setq header (cdr elem) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5673 optionalp t) |
17493 | 5674 (setq header (car elem))) |
5675 (setq header elem)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5676 (setq header-string (if (stringp header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5677 header |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5678 (symbol-name header))) |
17493 | 5679 (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
|
5680 (concat "^" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5681 (regexp-quote (downcase header-string)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5682 ":") |
17493 | 5683 nil t)) |
5684 (progn | |
5685 ;; The header was found. We insert a space after the | |
5686 ;; 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
|
5687 (if (/= (char-after) ? ) (insert " ") (forward-char 1)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5688 ;; 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
|
5689 (looking-at "[ \t]*\n[^ \t]"))) |
17493 | 5690 ;; So we find out what value we should insert. |
5691 (setq value | |
5692 (cond | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5693 ((and (consp elem) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5694 (eq (car elem) 'optional) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5695 (not (member header-string message-inserted-headers))) |
17493 | 5696 ;; This is an optional header. If the cdr of this |
5697 ;; is something that is nil, then we do not insert | |
5698 ;; this header. | |
5699 (setq header (cdr elem)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5700 (or (and (functionp (cdr elem)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5701 (funcall (cdr elem))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5702 (and (boundp (cdr elem)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5703 (symbol-value (cdr elem))))) |
17493 | 5704 ((consp elem) |
5705 ;; The element is a cons. Either the cdr is a | |
5706 ;; string to be inserted verbatim, or it is a | |
5707 ;; function, and we insert the value returned from | |
5708 ;; this function. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5709 (or (and (stringp (cdr elem)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5710 (cdr elem)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5711 (and (functionp (cdr elem)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5712 (funcall (cdr elem))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5713 ((and (boundp header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5714 (symbol-value header)) |
17493 | 5715 ;; The element is a symbol. We insert the value |
5716 ;; of this symbol, if any. | |
5717 (symbol-value header)) | |
66808
a93385a3e7a2
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-646
Miles Bader <miles@gnu.org>
parents:
66573
diff
changeset
|
5718 ((not (message-check-element |
a93385a3e7a2
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-646
Miles Bader <miles@gnu.org>
parents:
66573
diff
changeset
|
5719 (intern (downcase (symbol-name header))))) |
17493 | 5720 ;; We couldn't generate a value for this header, |
5721 ;; so we just ask the user. | |
5722 (read-from-minibuffer | |
5723 (format "Empty header for %s; enter value: " header))))) | |
5724 ;; Finally insert the header. | |
5725 (when (and value | |
5726 (not (equal value ""))) | |
5727 (save-excursion | |
5728 (if (bolp) | |
5729 (progn | |
5730 ;; This header didn't exist, so we insert it. | |
5731 (goto-char (point-max)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5732 (let ((formatter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5733 (cdr (assq header message-header-format-alist)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5734 (if formatter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5735 (funcall formatter header value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5736 (insert header-string ": " value)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5737 (goto-char (message-fill-field)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5738 ;; We check whether the value was ended by a |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5739 ;; newline. If not, we insert one. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5740 (unless (bolp) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
5741 (insert "\n")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5742 (forward-line -1))) |
17493 | 5743 ;; The value of this header was empty, so we clear |
5744 ;; totally and insert the new value. | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5745 (delete-region (point) (point-at-eol)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5746 ;; If the header is optional, and the header was |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5747 ;; empty, we can't insert it anyway. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5748 (unless optionalp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5749 (push header-string message-inserted-headers) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5750 (insert value) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5751 (message-fill-field))) |
17493 | 5752 ;; Add the deletable property to the headers that require it. |
5753 (and (memq header message-deletable-headers) | |
5754 (progn (beginning-of-line) (looking-at "[^:]+: ")) | |
5755 (add-text-properties | |
5756 (point) (match-end 0) | |
5757 '(message-deletable t face italic) (current-buffer))))))) | |
5758 ;; Insert new Sender if the From is strange. | |
5759 (let ((from (message-fetch-field "from")) | |
5760 (sender (message-fetch-field "sender")) | |
5761 (secure-sender (message-make-sender))) | |
5762 (when (and from | |
5763 (not (message-check-element 'sender)) | |
5764 (not (string= | |
5765 (downcase | |
5766 (cadr (mail-extract-address-components from))) | |
5767 (downcase secure-sender))) | |
5768 (or (null sender) | |
5769 (not | |
5770 (string= | |
5771 (downcase | |
5772 (cadr (mail-extract-address-components sender))) | |
5773 (downcase secure-sender))))) | |
5774 (goto-char (point-min)) | |
5775 ;; Rename any old Sender headers to Original-Sender. | |
5776 (when (re-search-forward "^\\(Original-\\)*Sender:" nil t) | |
5777 (beginning-of-line) | |
5778 (insert "Original-") | |
5779 (beginning-of-line)) | |
5780 (when (or (message-news-p) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5781 (string-match "@.+\\.." secure-sender)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
5782 (insert "Sender: " secure-sender "\n")))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5783 ;; Check for IDNA |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5784 (message-idna-to-ascii-rhs)))) |
17493 | 5785 |
5786 (defun message-insert-courtesy-copy () | |
5787 "Insert a courtesy message in mail copies of combined messages." | |
5788 (let (newsgroups) | |
5789 (save-excursion | |
5790 (save-restriction | |
5791 (message-narrow-to-headers) | |
5792 (when (setq newsgroups (message-fetch-field "newsgroups")) | |
5793 (goto-char (point-max)) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
5794 (insert "Posted-To: " newsgroups "\n"))) |
17493 | 5795 (forward-line 1) |
5796 (when message-courtesy-message | |
5797 (cond | |
5798 ((string-match "%s" message-courtesy-message) | |
5799 (insert (format message-courtesy-message newsgroups))) | |
5800 (t | |
5801 (insert message-courtesy-message))))))) | |
5802 | |
5803 ;;; | |
5804 ;;; Setting up a message buffer | |
5805 ;;; | |
5806 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5807 (defun message-skip-to-next-address () |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5808 (let ((end (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5809 (message-next-header) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5810 (point))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5811 quoted char) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5812 (when (looking-at ",") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5813 (forward-char 1)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5814 (while (and (not (= (point) end)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5815 (or (not (eq char ?,)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5816 quoted)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5817 (skip-chars-forward "^,\"" (point-max)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5818 (when (eq (setq char (following-char)) ?\") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5819 (setq quoted (not quoted))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5820 (unless (= (point) end) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5821 (forward-char 1))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5822 (skip-chars-forward " \t\n"))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5823 |
17493 | 5824 (defun message-fill-address (header value) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5825 (insert (capitalize (symbol-name header)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5826 ": " |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5827 (if (consp value) (car value) value) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5828 "\n") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5829 (message-fill-field-address)) |
17493 | 5830 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5831 (defun message-split-line () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5832 "Split current line, moving portion beyond point vertically down. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5833 If the current line has `message-yank-prefix', insert it on the new line." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5834 (interactive "*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5835 (condition-case nil |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
5836 (split-line message-yank-prefix) ;; Emacs 22.1+ supports arg. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5837 (error |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5838 (split-line)))) |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
5839 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5840 (defun message-insert-header (header value) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5841 (insert (capitalize (symbol-name header)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5842 ": " |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5843 (if (consp value) (car value) value))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5844 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5845 (defun message-field-name () |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5846 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5847 (goto-char (point-min)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5848 (when (looking-at "\\([^:]+\\):") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5849 (intern (capitalize (match-string 1)))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5850 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5851 (defun message-fill-field () |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5852 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5853 (save-restriction |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5854 (message-narrow-to-field) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5855 (let ((field-name (message-field-name))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5856 (funcall (or (cadr (assq field-name message-field-fillers)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5857 'message-fill-field-general))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5858 (point-max)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5859 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5860 (defun message-fill-field-address () |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5861 (while (not (eobp)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5862 (message-skip-to-next-address) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5863 (let (last) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5864 (if (and (> (current-column) 78) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5865 last) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5866 (progn |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5867 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5868 (goto-char last) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5869 (insert "\n\t")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5870 (setq last (1+ (point)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5871 (setq last (1+ (point))))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5872 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5873 (defun message-fill-field-general () |
17493 | 5874 (let ((begin (point)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5875 (fill-column 78) |
17493 | 5876 (fill-prefix "\t")) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5877 (while (and (search-forward "\n" nil t) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5878 (not (eobp))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5879 (replace-match " " t t)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5880 (fill-region-as-paragraph begin (point-max)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5881 ;; Tapdance around looong Message-IDs. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5882 (forward-line -1) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5883 (when (looking-at "[ \t]*$") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5884 (message-delete-line)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5885 (goto-char begin) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5886 (search-forward ":" nil t) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5887 (when (looking-at "\n[ \t]+") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5888 (replace-match " " t t)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5889 (goto-char (point-max)))) |
17493 | 5890 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5891 (defun message-shorten-1 (list cut surplus) |
35147 | 5892 "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
|
5893 (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
|
5894 (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
|
5895 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5896 (defun message-shorten-references (header references) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5897 "Trim REFERENCES to be 21 Message-ID long or less, and fold them. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5898 When sending via news, also check that the REFERENCES are less |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5899 than 988 characters long, and if they are not, trim them until |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5900 they are." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5901 (let ((maxcount 21) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5902 (count 0) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5903 (cut 2) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5904 refs) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5905 (with-temp-buffer |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5906 (insert references) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5907 (goto-char (point-min)) |
93386 | 5908 ;; Cons a list of valid references. GNKSA says we must not include MIDs |
5909 ;; with whitespace or missing brackets (7.a "Does not propagate broken | |
5910 ;; Message-IDs in original References"). | |
5911 (while (re-search-forward "<[^ <]+@[^ <]+>" nil t) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5912 (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
|
5913 (setq refs (nreverse refs) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5914 count (length refs))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5915 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5916 ;; 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
|
5917 ;; 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
|
5918 ;; elements that follow. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5919 (when (> count maxcount) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5920 (let ((surplus (- count maxcount))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5921 (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
|
5922 (decf count surplus))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5923 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5924 ;; When sending via news, make sure the total folded length will |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5925 ;; be less than 998 characters. This is to cater to broken INN |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5926 ;; 2.3 which counts the total number of characters in a header |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5927 ;; rather than the physical line length of each line, as it should. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5928 ;; |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5929 ;; This hack should be removed when it's believed than INN 2.3 is |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5930 ;; no longer widely used. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5931 ;; |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5932 ;; At this point the headers have not been generated, thus we use |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5933 ;; message-this-is-news directly. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5934 (when message-this-is-news |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5935 (while (< 998 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5936 (with-temp-buffer |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5937 (message-insert-header |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5938 header (mapconcat #'identity refs " ")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5939 (buffer-size))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5940 (message-shorten-1 refs cut 1))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5941 ;; 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
|
5942 ;; it into the buffer. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5943 (message-insert-header header (mapconcat #'identity refs " ")))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5944 |
17493 | 5945 (defun message-position-point () |
5946 "Move point to where the user probably wants to find it." | |
5947 (message-narrow-to-headers) | |
5948 (cond | |
5949 ((re-search-forward "^[^:]+:[ \t]*$" nil t) | |
5950 (search-backward ":" ) | |
5951 (widen) | |
5952 (forward-char 1) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5953 (if (eq (char-after) ? ) |
17493 | 5954 (forward-char 1) |
5955 (insert " "))) | |
5956 (t | |
5957 (goto-char (point-max)) | |
5958 (widen) | |
5959 (forward-line 1) | |
5960 (unless (looking-at "$") | |
5961 (forward-line 2))) | |
5962 (sit-for 0))) | |
5963 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5964 (defcustom message-beginning-of-line t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5965 "Whether \\<message-mode-map>\\[message-beginning-of-line]\ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5966 goes to beginning of header values." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
5967 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5968 :group 'message-buffers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5969 :link '(custom-manual "(message)Movement") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5970 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5971 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5972 (defun message-beginning-of-line (&optional n) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5973 "Move point to beginning of header value or to beginning of line. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5974 The prefix argument N is passed directly to `beginning-of-line'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5975 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5976 This command is identical to `beginning-of-line' if point is |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5977 outside the message header or if the option `message-beginning-of-line' |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5978 is nil. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5979 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5980 If point is in the message header and on a (non-continued) header |
59756
b53453586872
(message-beginning-of-line): Change the behavior when
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58835
diff
changeset
|
5981 line, move point to the beginning of the header value or the beginning of line, |
b53453586872
(message-beginning-of-line): Change the behavior when
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58835
diff
changeset
|
5982 whichever is closer. If point is already at beginning of line, move point to |
b53453586872
(message-beginning-of-line): Change the behavior when
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58835
diff
changeset
|
5983 beginning of header value. Therefore, repeated calls will toggle point |
b53453586872
(message-beginning-of-line): Change the behavior when
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58835
diff
changeset
|
5984 between beginning of field and beginning of line." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5985 (interactive "p") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5986 (let ((zrs 'zmacs-region-stays)) |
87941
d77b6e5ee8af
* sieve.el (sieve-make-overlay, sieve-overlay-put, sieve-overlays-at):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
87649
diff
changeset
|
5987 (when (and (featurep 'xemacs) (interactive-p) (boundp zrs)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5988 (set zrs t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5989 (if (and message-beginning-of-line |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5990 (message-point-in-header-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5991 (let* ((here (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5992 (bol (progn (beginning-of-line n) (point))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5993 (eol (point-at-eol)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5994 (eoh (re-search-forward ": *" eol t))) |
59756
b53453586872
(message-beginning-of-line): Change the behavior when
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58835
diff
changeset
|
5995 (goto-char |
b53453586872
(message-beginning-of-line): Change the behavior when
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58835
diff
changeset
|
5996 (if (and eoh (or (< eoh here) (= bol here))) |
b53453586872
(message-beginning-of-line): Change the behavior when
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58835
diff
changeset
|
5997 eoh bol))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5998 (beginning-of-line n))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5999 |
17493 | 6000 (defun message-buffer-name (type &optional to group) |
6001 "Return a new (unique) buffer name based on TYPE and TO." | |
6002 (cond | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6003 ;; Generate a new buffer name The Message Way. |
76650 | 6004 ((memq message-generate-new-buffers '(unique t)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6005 (generate-new-buffer-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6006 (concat "*" type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6007 (if to |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6008 (concat " to " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6009 (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
|
6010 to) "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6011 "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6012 (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
|
6013 "*"))) |
17493 | 6014 ;; Check whether `message-generate-new-buffers' is a function, |
6015 ;; and if so, call it. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6016 ((functionp message-generate-new-buffers) |
17493 | 6017 (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
|
6018 ((eq message-generate-new-buffers 'unsent) |
17493 | 6019 (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
|
6020 (concat "*unsent " type |
17493 | 6021 (if to |
6022 (concat " to " | |
6023 (or (car (mail-extract-address-components to)) | |
6024 to) "") | |
6025 "") | |
6026 (if (and group (not (string= group ""))) (concat " on " group) "") | |
6027 "*"))) | |
76650 | 6028 ;; Search for the existing message buffer with the specified name. |
17493 | 6029 (t |
76650 | 6030 (let* ((new (if (eq message-generate-new-buffers 'standard) |
6031 (generate-new-buffer-name (concat "*" type " message*")) | |
6032 (let ((message-generate-new-buffers 'unique)) | |
6033 (message-buffer-name type to group)))) | |
6034 (regexp (concat "\\`" | |
6035 (regexp-quote | |
6036 (if (string-match "<[0-9]+>\\'" new) | |
6037 (substring new 0 (match-beginning 0)) | |
6038 new)) | |
6039 "\\(?:<\\([0-9]+\\)>\\)?\\'")) | |
6040 (case-fold-search nil)) | |
6041 (or (cdar | |
6042 (last | |
6043 (sort | |
6044 (delq nil | |
6045 (mapcar | |
6046 (lambda (b) | |
6047 (when (and (string-match regexp (setq b (buffer-name b))) | |
6048 (eq (with-current-buffer b major-mode) | |
6049 'message-mode)) | |
6050 (cons (string-to-number (or (match-string 1 b) "1")) | |
6051 b))) | |
6052 (buffer-list))) | |
6053 'car-less-than-car))) | |
6054 new))))) | |
17493 | 6055 |
77819
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6056 (defun message-pop-to-buffer (name &optional switch-function) |
17493 | 6057 "Pop to buffer NAME, and warn if it already exists and is modified." |
6058 (let ((buffer (get-buffer name))) | |
6059 (if (and buffer | |
6060 (buffer-name buffer)) | |
76650 | 6061 (let ((window (get-buffer-window buffer 0))) |
6062 (if window | |
6063 ;; Raise the frame already displaying the message buffer. | |
6064 (progn | |
6065 (gnus-select-frame-set-input-focus (window-frame window)) | |
6066 (select-window window)) | |
77819
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6067 (funcall (or switch-function 'pop-to-buffer) buffer) |
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6068 (set-buffer buffer)) |
17493 | 6069 (when (and (buffer-modified-p) |
76650 | 6070 (not (prog1 |
6071 (y-or-n-p | |
6072 "Message already being composed; erase? ") | |
6073 (message nil)))) | |
17493 | 6074 (error "Message being composed"))) |
77819
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6075 (funcall (or switch-function 'pop-to-buffer) name) |
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6076 (set-buffer name)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6077 (erase-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6078 (message-mode))) |
17493 | 6079 |
6080 (defun message-do-send-housekeeping () | |
6081 "Kill old message buffers." | |
6082 ;; We might have sent this buffer already. Delete it from the | |
6083 ;; list of buffers. | |
6084 (setq message-buffer-list (delq (current-buffer) message-buffer-list)) | |
6085 (while (and message-max-buffers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6086 message-buffer-list |
17493 | 6087 (>= (length message-buffer-list) message-max-buffers)) |
6088 ;; Kill the oldest buffer -- unless it has been changed. | |
6089 (let ((buffer (pop message-buffer-list))) | |
6090 (when (and (buffer-name buffer) | |
6091 (not (buffer-modified-p buffer))) | |
6092 (kill-buffer buffer)))) | |
6093 ;; Rename the buffer. | |
6094 (if message-send-rename-function | |
6095 (funcall message-send-rename-function) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6096 ;; Note: mail-abbrevs of XEmacs renames buffer name behind Gnus. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6097 (when (string-match |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6098 "\\`\\*\\(sent \\|unsent \\)?\\(.+\\)\\*[^\\*]*\\|\\`mail to " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6099 (buffer-name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6100 (let ((name (match-string 2 (buffer-name))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6101 to group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6102 (if (not (or (null name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6103 (string-equal name "mail") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6104 (string-equal name "posting"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6105 (setq name (concat "*sent " name "*")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6106 (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6107 (setq to (message-fetch-field "to")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6108 (setq group (message-fetch-field "newsgroups")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6109 (widen) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6110 (setq name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6111 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6112 (to (concat "*sent mail to " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6113 (or (car (mail-extract-address-components to)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6114 to) "*")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6115 ((and group (not (string= group ""))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6116 (concat "*sent posting on " group "*")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6117 (t "*sent mail*")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6118 (unless (string-equal name (buffer-name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6119 (rename-buffer name t))))) |
17493 | 6120 ;; Push the current buffer onto the list. |
6121 (when message-max-buffers | |
6122 (setq message-buffer-list | |
6123 (nconc message-buffer-list (list (current-buffer)))))) | |
6124 | |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6125 (defun message-mail-user-agent () |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6126 (let ((mua (cond |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6127 ((not message-mail-user-agent) nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6128 ((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
|
6129 (t message-mail-user-agent)))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6130 (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
|
6131 nil |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6132 mua))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6133 |
76650 | 6134 (defun message-setup (headers &optional replybuffer actions |
6135 continue switch-function) | |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6136 (let ((mua (message-mail-user-agent)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6137 subject to field yank-action) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6138 (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
|
6139 (message-setup-1 headers replybuffer actions) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6140 (if replybuffer |
34859
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
6141 (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
|
6142 (setq headers (copy-sequence headers)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6143 (setq field (assq 'Subject headers)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6144 (when field |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6145 (setq subject (cdr field)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6146 (setq headers (delq field headers))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6147 (setq field (assq 'To headers)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6148 (when field |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6149 (setq to (cdr field)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6150 (setq headers (delq field headers))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6151 (let ((mail-user-agent mua)) |
35147 | 6152 (compose-mail to subject |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6153 (mapcar (lambda (item) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6154 (cons |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6155 (format "%s" (car item)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6156 (cdr item))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6157 headers) |
76650 | 6158 continue switch-function yank-action actions))))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49034
diff
changeset
|
6159 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6160 (defun message-headers-to-generate (headers included-headers excluded-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6161 "Return a list that includes all headers from HEADERS. |
73487 | 6162 If INCLUDED-HEADERS is a list, just include those headers. If it is |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6163 t, include all headers. In any case, headers from EXCLUDED-HEADERS |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6164 are not included." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6165 (let ((result nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6166 header-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6167 (dolist (header headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6168 (setq header-name (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6169 ((and (consp header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6170 (eq (car header) 'optional)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6171 ;; On the form (optional . Header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6172 (cdr header)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6173 ((consp header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6174 ;; On the form (Header . function) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6175 (car header)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6176 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6177 ;; Just a Header. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6178 header))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6179 (when (and (not (memq header-name excluded-headers)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6180 (or (eq included-headers t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6181 (memq header-name included-headers))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6182 (push header result))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6183 (nreverse result))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6184 |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6185 (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
|
6186 (dolist (action actions) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6187 (condition-case nil |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6188 (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
|
6189 `(apply ',(car action) ',(cdr action))))) |
17493 | 6190 (setq message-reply-buffer replybuffer) |
6191 (goto-char (point-min)) | |
6192 ;; Insert all the headers. | |
6193 (mail-header-format | |
6194 (let ((h headers) | |
6195 (alist message-header-format-alist)) | |
6196 (while h | |
6197 (unless (assq (caar h) message-header-format-alist) | |
6198 (push (list (caar h)) alist)) | |
6199 (pop h)) | |
6200 alist) | |
6201 headers) | |
6202 (delete-region (point) (progn (forward-line -1) (point))) | |
6203 (when message-default-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6204 (insert message-default-headers) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6205 (or (bolp) (insert ?\n))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6206 (insert mail-header-separator "\n") |
17493 | 6207 (forward-line -1) |
6208 (when (message-news-p) | |
6209 (when message-default-news-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6210 (insert message-default-news-headers) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6211 (or (bolp) (insert ?\n))) |
17493 | 6212 (when message-generate-headers-first |
6213 (message-generate-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6214 (message-headers-to-generate |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6215 (append message-required-news-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6216 message-required-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6217 message-generate-headers-first |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6218 '(Lines Subject))))) |
17493 | 6219 (when (message-mail-p) |
6220 (when message-default-mail-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6221 (insert message-default-mail-headers) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6222 (or (bolp) (insert ?\n))) |
17493 | 6223 (when message-generate-headers-first |
6224 (message-generate-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6225 (message-headers-to-generate |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6226 (append message-required-mail-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6227 message-required-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6228 message-generate-headers-first |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6229 '(Lines Subject))))) |
17493 | 6230 (run-hooks 'message-signature-setup-hook) |
6231 (message-insert-signature) | |
6232 (save-restriction | |
6233 (message-narrow-to-headers) | |
6234 (run-hooks 'message-header-setup-hook)) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6235 (setq buffer-undo-list nil) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6236 (when message-generate-hashcash |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6237 ;; Generate hashcash headers for recipients already known |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6238 (mail-add-payment-async)) |
93386 | 6239 ;; Gnus posting styles are applied via buffer-local `message-setup-hook' |
6240 ;; values. | |
17493 | 6241 (run-hooks 'message-setup-hook) |
68521
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
6242 ;; Do this last to give it precedence over posting styles, etc. |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
6243 (when (message-mail-p) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
6244 (save-restriction |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
6245 (message-narrow-to-headers) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
6246 (if message-alternative-emails |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
6247 (message-use-alternative-email-as-from)))) |
17493 | 6248 (message-position-point) |
93386 | 6249 ;; Allow correct handling of `message-checksum' in `message-yank-original': |
6250 (set-buffer-modified-p nil) | |
17493 | 6251 (undo-boundary)) |
6252 | |
6253 (defun message-set-auto-save-file-name () | |
6254 "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
|
6255 (when message-auto-save-directory |
34057
98bd49d8cf7d
(message-auto-save-directory): Use
Dave Love <fx@gnu.org>
parents:
33982
diff
changeset
|
6256 (unless (file-directory-p |
98bd49d8cf7d
(message-auto-save-directory): Use
Dave Love <fx@gnu.org>
parents:
33982
diff
changeset
|
6257 (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
|
6258 (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
|
6259 (if (gnus-alive-p) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6260 (setq message-draft-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6261 (nndraft-request-associate-buffer "drafts")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6262 (setq buffer-file-name (expand-file-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6263 (if (memq system-type |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6264 '(ms-dos ms-windows windows-nt |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6265 cygwin cygwin32 win32 w32 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6266 mswindows)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6267 "message" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6268 "*message*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6269 message-auto-save-directory)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6270 (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
|
6271 (clear-visited-file-modtime) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6272 (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
|
6273 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6274 (defun message-disassociate-draft () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6275 "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
|
6276 (when message-draft-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6277 (nndraft-request-expire-articles |
93386 | 6278 (list message-draft-article) "nndraft:drafts" nil t))) |
17493 | 6279 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6280 (defun message-insert-headers () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6281 "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
|
6282 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6283 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6284 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6285 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6286 (when (message-news-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6287 (message-generate-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6288 (delq 'Lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6289 (delq 'Subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6290 (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
|
6291 (when (message-mail-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6292 (message-generate-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6293 (delq 'Lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6294 (delq 'Subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6295 (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
|
6296 |
17493 | 6297 |
6298 | |
6299 ;;; | |
6300 ;;; Commands for interfacing with message | |
6301 ;;; | |
6302 | |
6303 ;;;###autoload | |
6304 (defun message-mail (&optional to subject | |
6305 other-headers continue switch-function | |
6306 yank-action send-actions) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6307 "Start editing a mail message to be sent. |
76650 | 6308 OTHER-HEADERS is an alist of header/value pairs. CONTINUE says whether |
6309 to continue editing a message already being composed. SWITCH-FUNCTION | |
6310 is a function used to switch to and display the mail buffer." | |
17493 | 6311 (interactive) |
34859
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
6312 (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
|
6313 (unless (message-mail-user-agent) |
77819
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6314 (message-pop-to-buffer |
76650 | 6315 ;; Search for the existing message buffer if `continue' is non-nil. |
6316 (let ((message-generate-new-buffers | |
6317 (when (or (not continue) | |
6318 (eq message-generate-new-buffers 'standard) | |
6319 (functionp message-generate-new-buffers)) | |
6320 message-generate-new-buffers))) | |
77819
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6321 (message-buffer-name "mail" to)) |
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6322 switch-function)) |
34859
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
6323 ;; 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
|
6324 ;; insert-buffer. |
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
6325 (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
|
6326 (setq replybuffer (nth 1 yank-action))) |
17493 | 6327 (message-setup |
6328 (nconc | |
6329 `((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
|
6330 (when other-headers other-headers)) |
76650 | 6331 replybuffer send-actions continue switch-function) |
34859
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
6332 ;; FIXME: Should return nil if failure. |
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
6333 t)) |
17493 | 6334 |
6335 ;;;###autoload | |
6336 (defun message-news (&optional newsgroups subject) | |
6337 "Start editing a news article to be sent." | |
6338 (interactive) | |
6339 (let ((message-this-is-news t)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6340 (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups)) |
17493 | 6341 (message-setup `((Newsgroups . ,(or newsgroups "")) |
6342 (Subject . ,(or subject "")))))) | |
6343 | |
93386 | 6344 (defun message-alter-recipients-discard-bogus-full-name (addrcell) |
6345 "Discard mail address in full names. | |
6346 When the full name in reply headers contains the mail | |
6347 address (e.g. \"foo@bar <foo@bar>\"), discard full name. | |
6348 ADDRCELL is a cons cell where the car is the mail address and the | |
6349 cdr is the complete address (full name and mail address)." | |
6350 (if (string-match (concat (regexp-quote (car addrcell)) ".*" | |
6351 (regexp-quote (car addrcell))) | |
6352 (cdr addrcell)) | |
6353 (cons (car addrcell) (car addrcell)) | |
6354 addrcell)) | |
6355 | |
6356 (defcustom message-alter-recipients-function nil | |
6357 "Function called to allow alteration of reply header structures. | |
6358 It is called in `message-get-reply-headers' for each recipient. | |
6359 The function is called with one parameter, a cons cell ..." | |
6360 :type '(choice (const :tag "None" nil) | |
6361 (const :tag "Discard bogus full name" | |
6362 message-alter-recipients-discard-bogus-full-name) | |
6363 function) | |
6364 :version "23.1" ;; No Gnus | |
6365 :group 'message-headers) | |
6366 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6367 (defun message-get-reply-headers (wide &optional to-address address-headers) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6368 (let (follow-to mct never-mct to cc author mft recipients extra) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6369 ;; Find all relevant headers we need. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6370 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6371 (message-narrow-to-headers-or-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6372 ;; Gmane renames "To". Look at "Original-To", too, if it is present in |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6373 ;; message-header-synonyms. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6374 (setq to (or (message-fetch-field "to") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6375 (and (loop for synonym in message-header-synonyms |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6376 when (memq 'Original-To synonym) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6377 return t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6378 (message-fetch-field "original-to"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6379 cc (message-fetch-field "cc") |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6380 extra (when message-extra-wide-headers |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6381 (mapconcat 'identity |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6382 (mapcar 'message-fetch-field |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6383 message-extra-wide-headers) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6384 ", ")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6385 mct (message-fetch-field "mail-copies-to") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6386 author (or (message-fetch-field "mail-reply-to") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6387 (message-fetch-field "reply-to") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6388 (message-fetch-field "from") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6389 "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6390 mft (and message-use-mail-followup-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6391 (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
|
6392 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6393 ;; 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
|
6394 (when mct |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6395 (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
|
6396 (equal (downcase mct) "nobody")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6397 (setq never-mct t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6398 (setq mct nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6399 ((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
|
6400 (equal (downcase mct) "poster")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6401 (setq mct author)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6402 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6403 (save-match-data |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6404 ;; Build (textual) list of new recipient addresses. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6405 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6406 ((not wide) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6407 (setq recipients (concat ", " author))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6408 (address-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6409 (dolist (header address-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6410 (let ((value (message-fetch-field header))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6411 (when value |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6412 (setq recipients (concat recipients ", " value)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6413 ((and mft |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6414 (string-match "[^ \t,]" mft) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6415 (or (not (eq message-use-mail-followup-to 'ask)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6416 (message-y-or-n-p "Obey Mail-Followup-To? " t "\ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6417 You should normally obey the Mail-Followup-To: header. In this |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6418 article, it has the value of |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6419 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6420 " mft " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6421 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6422 which directs your response to " (if (string-match "," mft) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6423 "the specified addresses" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6424 "that address only") ". |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6425 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6426 Most commonly, Mail-Followup-To is used by a mailing list poster to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6427 express that responses should be sent to just the list, and not the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6428 poster as well. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6429 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6430 If a message is posted to several mailing lists, Mail-Followup-To may |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6431 also be used to direct the following discussion to one list only, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6432 because discussions that are spread over several lists tend to be |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6433 fragmented and very difficult to follow. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6434 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6435 Also, some source/announcement lists are not intended for discussion; |
60356
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6436 responses here are directed to other addresses. |
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6437 |
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6438 You may customize the variable `message-use-mail-followup-to', if you |
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6439 want to get rid of this query permanently."))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6440 (setq recipients (concat ", " mft))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6441 (to-address |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6442 (setq recipients (concat ", " to-address)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6443 ;; If the author explicitly asked for a copy, we don't deny it to them. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6444 (if mct (setq recipients (concat recipients ", " mct)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6445 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6446 (setq recipients (if never-mct "" (concat ", " author))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6447 (if to (setq recipients (concat recipients ", " to))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6448 (if cc (setq recipients (concat recipients ", " cc))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6449 (if extra (setq recipients (concat recipients ", " extra))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6450 (if mct (setq recipients (concat recipients ", " mct))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6451 (if (>= (length recipients) 2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6452 ;; Strip the leading ", ". |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6453 (setq recipients (substring recipients 2))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6454 ;; Squeeze whitespace. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6455 (while (string-match "[ \t][ \t]+" recipients) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6456 (setq recipients (replace-match " " t t recipients))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6457 ;; Remove addresses that match `rmail-dont-reply-to-names'. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6458 (let ((rmail-dont-reply-to-names (message-dont-reply-to-names))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6459 (setq recipients (rmail-dont-reply-to recipients))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6460 ;; Perhaps "Mail-Copies-To: never" removed the only address? |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6461 (if (string-equal recipients "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6462 (setq recipients author)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6463 ;; Convert string to a list of (("foo@bar" . "Name <Foo@BAR>") ...). |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6464 (setq recipients |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6465 (mapcar |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6466 (lambda (addr) |
93386 | 6467 (if message-alter-recipients-function |
6468 (funcall message-alter-recipients-function | |
6469 (cons (downcase (mail-strip-quoted-names addr)) | |
6470 addr)) | |
6471 (cons (downcase (mail-strip-quoted-names addr)) addr))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6472 (message-tokenize-header recipients))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6473 ;; Remove first duplicates. (Why not all duplicates? Is this a bug?) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6474 (let ((s recipients)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6475 (while s |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6476 (setq recipients (delq (assoc (car (pop s)) s) recipients)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6477 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6478 ;; Remove hierarchical lists that are contained within each other, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6479 ;; if message-hierarchical-addresses is defined. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6480 (when message-hierarchical-addresses |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6481 (let ((plain-addrs (mapcar 'car recipients)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6482 subaddrs recip) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6483 (while plain-addrs |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6484 (setq subaddrs (assoc (car plain-addrs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6485 message-hierarchical-addresses) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6486 plain-addrs (cdr plain-addrs)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6487 (when subaddrs |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6488 (setq subaddrs (cdr subaddrs)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6489 (while subaddrs |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6490 (setq recip (assoc (car subaddrs) recipients) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6491 subaddrs (cdr subaddrs)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6492 (if recip |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6493 (setq recipients (delq recip recipients)))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6494 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6495 ;; Build the header alist. Allow the user to be asked whether |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6496 ;; or not to reply to all recipients in a wide reply. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6497 (setq follow-to (list (cons 'To (cdr (pop recipients))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6498 (when (and recipients |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6499 (or (not message-wide-reply-confirm-recipients) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6500 (y-or-n-p "Reply to all recipients? "))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6501 (setq recipients (mapconcat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6502 (lambda (addr) (cdr addr)) recipients ", ")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6503 (if (string-match "^ +" recipients) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6504 (setq recipients (substring recipients (match-end 0)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6505 (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
|
6506 follow-to)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6507 |
74021 | 6508 (defcustom message-simplify-subject-functions |
6509 '(message-strip-list-identifiers | |
6510 message-strip-subject-re | |
6511 message-strip-subject-trailing-was | |
6512 message-strip-subject-encoded-words) | |
6513 "List of functions taking a string argument that simplify subjects. | |
6514 The functions are applied when replying to a message. | |
6515 | |
6516 Useful functions to put in this list include: | |
6517 `message-strip-list-identifiers', `message-strip-subject-re', | |
6518 `message-strip-subject-trailing-was', and | |
6519 `message-strip-subject-encoded-words'." | |
6520 :version "22.1" ;; Gnus 5.10.9 | |
6521 :group 'message-various | |
6522 :type '(repeat function)) | |
6523 | |
6524 (defun message-simplify-subject (subject &optional functions) | |
6525 "Return simplified SUBJECT." | |
6526 (unless functions | |
6527 ;; Simplify fully: | |
6528 (setq functions message-simplify-subject-functions)) | |
6529 (when (and (memq 'message-strip-list-identifiers functions) | |
6530 gnus-list-identifiers) | |
6531 (setq subject (message-strip-list-identifiers subject))) | |
6532 (when (memq 'message-strip-subject-re functions) | |
6533 (setq subject (concat "Re: " (message-strip-subject-re subject)))) | |
6534 (when (and (memq 'message-strip-subject-trailing-was functions) | |
6535 message-subject-trailing-was-query) | |
6536 (setq subject (message-strip-subject-trailing-was subject))) | |
6537 (when (memq 'message-strip-subject-encoded-words functions) | |
6538 (setq subject (message-strip-subject-encoded-words subject))) | |
6539 subject) | |
6540 | |
17493 | 6541 ;;;###autoload |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6542 (defun message-reply (&optional to-address wide) |
17493 | 6543 "Start editing a reply to the article in the current buffer." |
6544 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6545 (require 'gnus-sum) ; for gnus-list-identifiers |
17493 | 6546 (let ((cur (current-buffer)) |
6547 from subject date reply-to to cc | |
6548 references message-id follow-to | |
6549 (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
|
6550 (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
|
6551 gnus-warning) |
17493 | 6552 (save-restriction |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6553 (message-narrow-to-head-1) |
17493 | 6554 ;; Allow customizations to have their say. |
6555 (if (not wide) | |
6556 ;; This is a regular reply. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6557 (when (functionp message-reply-to-function) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6558 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6559 (setq follow-to (funcall message-reply-to-function)))) |
17493 | 6560 ;; This is a followup. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6561 (when (functionp message-wide-reply-to-function) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6562 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6563 (setq follow-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6564 (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
|
6565 (setq message-id (message-fetch-field "message-id" t) |
17493 | 6566 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
|
6567 date (message-fetch-field "date") |
73007 | 6568 from (or (message-fetch-field "from") "nobody") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6569 subject (or (message-fetch-field "subject") "none")) |
74021 | 6570 |
6571 ;; Strip list identifiers, "Re: ", and "was:" | |
6572 (setq subject (message-simplify-subject subject)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6573 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6574 (when (and (setq gnus-warning (message-fetch-field "gnus-warning")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6575 (string-match "<[^>]+>" gnus-warning)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6576 (setq message-id (match-string 0 gnus-warning))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6577 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6578 (unless follow-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6579 (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
|
6580 |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6581 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6582 (message-pop-to-buffer |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6583 (message-buffer-name |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6584 (if wide "wide reply" "reply") from |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6585 (if wide to-address nil)))) |
17493 | 6586 |
6587 (setq message-reply-headers | |
6588 (vector 0 subject from date message-id references 0 0 "")) | |
6589 | |
6590 (message-setup | |
6591 `((Subject . ,subject) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6592 ,@follow-to) |
17493 | 6593 cur))) |
6594 | |
6595 ;;;###autoload | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6596 (defun message-wide-reply (&optional to-address) |
17493 | 6597 "Make a \"wide\" reply to the message in the current buffer." |
6598 (interactive) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6599 (message-reply to-address t)) |
17493 | 6600 |
6601 ;;;###autoload | |
6602 (defun message-followup (&optional to-newsgroups) | |
6603 "Follow up to the message in the current buffer. | |
6604 If TO-NEWSGROUPS, use that as the new Newsgroups line." | |
6605 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6606 (require 'gnus-sum) ; for gnus-list-identifiers |
17493 | 6607 (let ((cur (current-buffer)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6608 from subject date reply-to mrt mct |
17493 | 6609 references message-id follow-to |
6610 (inhibit-point-motion-hooks t) | |
6611 (message-this-is-news t) | |
6612 followup-to distribution newsgroups gnus-warning posted-to) | |
6613 (save-restriction | |
6614 (narrow-to-region | |
6615 (goto-char (point-min)) | |
6616 (if (search-forward "\n\n" nil t) | |
6617 (1- (point)) | |
6618 (point-max))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6619 (when (functionp message-followup-to-function) |
17493 | 6620 (setq follow-to |
6621 (funcall message-followup-to-function))) | |
6622 (setq from (message-fetch-field "from") | |
6623 date (message-fetch-field "date") | |
6624 subject (or (message-fetch-field "subject") "none") | |
6625 references (message-fetch-field "references") | |
6626 message-id (message-fetch-field "message-id" t) | |
6627 followup-to (message-fetch-field "followup-to") | |
6628 newsgroups (message-fetch-field "newsgroups") | |
6629 posted-to (message-fetch-field "posted-to") | |
6630 reply-to (message-fetch-field "reply-to") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6631 mrt (message-fetch-field "mail-reply-to") |
17493 | 6632 distribution (message-fetch-field "distribution") |
6633 mct (message-fetch-field "mail-copies-to")) | |
6634 (when (and (setq gnus-warning (message-fetch-field "gnus-warning")) | |
6635 (string-match "<[^>]+>" gnus-warning)) | |
6636 (setq message-id (match-string 0 gnus-warning))) | |
6637 ;; Remove bogus distribution. | |
6638 (when (and (stringp distribution) | |
6639 (let ((case-fold-search t)) | |
6640 (string-match "world" distribution))) | |
6641 (setq distribution nil)) | |
74021 | 6642 ;; Strip list identifiers, "Re: ", and "was:" |
6643 (setq subject (message-simplify-subject subject)) | |
17493 | 6644 (widen)) |
6645 | |
6646 (message-pop-to-buffer (message-buffer-name "followup" from newsgroups)) | |
6647 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6648 (setq message-reply-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6649 (vector 0 subject from date message-id references 0 0 "")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6650 |
17493 | 6651 (message-setup |
6652 `((Subject . ,subject) | |
6653 ,@(cond | |
6654 (to-newsgroups | |
6655 (list (cons 'Newsgroups to-newsgroups))) | |
6656 (follow-to follow-to) | |
6657 ((and followup-to message-use-followup-to) | |
6658 (list | |
6659 (cond | |
6660 ((equal (downcase followup-to) "poster") | |
6661 (if (or (eq message-use-followup-to 'use) | |
6662 (message-y-or-n-p "Obey Followup-To: poster? " t "\ | |
6663 You should normally obey the Followup-To: header. | |
6664 | |
6665 `Followup-To: poster' sends your response via e-mail instead of news. | |
6666 | |
6667 A typical situation where `Followup-To: poster' is used is when the poster | |
60356
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6668 does not read the newsgroup, so he wouldn't see any replies sent to it. |
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6669 |
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6670 You may customize the variable `message-use-followup-to', if you |
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6671 want to get rid of this query permanently.")) |
17493 | 6672 (progn |
6673 (setq message-this-is-news nil) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6674 (cons 'To (or mrt reply-to from ""))) |
17493 | 6675 (cons 'Newsgroups newsgroups))) |
6676 (t | |
6677 (if (or (equal followup-to newsgroups) | |
6678 (not (eq message-use-followup-to 'ask)) | |
6679 (message-y-or-n-p | |
6680 (concat "Obey Followup-To: " followup-to "? ") t "\ | |
6681 You should normally obey the Followup-To: header. | |
6682 | |
6683 `Followup-To: " followup-to "' | |
6684 directs your response to " (if (string-match "," followup-to) | |
6685 "the specified newsgroups" | |
6686 "that newsgroup only") ". | |
6687 | |
6688 If a message is posted to several newsgroups, Followup-To is often | |
6689 used to direct the following discussion to one newsgroup only, | |
6690 because discussions that are spread over several newsgroup tend to | |
6691 be fragmented and very difficult to follow. | |
6692 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6693 Also, some source/announcement newsgroups are not intended for discussion; |
60356
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6694 responses here are directed to other newsgroups. |
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6695 |
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6696 You may customize the variable `message-use-followup-to', if you |
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6697 want to get rid of this query permanently.")) |
17493 | 6698 (cons 'Newsgroups followup-to) |
6699 (cons 'Newsgroups newsgroups)))))) | |
6700 (posted-to | |
6701 `((Newsgroups . ,posted-to))) | |
6702 (t | |
6703 `((Newsgroups . ,newsgroups)))) | |
6704 ,@(and distribution (list (cons 'Distribution distribution))) | |
6705 ,@(when (and mct | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6706 (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
|
6707 (equal (downcase mct) "nobody")))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6708 (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
|
6709 (equal (downcase mct) "poster")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6710 (or mrt reply-to from "") |
17493 | 6711 mct))))) |
6712 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6713 cur))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6714 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6715 (defun message-is-yours-p () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6716 "Non-nil means current article is yours. |
63398
2f37f6737221
(message-is-yours-p): Fix quoting.
Juanma Barranquero <lekktu@gmail.com>
parents:
62755
diff
changeset
|
6717 If you have added 'cancel-messages to `message-shoot-gnksa-feet', all articles |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6718 are yours except those that have Cancel-Lock header not belonging to you. |
63398
2f37f6737221
(message-is-yours-p): Fix quoting.
Juanma Barranquero <lekktu@gmail.com>
parents:
62755
diff
changeset
|
6719 Instead of shooting GNKSA feet, you should modify `message-alternative-emails' |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6720 regexp to match all of yours addresses." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6721 ;; Canlock-logic as suggested by Per Abrahamsen |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6722 ;; <abraham@dina.kvl.dk> |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6723 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6724 ;; IF article has cancel-lock THEN |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6725 ;; IF we can verify it THEN |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6726 ;; issue cancel |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6727 ;; ELSE |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6728 ;; error: cancellock: article is not yours |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6729 ;; ELSE |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6730 ;; Use old rules, comparing sender... |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6731 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6732 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6733 (message-narrow-to-head-1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6734 (if (message-fetch-field "Cancel-Lock") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6735 (if (null (canlock-verify)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6736 t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6737 (error "Failed to verify Cancel-lock: This article is not yours")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6738 (let (sender from) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6739 (or |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6740 (message-gnksa-enable-p 'cancel-messages) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6741 (and (setq sender (message-fetch-field "sender")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6742 (string-equal (downcase sender) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6743 (downcase (message-make-sender)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6744 ;; Email address in From field equals to our address |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6745 (and (setq from (message-fetch-field "from")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6746 (string-equal |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6747 (downcase (car (mail-header-parse-address from))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6748 (downcase (car (mail-header-parse-address |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6749 (message-make-from)))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6750 ;; Email address in From field matches |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6751 ;; 'message-alternative-emails' regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6752 (and from |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6753 message-alternative-emails |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6754 (string-match |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6755 message-alternative-emails |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6756 (car (mail-header-parse-address from)))))))))) |
17493 | 6757 |
6758 ;;;###autoload | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6759 (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
|
6760 "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
|
6761 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
|
6762 (interactive "P") |
17493 | 6763 (unless (message-news-p) |
6764 (error "This is not a news article; canceling is impossible")) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6765 (let (from newsgroups message-id distribution buf) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6766 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6767 ;; Get header info from original article. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6768 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6769 (message-narrow-to-head-1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6770 (setq from (message-fetch-field "from") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6771 newsgroups (message-fetch-field "newsgroups") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6772 message-id (message-fetch-field "message-id" t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6773 distribution (message-fetch-field "distribution"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6774 ;; Make sure that this article was written by the user. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6775 (unless (message-is-yours-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6776 (error "This article is not yours")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6777 (when (yes-or-no-p "Do you really want to cancel this article? ") |
17493 | 6778 ;; Make control message. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6779 (if arg |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6780 (message-news) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6781 (setq buf (set-buffer (get-buffer-create " *message cancel*")))) |
17493 | 6782 (erase-buffer) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6783 (insert "Newsgroups: " newsgroups "\n" |
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6784 "From: " from "\n" |
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6785 "Subject: cmsg cancel " message-id "\n" |
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6786 "Control: cancel " message-id "\n" |
17493 | 6787 (if distribution |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6788 (concat "Distribution: " distribution "\n") |
17493 | 6789 "") |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6790 mail-header-separator "\n" |
17493 | 6791 message-cancel-message) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6792 (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
|
6793 (unless arg |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6794 (message "Canceling your article...") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6795 (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
|
6796 '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
|
6797 (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
|
6798 (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
|
6799 (kill-buffer buf)))))) |
17493 | 6800 |
6801 ;;;###autoload | |
6802 (defun message-supersede () | |
6803 "Start composing a message to supersede the current message. | |
6804 This is done simply by taking the old article and adding a Supersedes | |
6805 header line with the old Message-ID." | |
6806 (interactive) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6807 (let ((cur (current-buffer))) |
17493 | 6808 ;; Check whether the user owns the article that is to be superseded. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6809 (unless (message-is-yours-p) |
17493 | 6810 (error "This article is not yours")) |
6811 ;; Get a normal message buffer. | |
6812 (message-pop-to-buffer (message-buffer-name "supersede")) | |
6813 (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
|
6814 (mime-to-mml) |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6815 (message-narrow-to-head-1) |
17493 | 6816 ;; Remove unwanted headers. |
6817 (when message-ignored-supersedes-headers | |
6818 (message-remove-header message-ignored-supersedes-headers t)) | |
6819 (goto-char (point-min)) | |
6820 (if (not (re-search-forward "^Message-ID: " nil t)) | |
6821 (error "No Message-ID in this article") | |
6822 (replace-match "Supersedes: " t t)) | |
6823 (goto-char (point-max)) | |
6824 (insert mail-header-separator) | |
6825 (widen) | |
6826 (forward-line 1))) | |
6827 | |
6828 ;;;###autoload | |
6829 (defun message-recover () | |
6830 "Reread contents of current buffer from its last auto-save file." | |
6831 (interactive) | |
6832 (let ((file-name (make-auto-save-file-name))) | |
6833 (cond ((save-window-excursion | |
6834 (if (not (eq system-type 'vax-vms)) | |
6835 (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
|
6836 (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
|
6837 (fundamental-mode)) ; for Emacs 20.4+ |
17493 | 6838 (buffer-disable-undo standard-output) |
6839 (let ((default-directory "/")) | |
6840 (call-process | |
6841 "ls" nil standard-output nil "-l" file-name)))) | |
6842 (yes-or-no-p (format "Recover auto save file %s? " file-name))) | |
6843 (let ((buffer-read-only nil)) | |
6844 (erase-buffer) | |
6845 (insert-file-contents file-name nil))) | |
6846 (t (error "message-recover cancelled"))))) | |
6847 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6848 ;;; Washing Subject: |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6849 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6850 (defun message-wash-subject (subject) |
35147 | 6851 "Remove junk like \"Re:\", \"(fwd)\", etc. added to subject string SUBJECT. |
6852 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
|
6853 (with-temp-buffer |
41494
933ab100fb4a
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36856
diff
changeset
|
6854 (insert subject) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6855 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6856 ;; 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
|
6857 (while (re-search-forward |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6858 "\\([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
|
6859 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6860 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6861 ;; 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
|
6862 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6863 (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
|
6864 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6865 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6866 ;; and off the end |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6867 (goto-char (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6868 (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
|
6869 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6870 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6871 ;; 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
|
6872 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6873 (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
|
6874 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6875 (goto-char (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6876 (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
|
6877 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6878 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6879 (buffer-string))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6880 |
17493 | 6881 ;;; Forwarding messages. |
6882 | |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6883 (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
|
6884 "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
|
6885 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6886 (defun message-forward-subject-name-subject (subject) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6887 "Generate a SUBJECT for a forwarded message. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6888 The form is: [Source] Subject, where if the original message was mail, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6889 Source is the name of the sender, and if the original message was |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6890 news, Source is the list of newsgroups is was posted to." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6891 (let* ((group (message-fetch-field "newsgroups")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6892 (from (message-fetch-field "from")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6893 (prefix |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6894 (if group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6895 (gnus-group-decoded-name group) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6896 (or (and from (or |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6897 (car (gnus-extract-address-components from)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6898 (cadr (gnus-extract-address-components from)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6899 "(nowhere)")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6900 (concat "[" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6901 (if message-forward-decoded-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6902 prefix |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6903 (mail-decode-encoded-word-string prefix)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6904 "] " subject))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6905 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6906 (defun message-forward-subject-author-subject (subject) |
35147 | 6907 "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
|
6908 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
|
6909 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
|
6910 the list of newsgroups is was posted to." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6911 (let* ((group (message-fetch-field "newsgroups")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6912 (prefix |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6913 (if group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6914 (gnus-group-decoded-name group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6915 (or (message-fetch-field "from") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6916 "(nowhere)")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6917 (concat "[" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6918 (if message-forward-decoded-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6919 prefix |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6920 (mail-decode-encoded-word-string prefix)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6921 "] " subject))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6922 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6923 (defun message-forward-subject-fwd (subject) |
35147 | 6924 "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
|
6925 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
|
6926 the message." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6927 (if (string-match "^Fwd: " subject) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6928 subject |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6929 (concat "Fwd: " subject))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6930 |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6931 (defun message-make-forward-subject () |
17493 | 6932 "Return a Subject header suitable for the message in the current buffer." |
6933 (save-excursion | |
6934 (save-restriction | |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6935 (message-narrow-to-head-1) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6936 (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
|
6937 (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
|
6938 (setq subject |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6939 (if subject |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6940 (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
|
6941 subject |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35453
diff
changeset
|
6942 (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
|
6943 "")) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6944 (when message-wash-forwarded-subjects |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6945 (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
|
6946 ;; Make sure funcs is a list. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6947 (and funcs |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6948 (not (listp funcs)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6949 (setq funcs (list funcs))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6950 ;; 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
|
6951 ;; func to the next one. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6952 (dolist (func funcs) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6953 (when (functionp func) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6954 (setq subject (funcall func subject)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6955 subject)))) |
17493 | 6956 |
86154 | 6957 (defvar gnus-article-decoded-p) |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6958 |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6959 |
17493 | 6960 ;;;###autoload |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6961 (defun message-forward (&optional news digest) |
17493 | 6962 "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
|
6963 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
|
6964 Optional DIGEST will use digest to forward." |
17493 | 6965 (interactive "P") |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
6966 (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
|
6967 (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
|
6968 (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
|
6969 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
|
6970 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
|
6971 (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
|
6972 (if news |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6973 (message-news nil subject) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6974 (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
|
6975 (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
|
6976 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6977 (defun message-forward-make-body-plain (forward-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6978 (insert |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6979 "\n-------------------- Start of forwarded message --------------------\n") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6980 (let ((b (point)) e) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6981 (insert |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6982 (with-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6983 (mm-disable-multibyte) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6984 (insert |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6985 (with-current-buffer forward-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6986 (mm-with-unibyte-current-buffer (buffer-string)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6987 (mm-enable-multibyte) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6988 (mime-to-mml) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6989 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6990 (when (looking-at "From ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6991 (replace-match "X-From-Line: ")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6992 (buffer-string))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6993 (setq e (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6994 (insert |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6995 "\n-------------------- End of forwarded message --------------------\n") |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6996 (message-remove-ignored-headers b e))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6997 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6998 (defun message-remove-ignored-headers (b e) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6999 (when message-forward-ignored-headers |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7000 (save-restriction |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7001 (narrow-to-region b e) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7002 (goto-char b) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7003 (narrow-to-region (point) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7004 (or (search-forward "\n\n" nil t) (point))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7005 (let ((ignored (if (stringp message-forward-ignored-headers) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7006 (list message-forward-ignored-headers) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7007 message-forward-ignored-headers))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7008 (dolist (elem ignored) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7009 (message-remove-header elem t)))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7010 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7011 (defun message-forward-make-body-mime (forward-buffer) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7012 (let ((b (point))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7013 (insert "\n\n<#part type=message/rfc822 disposition=inline raw=t>\n") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7014 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7015 (narrow-to-region (point) (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7016 (mml-insert-buffer forward-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7017 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7018 (when (looking-at "From ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7019 (replace-match "X-From-Line: ")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7020 (goto-char (point-max))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7021 (insert "<#/part>\n") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7022 ;; Consider there is no illegible text. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7023 (add-text-properties |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7024 b (point) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7025 `(no-illegible-text t rear-nonsticky t start-open t)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7026 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7027 (defun message-forward-make-body-mml (forward-buffer) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7028 (insert "\n\n<#mml type=message/rfc822 disposition=inline>\n") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7029 (let ((b (point)) e) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7030 (if (not message-forward-decoded-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7031 (insert |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7032 (with-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7033 (mm-disable-multibyte) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7034 (insert |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7035 (with-current-buffer forward-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7036 (mm-with-unibyte-current-buffer (buffer-string)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7037 (mm-enable-multibyte) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7038 (mime-to-mml) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7039 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7040 (when (looking-at "From ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7041 (replace-match "X-From-Line: ")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7042 (buffer-string))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7043 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7044 (narrow-to-region (point) (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7045 (mml-insert-buffer forward-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7046 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7047 (when (looking-at "From ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7048 (replace-match "X-From-Line: ")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7049 (goto-char (point-max)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7050 (setq e (point)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7051 (insert "<#/mml>\n") |
58835
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
57856
diff
changeset
|
7052 (when (and (not message-forward-decoded-p) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7053 message-forward-ignored-headers) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7054 (message-remove-ignored-headers b e)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7055 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7056 (defun message-forward-make-body-digest-plain (forward-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7057 (insert |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7058 "\n-------------------- Start of forwarded message --------------------\n") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7059 (let ((b (point)) e) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7060 (mml-insert-buffer forward-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7061 (setq e (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7062 (insert |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7063 "\n-------------------- End of forwarded message --------------------\n"))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7064 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7065 (defun message-forward-make-body-digest-mime (forward-buffer) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7066 (insert "\n<#multipart type=digest>\n") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7067 (let ((b (point)) e) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7068 (insert-buffer-substring forward-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7069 (setq e (point)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7070 (insert "<#/multipart>\n") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7071 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7072 (narrow-to-region b e) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7073 (goto-char b) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7074 (narrow-to-region (point) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7075 (or (search-forward "\n\n" nil t) (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7076 (delete-region (point-min) (point-max))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7077 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7078 (defun message-forward-make-body-digest (forward-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7079 (if message-forward-as-mime |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7080 (message-forward-make-body-digest-mime forward-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7081 (message-forward-make-body-digest-plain forward-buffer))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7082 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7083 (eval-and-compile |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7084 (autoload 'mm-uu-dissect-text-parts "mm-uu") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7085 (autoload 'mm-uu-dissect "mm-uu")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7086 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7087 (defun message-signed-or-encrypted-p (&optional dont-emulate-mime handles) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7088 "Say whether the current buffer contains signed or encrypted message. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7089 If DONT-EMULATE-MIME is nil, this function does the MIME emulation on |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7090 messages that don't conform to PGP/MIME described in RFC2015. HANDLES |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7091 is for the internal use." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7092 (unless handles |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7093 (let ((mm-decrypt-option 'never) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7094 (mm-verify-option 'never)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7095 (if (setq handles (mm-dissect-buffer nil t)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7096 (unless dont-emulate-mime |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7097 (mm-uu-dissect-text-parts handles)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7098 (unless dont-emulate-mime |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7099 (setq handles (mm-uu-dissect)))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7100 ;; Check text/plain message in which there is a signed or encrypted |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7101 ;; body that has been encoded by B or Q. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7102 (unless (or handles dont-emulate-mime) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7103 (let ((cur (current-buffer)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7104 (mm-decrypt-option 'never) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7105 (mm-verify-option 'never)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7106 (with-temp-buffer |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7107 (insert-buffer-substring cur) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7108 (when (setq handles (mm-dissect-buffer t t)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7109 (if (and (prog1 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7110 (bufferp (car handles)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7111 (mm-destroy-parts handles)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7112 (equal (mm-handle-media-type handles) "text/plain")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7113 (progn |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7114 (mm-decode-content-transfer-encoding |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7115 (mm-handle-encoding handles)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7116 (setq handles (mm-uu-dissect))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7117 (setq handles nil)))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7118 (when handles |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7119 (prog1 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7120 (catch 'found |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7121 (dolist (handle (if (stringp (car handles)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7122 (if (member (car handles) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7123 '("multipart/signed" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7124 "multipart/encrypted")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7125 (throw 'found t) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7126 (cdr handles)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7127 (list handles))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7128 (if (stringp (car handle)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7129 (when (message-signed-or-encrypted-p dont-emulate-mime handle) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7130 (throw 'found t)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7131 (when (and (bufferp (car handle)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7132 (equal (mm-handle-media-type handle) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7133 "message/rfc822")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7134 (with-current-buffer (mm-handle-buffer handle) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7135 (when (message-signed-or-encrypted-p dont-emulate-mime) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7136 (throw 'found t))))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7137 (mm-destroy-parts handles)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7138 |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7139 ;;;###autoload |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7140 (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
|
7141 ;; 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
|
7142 ;; message. |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7143 (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
|
7144 (message-goto-body) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7145 (goto-char (point-max))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7146 (if digest |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7147 (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
|
7148 (if message-forward-as-mime |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7149 (if (and message-forward-show-mml |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7150 (not (and (eq message-forward-show-mml 'best) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7151 ;; Use the raw form in the body if it contains |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7152 ;; signed or encrypted message so as not to be |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7153 ;; destroyed by re-encoding. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7154 (with-current-buffer forward-buffer |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7155 (condition-case nil |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7156 (message-signed-or-encrypted-p) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7157 (error t)))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7158 (message-forward-make-body-mml forward-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7159 (message-forward-make-body-mime forward-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7160 (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
|
7161 (message-position-point)) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7162 |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7163 ;;;###autoload |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7164 (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
|
7165 (save-window-excursion |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7166 (set-buffer forward-buffer) |
43075
e14b8be37d7d
* message.el (message-forward-rmail-make-body): Directly use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42475
diff
changeset
|
7167 (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
|
7168 (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
|
7169 (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
|
7170 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7171 ;; 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
|
7172 ;;;###autoload |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7173 (defun message-insinuate-rmail () |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7174 "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
|
7175 (interactive) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7176 (setq rmail-enable-mime-composing t) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49034
diff
changeset
|
7177 (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
|
7178 'message-forward-rmail-make-body)) |
17493 | 7179 |
7180 ;;;###autoload | |
7181 (defun message-resend (address) | |
7182 "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
|
7183 (interactive |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7184 (list (message-read-from-minibuffer "Resend message to: "))) |
17493 | 7185 (message "Resending message to %s..." address) |
7186 (save-excursion | |
7187 (let ((cur (current-buffer)) | |
7188 beg) | |
7189 ;; 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
|
7190 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7191 (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
|
7192 (erase-buffer)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7193 (let ((message-this-is-mail t) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7194 message-generate-hashcash |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7195 message-setup-hook) |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7196 (message-setup `((To . ,address)))) |
17493 | 7197 ;; Insert our usual headers. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7198 (message-generate-headers '(From Date To Message-ID)) |
17493 | 7199 (message-narrow-to-headers) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7200 ;; Remove X-Draft-From header etc. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7201 (message-remove-header message-ignored-mail-headers t) |
17493 | 7202 ;; Rename them all to "Resent-*". |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7203 (goto-char (point-min)) |
17493 | 7204 (while (re-search-forward "^[A-Za-z]" nil t) |
7205 (forward-char -1) | |
7206 (insert "Resent-")) | |
7207 (widen) | |
7208 (forward-line) | |
7209 (delete-region (point) (point-max)) | |
7210 (setq beg (point)) | |
7211 ;; Insert the message to be resent. | |
7212 (insert-buffer-substring cur) | |
7213 (goto-char (point-min)) | |
7214 (search-forward "\n\n") | |
7215 (forward-char -1) | |
7216 (save-restriction | |
7217 (narrow-to-region beg (point)) | |
7218 (message-remove-header message-ignored-resent-headers t) | |
7219 (goto-char (point-max))) | |
7220 (insert mail-header-separator) | |
7221 ;; 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
|
7222 (while (re-search-backward "^\\(Also-\\)*Resent-" beg t) |
17493 | 7223 (beginning-of-line) |
7224 (insert "Also-")) | |
7225 ;; Quote any "From " lines at the beginning. | |
7226 (goto-char beg) | |
7227 (when (looking-at "From ") | |
7228 (replace-match "X-From-Line: ")) | |
7229 ;; Send it. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7230 (let ((message-inhibit-body-encoding t) |
61126
c0aa521e0ca7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-220
Miles Bader <miles@gnu.org>
parents:
60655
diff
changeset
|
7231 message-required-mail-headers |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7232 message-generate-hashcash |
61126
c0aa521e0ca7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-220
Miles Bader <miles@gnu.org>
parents:
60655
diff
changeset
|
7233 rfc2047-encode-encoded-words) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7234 (message-send-mail)) |
17493 | 7235 (kill-buffer (current-buffer))) |
7236 (message "Resending message to %s...done" address))) | |
7237 | |
7238 ;;;###autoload | |
7239 (defun message-bounce () | |
7240 "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
|
7241 This only makes sense if the current message is a bounce message that |
17493 | 7242 contains some mail you have written which has been bounced back to |
7243 you." | |
7244 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7245 (let ((handles (mm-dissect-buffer t)) |
17493 | 7246 boundary) |
7247 (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
|
7248 (if (stringp (car handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7249 ;; 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
|
7250 (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
|
7251 ;; 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
|
7252 ;; manually. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7253 (mm-insert-part handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7254 (undo-boundary) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7255 (goto-char (point-min)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7256 (re-search-forward "\n\n+" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7257 (setq boundary (point)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7258 ;; We remove everything before the bounced mail. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7259 (if (or (re-search-forward message-unsent-separator nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7260 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7261 (search-forward "\n\n" nil 'move) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7262 (re-search-backward "^Return-Path:.*\n" boundary t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7263 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7264 (forward-line 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7265 (delete-region (point-min) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7266 (if (re-search-forward "^[^ \n\t]+:" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7267 (match-beginning 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7268 (point)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7269 (goto-char boundary) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7270 (when (re-search-backward "^.?From .*\n" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7271 (delete-region (match-beginning 0) (match-end 0))))) |
78369 | 7272 (mime-to-mml) |
17493 | 7273 (save-restriction |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
7274 (message-narrow-to-head-1) |
17493 | 7275 (message-remove-header message-ignored-bounced-headers t) |
7276 (goto-char (point-max)) | |
7277 (insert mail-header-separator)) | |
7278 (message-position-point))) | |
7279 | |
7280 ;;; | |
7281 ;;; Interactive entry points for new message buffers. | |
7282 ;;; | |
7283 | |
7284 ;;;###autoload | |
7285 (defun message-mail-other-window (&optional to subject) | |
7286 "Like `message-mail' command, but display mail buffer in another window." | |
7287 (interactive) | |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7288 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7289 (let ((pop-up-windows t) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7290 (special-display-buffer-names nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7291 (special-display-regexps nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7292 (same-window-buffer-names nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7293 (same-window-regexps nil)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7294 (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
|
7295 (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
|
7296 (message-setup `((To . ,(or to "")) (Subject . ,(or subject ""))) |
76650 | 7297 nil nil nil 'switch-to-buffer-other-window))) |
17493 | 7298 |
7299 ;;;###autoload | |
7300 (defun message-mail-other-frame (&optional to subject) | |
7301 "Like `message-mail' command, but display mail buffer in another frame." | |
7302 (interactive) | |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7303 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7304 (let ((pop-up-frames t) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7305 (special-display-buffer-names nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7306 (special-display-regexps nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7307 (same-window-buffer-names nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7308 (same-window-regexps nil)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7309 (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
|
7310 (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
|
7311 (message-setup `((To . ,(or to "")) (Subject . ,(or subject ""))) |
76650 | 7312 nil nil nil 'switch-to-buffer-other-frame))) |
17493 | 7313 |
7314 ;;;###autoload | |
7315 (defun message-news-other-window (&optional newsgroups subject) | |
7316 "Start editing a news article to be sent." | |
7317 (interactive) | |
7318 (let ((pop-up-windows t) | |
7319 (special-display-buffer-names nil) | |
7320 (special-display-regexps nil) | |
7321 (same-window-buffer-names nil) | |
7322 (same-window-regexps nil)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7323 (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
|
7324 (let ((message-this-is-news t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7325 (message-setup `((Newsgroups . ,(or newsgroups "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7326 (Subject . ,(or subject "")))))) |
17493 | 7327 |
7328 ;;;###autoload | |
7329 (defun message-news-other-frame (&optional newsgroups subject) | |
7330 "Start editing a news article to be sent." | |
7331 (interactive) | |
7332 (let ((pop-up-frames t) | |
7333 (special-display-buffer-names nil) | |
7334 (special-display-regexps nil) | |
7335 (same-window-buffer-names nil) | |
7336 (same-window-regexps nil)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7337 (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
|
7338 (let ((message-this-is-news t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7339 (message-setup `((Newsgroups . ,(or newsgroups "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7340 (Subject . ,(or subject "")))))) |
17493 | 7341 |
7342 ;;; underline.el | |
7343 | |
7344 ;; This code should be moved to underline.el (from which it is stolen). | |
7345 | |
7346 ;;;###autoload | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7347 (defun message-bold-region (start end) |
17493 | 7348 "Bold all nonblank characters in the region. |
7349 Works by overstriking characters. | |
7350 Called from program, takes two arguments START and END | |
7351 which specify the range to operate on." | |
7352 (interactive "r") | |
7353 (save-excursion | |
7354 (let ((end1 (make-marker))) | |
7355 (move-marker end1 (max start end)) | |
7356 (goto-char (min start end)) | |
7357 (while (< (point) end1) | |
7358 (or (looking-at "[_\^@- ]") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7359 (insert (char-after) "\b")) |
17493 | 7360 (forward-char 1))))) |
7361 | |
7362 ;;;###autoload | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7363 (defun message-unbold-region (start end) |
17493 | 7364 "Remove all boldness (overstruck characters) in the region. |
7365 Called from program, takes two arguments START and END | |
7366 which specify the range to operate on." | |
7367 (interactive "r") | |
7368 (save-excursion | |
7369 (let ((end1 (make-marker))) | |
7370 (move-marker end1 (max start end)) | |
7371 (goto-char (min start end)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7372 (while (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
|
7373 (if (eq (char-after) (char-after (- (point) 2))) |
17493 | 7374 (delete-char -2)))))) |
7375 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7376 (defun message-exchange-point-and-mark () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7377 "Exchange point and mark, but don't activate region if it was inactive." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7378 (unless (prog1 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7379 (message-mark-active-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7380 (exchange-point-and-mark)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7381 (setq mark-active nil))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7382 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7383 (defalias 'message-make-overlay 'make-overlay) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7384 (defalias 'message-delete-overlay 'delete-overlay) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7385 (defalias 'message-overlay-put 'overlay-put) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7386 (defun message-kill-all-overlays () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7387 (if (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7388 (map-extents (lambda (extent ignore) (delete-extent extent))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7389 (mapcar #'delete-overlay (overlays-in (point-min) (point-max))))) |
17493 | 7390 |
7391 ;; Support for toolbar | |
86154 | 7392 (defvar tool-bar-mode) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7393 |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7394 ;; Note: The :set function in the `message-tool-bar*' variables will only |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7395 ;; affect _new_ message buffers. We might add a function that walks thru all |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7396 ;; message-mode buffers and force the update. |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7397 (defun message-tool-bar-update (&optional symbol value) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7398 "Update message mode toolbar. |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7399 Setter function for custom variables." |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7400 (setq-default message-tool-bar-map nil) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7401 (when symbol |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7402 ;; When used as ":set" function: |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7403 (set-default symbol value))) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7404 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7405 (defcustom message-tool-bar (if (eq gmm-tool-bar-style 'gnome) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7406 'message-tool-bar-gnome |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7407 'message-tool-bar-retro) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7408 "Specifies the message mode tool bar. |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7409 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7410 It can be either a list or a symbol refering to a list. See |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7411 `gmm-tool-bar-from-list' for the format of the list. The |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7412 default key map is `message-mode-map'. |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7413 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7414 Pre-defined symbols include `message-tool-bar-gnome' and |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7415 `message-tool-bar-retro'." |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7416 :type '(repeat gmm-tool-bar-list-item) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7417 :type '(choice (const :tag "GNOME style" message-tool-bar-gnome) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7418 (const :tag "Retro look" message-tool-bar-retro) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7419 (repeat :tag "User defined list" gmm-tool-bar-item) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7420 (symbol)) |
92336
5f827896103e
Change defcustom :version from 23.0 to 23.1.
Glenn Morris <rgm@gnu.org>
parents:
92147
diff
changeset
|
7421 :version "23.1" ;; No Gnus |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7422 :initialize 'custom-initialize-default |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7423 :set 'message-tool-bar-update |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7424 :group 'message) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7425 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7426 (defcustom message-tool-bar-gnome |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7427 '((ispell-message "spell" nil |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7428 :visible (or (not (boundp 'flyspell-mode)) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7429 (not flyspell-mode))) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7430 (flyspell-buffer "spell" t |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7431 :visible (and (boundp 'flyspell-mode) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7432 flyspell-mode) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7433 :help "Flyspell whole buffer") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7434 (gmm-ignore "separator") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7435 (message-send-and-exit "mail/send") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7436 (message-dont-send "mail/save-draft") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7437 (message-kill-buffer "close") ;; stock_cancel |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7438 (mml-attach-file "attach" mml-mode-map) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7439 (mml-preview "mail/preview" mml-mode-map) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7440 (mml-secure-message-sign-encrypt "lock" mml-mode-map :visible nil) |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7441 (message-insert-importance-high "important" nil :visible nil) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7442 (message-insert-importance-low "unimportant" nil :visible nil) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7443 (message-insert-disposition-notification-to "receipt" nil :visible nil) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7444 (gmm-customize-mode "preferences" t :help "Edit mode preferences") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7445 (message-info "help" t :help "Message manual")) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7446 "List of items for the message tool bar (GNOME style). |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7447 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7448 See `gmm-tool-bar-from-list' for details on the format of the list." |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7449 :type '(repeat gmm-tool-bar-item) |
92336
5f827896103e
Change defcustom :version from 23.0 to 23.1.
Glenn Morris <rgm@gnu.org>
parents:
92147
diff
changeset
|
7450 :version "23.1" ;; No Gnus |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7451 :initialize 'custom-initialize-default |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7452 :set 'message-tool-bar-update |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7453 :group 'message) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7454 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7455 (defcustom message-tool-bar-retro |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7456 '(;; Old Emacs 21 icon for consistency. |
79475
609b256953a6
(message-tool-bar-retro): Update for rename mail_send.xpm->mail-send.xpm.
Glenn Morris <rgm@gnu.org>
parents:
79313
diff
changeset
|
7457 (message-send-and-exit "gnus/mail-send") |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7458 (message-kill-buffer "close") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7459 (message-dont-send "cancel") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7460 (mml-attach-file "attach" mml-mode-map) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7461 (ispell-message "spell") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7462 (mml-preview "preview" mml-mode-map) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7463 (message-insert-importance-high "gnus/important") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7464 (message-insert-importance-low "gnus/unimportant") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7465 (message-insert-disposition-notification-to "gnus/receipt")) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7466 "List of items for the message tool bar (retro style). |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7467 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7468 See `gmm-tool-bar-from-list' for details on the format of the list." |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7469 :type '(repeat gmm-tool-bar-item) |
92336
5f827896103e
Change defcustom :version from 23.0 to 23.1.
Glenn Morris <rgm@gnu.org>
parents:
92147
diff
changeset
|
7470 :version "23.1" ;; No Gnus |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7471 :initialize 'custom-initialize-default |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7472 :set 'message-tool-bar-update |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7473 :group 'message) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7474 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7475 (defcustom message-tool-bar-zap-list |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7476 '(new-file open-file dired kill-buffer write-file |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7477 print-buffer customize help) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7478 "List of icon items from the global tool bar. |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7479 These items are not displayed on the message mode tool bar. |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7480 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7481 See `gmm-tool-bar-from-list' for the format of the list." |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7482 :type 'gmm-tool-bar-zap-list |
92336
5f827896103e
Change defcustom :version from 23.0 to 23.1.
Glenn Morris <rgm@gnu.org>
parents:
92147
diff
changeset
|
7483 :version "23.1" ;; No Gnus |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7484 :initialize 'custom-initialize-default |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7485 :set 'message-tool-bar-update |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7486 :group 'message) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7487 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7488 (defvar image-load-path) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7489 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7490 (defun message-make-tool-bar (&optional force) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7491 "Make a message mode tool bar from `message-tool-bar-list'. |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7492 When FORCE, rebuild the tool bar." |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7493 (when (and (not (featurep 'xemacs)) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7494 (boundp 'tool-bar-mode) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7495 tool-bar-mode |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7496 (or (not message-tool-bar-map) force)) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7497 (setq message-tool-bar-map |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7498 (let* ((load-path |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7499 (gmm-image-load-path-for-library "message" |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7500 "mail/save-draft.xpm" |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7501 nil t)) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7502 (image-load-path (cons (car load-path) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7503 (when (boundp 'image-load-path) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7504 image-load-path)))) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7505 (gmm-tool-bar-from-list message-tool-bar |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7506 message-tool-bar-zap-list |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7507 'message-mode-map)))) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7508 message-tool-bar-map) |
17493 | 7509 |
7510 ;;; Group name completion. | |
7511 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7512 (defcustom message-newgroups-header-regexp |
17493 | 7513 "^\\(Newsgroups\\|Followup-To\\|Posted-To\\|Gcc\\):" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7514 "Regexp that match headers that lists groups." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7515 :group 'message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7516 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7517 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7518 (defcustom message-completion-alist |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7519 (list (cons message-newgroups-header-regexp 'message-expand-group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7520 '("^\\(Resent-\\)?\\(To\\|B?Cc\\):" . message-expand-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7521 '("^\\(Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7522 . message-expand-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7523 '("^\\(Disposition-Notification-To\\|Return-Receipt-To\\):" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7524 . message-expand-name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7525 "Alist of (RE . FUN). Use FUN for completion on header lines matching RE." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
7526 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7527 :group 'message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7528 :type '(alist :key-type regexp :value-type function)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7529 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7530 (defcustom message-expand-name-databases |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7531 (list 'bbdb 'eudc) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7532 "List of databases to try for name completion (`message-expand-name'). |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7533 Each element is a symbol and can be `bbdb' or `eudc'." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7534 :group 'message |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7535 :type '(set (const bbdb) (const eudc))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7536 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7537 (defcustom message-tab-body-function nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7538 "*Function to execute when `message-tab' (TAB) is executed in the body. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7539 If nil, the function bound in `text-mode-map' or `global-map' is executed." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
7540 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7541 :group 'message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7542 :link '(custom-manual "(message)Various Commands") |
65342
c71b1b2d2d04
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-530
Miles Bader <miles@gnu.org>
parents:
64780
diff
changeset
|
7543 :type '(choice (const nil) |
c71b1b2d2d04
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-530
Miles Bader <miles@gnu.org>
parents:
64780
diff
changeset
|
7544 function)) |
17493 | 7545 |
87191
066a2efbc9c8
(declare-function): Add compatibility declaration.
Glenn Morris <rgm@gnu.org>
parents:
87097
diff
changeset
|
7546 (declare-function mail-abbrev-in-expansion-header-p "mailabbrev" ()) |
066a2efbc9c8
(declare-function): Add compatibility declaration.
Glenn Morris <rgm@gnu.org>
parents:
87097
diff
changeset
|
7547 |
17493 | 7548 (defun message-tab () |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7549 "Complete names according to `message-completion-alist'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7550 Execute function specified by `message-tab-body-function' when not in |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7551 those headers." |
17493 | 7552 (interactive) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7553 (let ((alist message-completion-alist)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7554 (while (and alist |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7555 (let ((mail-abbrev-mode-regexp (caar alist))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7556 (not (mail-abbrev-in-expansion-header-p)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7557 (setq alist (cdr alist))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7558 (funcall (or (cdar alist) message-tab-body-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7559 (lookup-key text-mode-map "\t") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7560 (lookup-key global-map "\t") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7561 'indent-relative)))) |
17493 | 7562 |
66573
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7563 (eval-and-compile |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7564 (condition-case nil |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7565 (with-temp-buffer |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7566 (let ((standard-output (current-buffer))) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7567 (eval '(display-completion-list nil ""))) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7568 (defalias 'message-display-completion-list 'display-completion-list)) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7569 (error ;; Don't use `wrong-number-of-arguments' here because of XEmacs. |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7570 (defun message-display-completion-list (completions &optional ignore) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7571 "Display the list of completions, COMPLETIONS, using `standard-output'." |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7572 (display-completion-list completions))))) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7573 |
17493 | 7574 (defun message-expand-group () |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7575 "Expand the group name under point." |
17493 | 7576 (let* ((b (save-excursion |
7577 (save-restriction | |
7578 (narrow-to-region | |
7579 (save-excursion | |
7580 (beginning-of-line) | |
7581 (skip-chars-forward "^:") | |
7582 (1+ (point))) | |
7583 (point)) | |
7584 (skip-chars-backward "^, \t\n") (point)))) | |
7585 (completion-ignore-case t) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7586 (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
|
7587 (point)))) |
17493 | 7588 (hashtb (and (boundp 'gnus-active-hashtb) gnus-active-hashtb)) |
7589 (completions (all-completions string hashtb)) | |
7590 comp) | |
7591 (delete-region b (point)) | |
7592 (cond | |
7593 ((= (length completions) 1) | |
7594 (if (string= (car completions) string) | |
7595 (progn | |
7596 (insert string) | |
7597 (message "Only matching group")) | |
7598 (insert (car completions)))) | |
7599 ((and (setq comp (try-completion string hashtb)) | |
7600 (not (string= comp string))) | |
7601 (insert comp)) | |
7602 (t | |
7603 (insert string) | |
7604 (if (not comp) | |
7605 (message "No matching groups") | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7606 (save-selected-window |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7607 (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
|
7608 (buffer-disable-undo) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7609 (let ((buffer-read-only nil)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7610 (erase-buffer) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7611 (let ((standard-output (current-buffer))) |
66573
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7612 (message-display-completion-list (sort completions 'string<) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7613 string)) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7614 (setq buffer-read-only nil) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7615 (goto-char (point-min)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7616 (delete-region (point) (progn (forward-line 3) (point)))))))))) |
17493 | 7617 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7618 (defun message-expand-name () |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7619 (cond ((and (memq 'eudc message-expand-name-databases) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7620 (boundp 'eudc-protocol) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7621 eudc-protocol) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7622 (eudc-expand-inline)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7623 ((and (memq 'bbdb message-expand-name-databases) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7624 (fboundp 'bbdb-complete-name)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7625 (bbdb-complete-name)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7626 (t |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7627 (expand-abbrev)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7628 |
17493 | 7629 ;;; Help stuff. |
7630 | |
7631 (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
|
7632 "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
|
7633 If SHOW is non-nil, the arguments TEXT... are displayed in a temp buffer. |
17493 | 7634 The following arguments may contain lists of values." |
7635 (if (and show | |
7636 (setq text (message-flatten-list text))) | |
7637 (save-window-excursion | |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
7638 (with-output-to-temp-buffer " *MESSAGE information message*" |
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
7639 (with-current-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
|
7640 (fundamental-mode) ; for Emacs 20.4+ |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7641 (mapc 'princ text) |
17493 | 7642 (goto-char (point-min)))) |
7643 (funcall ask question)) | |
7644 (funcall ask question))) | |
7645 | |
7646 (defun message-flatten-list (list) | |
7647 "Return a new, flat list that contains all elements of LIST. | |
7648 | |
7649 \(message-flatten-list '(1 (2 3 (4 5 (6))) 7)) | |
7650 => (1 2 3 4 5 6 7)" | |
7651 (cond ((consp list) | |
7652 (apply 'append (mapcar 'message-flatten-list list))) | |
7653 (list | |
7654 (list list)))) | |
7655 | |
7656 (defun message-generate-new-buffer-clone-locals (name &optional varstr) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7657 "Create and return a buffer with name based on NAME using `generate-new-buffer'. |
17493 | 7658 Then clone the local variables and values from the old buffer to the |
7659 new one, cloning only the locals having a substring matching the | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7660 regexp VARSTR." |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7661 (let ((oldbuf (current-buffer))) |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
7662 (with-current-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
|
7663 (message-clone-locals oldbuf varstr) |
17493 | 7664 (current-buffer)))) |
7665 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7666 (defun message-clone-locals (buffer &optional varstr) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7667 "Clone the local variables from BUFFER to the current buffer." |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
7668 (let ((locals (with-current-buffer buffer (buffer-local-variables))) |
57243
c5e16264557d
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-575
Miles Bader <miles@gnu.org>
parents:
57153
diff
changeset
|
7669 (regexp "^gnus\\|^nn\\|^message\\|^sendmail\\|^smtp\\|^user-mail-address")) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7670 (mapcar |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7671 (lambda (local) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7672 (when (and (consp local) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7673 (car local) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7674 (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
|
7675 (or (null varstr) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7676 (string-match varstr (symbol-name (car local))))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7677 (ignore-errors |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7678 (set (make-local-variable (car local)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7679 (cdr local))))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7680 locals))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7681 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7682 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7683 ;;; MIME functions |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7684 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7685 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7686 (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
|
7687 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7688 (defun message-encode-message-body () |
35147 | 7689 (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
|
7690 (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
|
7691 message-default-charset)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7692 (case-fold-search t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7693 lines content-type-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7694 (message-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7695 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7696 (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
|
7697 (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
|
7698 (when new |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7699 (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
|
7700 (insert new) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7701 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7702 (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
|
7703 (delete-char 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7704 (search-forward "\n\n") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7705 (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
|
7706 (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
|
7707 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7708 (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
|
7709 (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
|
7710 (goto-char (point-max)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7711 (insert "MIME-Version: 1.0\n") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7712 (when lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7713 (insert lines)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7714 (setq content-type-p |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7715 (or mml-boundary |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7716 (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
|
7717 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7718 (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
|
7719 (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
|
7720 (message-remove-first-header "Content-Transfer-Encoding")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7721 ;; We always make sure that the message has a Content-Type |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7722 ;; header. This is because some broken MTAs and MUAs get |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7723 ;; awfully confused when confronted with a message with a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7724 ;; MIME-Version header and without a Content-Type header. For |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7725 ;; 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
|
7726 (unless content-type-p |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7727 (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
|
7728 ;; 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
|
7729 (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
|
7730 (forward-line 1) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7731 (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
|
7732 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7733 (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
|
7734 "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
|
7735 (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
|
7736 (let ((mail-abbrev-mode-regexp "") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7737 (minibuffer-setup-hook 'mail-abbrevs-setup) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7738 (minibuffer-local-map message-minibuffer-local-map)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7739 (read-from-minibuffer prompt initial-contents)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7740 (let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7741 (minibuffer-local-map message-minibuffer-local-map)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7742 (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
|
7743 |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7744 (defun message-use-alternative-email-as-from () |
68521
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
7745 "Set From field of the outgoing message to the first matching |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
7746 address in `message-alternative-emails', looking at To, Cc and |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
7747 From headers in the original article." |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7748 (require 'mail-utils) |
79313 | 7749 (let* ((fields '("To" "Cc" "From")) |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7750 (emails |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7751 (split-string |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7752 (mail-strip-quoted-names |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7753 (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
|
7754 "[ \f\t\n\r\v,]+")) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7755 email) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7756 (while emails |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7757 (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
|
7758 (setq email (car emails) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7759 emails nil)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7760 (pop emails)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7761 (unless (or (not email) (equal email user-mail-address)) |
68521
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
7762 (message-remove-header "From") |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7763 (goto-char (point-max)) |
79313 | 7764 (insert "From: " (let ((user-mail-address email)) (message-make-from)) |
7765 "\n")))) | |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7766 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7767 (defun message-options-get (symbol) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7768 (cdr (assq symbol message-options))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7769 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7770 (defun message-options-set (symbol value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7771 (let ((the-cons (assq symbol message-options))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7772 (if the-cons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7773 (if value |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7774 (setcdr the-cons value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7775 (setq message-options (delq the-cons message-options))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7776 (and value |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7777 (push (cons symbol value) message-options)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7778 value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7779 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7780 (defun message-options-set-recipient () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7781 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7782 (message-narrow-to-headers-or-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7783 (message-options-set 'message-sender |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7784 (mail-strip-quoted-names |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7785 (message-fetch-field "from"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7786 (message-options-set 'message-recipients |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7787 (mail-strip-quoted-names |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7788 (let ((to (message-fetch-field "to")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7789 (cc (message-fetch-field "cc")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7790 (bcc (message-fetch-field "bcc"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7791 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7792 (or to "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7793 (if (and to cc) ", ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7794 (or cc "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7795 (if (and (or to cc) bcc) ", ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7796 (or bcc ""))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7797 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7798 (defun message-hide-headers () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7799 "Hide headers based on the `message-hidden-headers' variable." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7800 (let ((regexps (if (stringp message-hidden-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7801 (list message-hidden-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7802 message-hidden-headers)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7803 (inhibit-point-motion-hooks t) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7804 (after-change-functions nil) |
85766
68503cda7180
(message-check-news-body-syntax): Avoid mm-string-as-multibyte.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
85712
diff
changeset
|
7805 (end-of-headers (point-min))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7806 (when regexps |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7807 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7808 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7809 (message-narrow-to-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7810 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7811 (while (not (eobp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7812 (if (not (message-hide-header-p regexps)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7813 (message-next-header) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7814 (let ((begin (point)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7815 header header-len) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7816 (message-next-header) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7817 (setq header (buffer-substring begin (point)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7818 header-len (- (point) begin)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7819 (delete-region begin (point)) |
85766
68503cda7180
(message-check-news-body-syntax): Avoid mm-string-as-multibyte.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
85712
diff
changeset
|
7820 (goto-char end-of-headers) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7821 (insert header) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7822 (setq end-of-headers |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7823 (+ end-of-headers header-len)))))))) |
85766
68503cda7180
(message-check-news-body-syntax): Avoid mm-string-as-multibyte.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
85712
diff
changeset
|
7824 (narrow-to-region end-of-headers (point-max)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7825 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7826 (defun message-hide-header-p (regexps) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7827 (let ((result nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7828 (reverse nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7829 (when (eq (car regexps) 'not) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7830 (setq reverse t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7831 (pop regexps)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7832 (dolist (regexp regexps) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7833 (setq result (or result (looking-at regexp)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7834 (if reverse |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7835 (not result) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7836 result))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7837 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7838 (defun message-put-addresses-in-ecomplete () |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7839 (dolist (header '("to" "cc" "from" "reply-to")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7840 (let ((value (message-field-value header))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7841 (dolist (string (mail-header-parse-addresses value 'raw)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7842 (setq string |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7843 (gnus-replace-in-string |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7844 (gnus-replace-in-string string "^ +\\| +$" "") "\n" "")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7845 (ecomplete-add-item 'mail (car (mail-header-parse-address string)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7846 string)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7847 (ecomplete-save)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7848 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7849 (defun message-display-abbrev (&optional choose) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7850 "Display the next possible abbrev for the text before point." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7851 (interactive (list t)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7852 (when (and (memq (char-after (point-at-bol)) '(?C ?T ?\t ? )) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7853 (message-point-in-header-p) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7854 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7855 (beginning-of-line) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7856 (while (and (memq (char-after) '(?\t ? )) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7857 (zerop (forward-line -1)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7858 (looking-at "To:\\|Cc:"))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7859 (let* ((end (point)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7860 (start (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7861 (and (re-search-backward "[\n\t ]" nil t) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7862 (1+ (point))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7863 (word (when start (buffer-substring start end))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7864 (match (when (and word |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7865 (not (zerop (length word)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7866 (ecomplete-display-matches 'mail word choose)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7867 (when (and choose match) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7868 (delete-region start end) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7869 (insert match))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7870 |
92694 | 7871 ;; To send pre-formatted letters like the example below, you can use |
7872 ;; `message-send-form-letter': | |
7873 ;; --8<---------------cut here---------------start------------->8--- | |
7874 ;; To: alice@invalid.invalid | |
7875 ;; Subject: Verification of your contact information | |
7876 ;; From: Contact verification <admin@foo.invalid> | |
7877 ;; --text follows this line-- | |
7878 ;; Hi Alice, | |
7879 ;; please verify that your contact information is still valid: | |
7880 ;; Alice A, A avenue 11, 1111 A town, Austria | |
7881 ;; ----------next form letter message follows this line---------- | |
7882 ;; To: bob@invalid.invalid | |
7883 ;; Subject: Verification of your contact information | |
7884 ;; From: Contact verification <admin@foo.invalid> | |
7885 ;; --text follows this line-- | |
7886 ;; Hi Bob, | |
7887 ;; please verify that your contact information is still valid: | |
7888 ;; Bob, B street 22, 22222 Be town, Belgium | |
7889 ;; ----------next form letter message follows this line---------- | |
7890 ;; To: charlie@invalid.invalid | |
7891 ;; Subject: Verification of your contact information | |
7892 ;; From: Contact verification <admin@foo.invalid> | |
7893 ;; --text follows this line-- | |
7894 ;; Hi Charlie, | |
7895 ;; please verify that your contact information is still valid: | |
7896 ;; Charlie Chaplin, C plaza 33, 33333 C town, Chile | |
7897 ;; --8<---------------cut here---------------end--------------->8--- | |
7898 | |
7899 ;; FIXME: What is the most common term (circular letter, form letter, serial | |
7900 ;; letter, standard letter) for such kind of letter? See also | |
7901 ;; <http://en.wikipedia.org/wiki/Form_letter> | |
7902 | |
7903 ;; FIXME: Maybe extent message-mode's font-lock support to recognize | |
7904 ;; `message-form-letter-separator', i.e. highlight each message like a single | |
7905 ;; message. | |
7906 | |
7907 (defcustom message-form-letter-separator | |
7908 "\n----------next form letter message follows this line----------\n" | |
7909 "Separator for `message-send-form-letter'." | |
7910 ;; :group 'message-form-letter | |
7911 :group 'message-various | |
7912 :version "23.1" ;; No Gnus | |
7913 :type 'string) | |
7914 | |
7915 (defcustom message-send-form-letter-delay 1 | |
7916 "Delay in seconds when sending a message with `message-send-form-letter'. | |
7917 Only used when `message-send-form-letter' is called with non-nil | |
7918 argument `force'." | |
7919 ;; :group 'message-form-letter | |
7920 :group 'message-various | |
7921 :version "23.1" ;; No Gnus | |
7922 :type 'integer) | |
7923 | |
7924 (defun message-send-form-letter (&optional force) | |
7925 "Sent all form letter messages from current buffer. | |
7926 Unless FORCE, prompt before sending. | |
7927 | |
7928 The messages are separated by `message-form-letter-separator'. | |
7929 Header and body are separated by `mail-header-separator'." | |
7930 (interactive "P") | |
7931 (let ((sent 0) (skipped 0) | |
7932 start end text | |
7933 buff | |
7934 to done) | |
7935 (goto-char (point-min)) | |
7936 (while (not done) | |
7937 (setq start (point) | |
7938 end (if (search-forward message-form-letter-separator nil t) | |
7939 (- (point) (length message-form-letter-separator) -1) | |
7940 (setq done t) | |
7941 (point-max))) | |
7942 (setq text | |
7943 (buffer-substring-no-properties start end)) | |
7944 (setq buff (generate-new-buffer "*mail - form letter*")) | |
7945 (with-current-buffer buff | |
7946 (insert text) | |
7947 (message-mode) | |
7948 (setq to (message-fetch-field "To")) | |
7949 (switch-to-buffer buff) | |
7950 (when force | |
7951 (sit-for message-send-form-letter-delay)) | |
7952 (if (or force | |
7953 (y-or-n-p (format "Send message to `%s'? " to))) | |
7954 (progn | |
7955 (setq sent (1+ sent)) | |
7956 (message-send-and-exit)) | |
7957 (message (format "Message to `%s' skipped." to)) | |
7958 (setq skipped (1+ skipped))) | |
7959 (when (buffer-live-p buff) | |
7960 (kill-buffer buff)))) | |
7961 (message "%s message(s) sent, %s skipped." sent skipped))) | |
7962 | |
93386 | 7963 (defun message-replace-header (header new-value &optional after force) |
7964 "Remove HEADER and insert the NEW-VALUE. | |
7965 If AFTER, insert after this header. If FORCE, insert new field | |
7966 even if NEW-VALUE is empty." | |
7967 ;; Similar to `nnheader-replace-header' but for message buffers. | |
7968 (save-excursion | |
7969 (save-restriction | |
7970 (message-narrow-to-headers) | |
7971 (message-remove-header header)) | |
7972 (when (or force (> (length new-value) 0)) | |
7973 (if after | |
7974 (message-position-on-field header after) | |
7975 (message-position-on-field header)) | |
7976 (insert new-value)))) | |
7977 | |
7978 (defcustom message-recipients-without-full-name | |
7979 (list "ding@gnus.org" | |
7980 "bugs@gnus.org" | |
7981 "emacs-devel@gnu.org" | |
7982 "emacs-pretest-bug@gnu.org" | |
7983 "bug-gnu-emacs@gnu.org") | |
7984 "Mail addresses that have no full name. | |
7985 Used in `message-simplify-recipients'." | |
7986 ;; Maybe the addresses could be extracted from | |
7987 ;; `gnus-parameter-to-list-alist'? | |
7988 :type '(choice (const :tag "None" nil) | |
7989 (repeat string)) | |
7990 :version "23.1" ;; No Gnus | |
7991 :group 'message-headers) | |
7992 | |
7993 (defun message-simplify-recipients () | |
7994 (interactive) | |
7995 (dolist (hdr '("Cc" "To")) | |
7996 (message-replace-header | |
7997 hdr | |
7998 (mapconcat | |
7999 (lambda (addrcomp) | |
8000 (if (and message-recipients-without-full-name | |
8001 (string-match | |
8002 (regexp-opt message-recipients-without-full-name) | |
8003 (cadr addrcomp))) | |
8004 (cadr addrcomp) | |
8005 (if (car addrcomp) | |
8006 (message-make-from (car addrcomp) (cadr addrcomp)) | |
8007 (cadr addrcomp)))) | |
8008 (when (message-fetch-field hdr) | |
8009 (mail-extract-address-components | |
8010 (message-fetch-field hdr) t)) | |
8011 ", ")))) | |
8012 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
8013 (when (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
8014 (require 'messagexmas) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
8015 (message-xmas-redefine)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
8016 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
8017 (provide 'message) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
8018 |
17493 | 8019 (run-hooks 'message-load-hook) |
8020 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
8021 ;; Local Variables: |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
8022 ;; coding: iso-8859-1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
8023 ;; End: |
17493 | 8024 |
59756
b53453586872
(message-beginning-of-line): Change the behavior when
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58835
diff
changeset
|
8025 ;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0 |
17493 | 8026 ;;; message.el ends here |